Mr.Shi
2023-09-05 3878c57a2bd710295931303ea85439a596838dfd
小程序
已修改19个文件
3117 ■■■■ 文件已修改
minipro_standard/components/Search.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/allocation/allocation.vue 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/planDetails/planDetails.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/plannedDistribution/plannedDistribution.vue 401 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/plannedProgress/plannedProgress.vue 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/workbench/workbench.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/components/Warehouse.vue 99 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue 267 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/outboundList/outboundList.vue 475 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/transferList/transferList.vue 480 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue 380 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue 463 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/util/api/PlanningAPI.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/util/api/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/util/api/materialStorage.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/components/Search.vue
@@ -3,7 +3,7 @@
        <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" />
                <input v-model="text" @confirm="searchInput()" type="text" :placeholder="placeholder" />
            </view>
            <view class="search_operation" v-if="isShow">
                <view class="search_operation_w"></view>
@@ -66,7 +66,6 @@
        display: flex;
        align-items: center;
        .zhanwei {
            height: 180rpx;
            background: #ffffff;
        }
        .content {
minipro_standard/pages.json
@@ -182,7 +182,7 @@
                {
                    "path": "pages/warehousingDetails/warehousingDetails",
                    "style": {
                        "navigationBarTitleText": "入库详情",
                        "navigationBarTitleText": "转库详情",
                        "enablePullDownRefresh": false
                    }
                },
minipro_standard/pages/allocation/allocation.vue
@@ -21,7 +21,7 @@
                    <u-icon name="arrow-right" color="#999999"></u-icon>
                </view>
            </view>
            <view class="fp_list_item" @click="show = true">
            <view class="fp_list_item" @click="show1 = true">
                <view class="fp_list_item_left">
                    <text>生产设备</text>
                </view>
@@ -36,10 +36,20 @@
                    <text>生产人员</text>
                </view>
                <view class="fp_list_item_right">
                    <u-checkbox-group v-model="form.personnelId" v-show="personnelData.length > 0">
                        <u-checkbox :name="item.id" v-for="(item, index) in personnelData" :key="index" activeColor="#4275FC">{{item.text}}</u-checkbox>
                    </u-checkbox-group>
                    <view class="wu" v-show="personnelData.length === 0">
                    <template v-if="personnelData.length > 0">
                        <u-checkbox-group
                            placement="column"
                            @change="checkboxChange">
                            <u-checkbox
                                :customStyle="{marginBottom: '16rpx'}"
                                v-for="(item, index) in personnelData"
                                :key="index"
                                :label="item.text"
                                :name="item.id">
                            </u-checkbox>
                        </u-checkbox-group>
                    </template>
                    <view class="wu" v-else>
                        <text>暂无数据</text>
                    </view>
                </view>
@@ -52,17 +62,19 @@
        <!-- 选择日期 -->
        <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
        <!-- 选择设备 -->
        <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show = false" keyName="label"></u-picker>
        <u-picker :show="show1" :columns="equipment" @confirm="confirm" @cancel="show1 = false" keyName="text"></u-picker>
    </view>
</template>
<script>
    import { gsdate } from '@/util/utils.js'
    import { distributeById, getFindAll, getDeviceByCondition } from '@/util/api/PlanningAPI'
    export default {
        data() {
            return {
                show: false,
                columns: [[{ label: '设备一' }]],
                id: null,
                show1: false,
                checkboxValue1: [],
                form: {
                    num: '',        // 生产数量
                    startTime: gsdate(new Date()),      // 开始时间
@@ -70,25 +82,79 @@
                    equipmentName: '',    // 设备名称 
                    personnelId: []    // 人员id
                },
                isOpenDate: false,
                equipment: [],    // 设备数据
                personnelData: [],    // 人员数据
                timeShow: false
            };
        },
        onLoad(option) {
            this.form.num = option.num
            this.id = option.jhid
            this.getDeviceByConditions()
        },
        methods: {
            checkboxChange(ids) {
                this.form.personnelId = ids;
            },
            go() {
                uni.navigateBack({ delta: 1 });
            },
            // 确认选择设备
            confirm(val) {
                this.form.equipmentName = val.value[0].label
                this.form.equipmentId = 1
                this.show = false
                this.form.equipmentId = val.value[0].id
                this.form.equipmentName = val.value[0].text
                this.personnelData = []
                getFindAll({
                    deviceId: this.form.equipmentId
                }).then(res => {
                    if (res.code === 200 && res.data && res.data.length !== 0) {
                        this.form.personnelId = []
                        let arr = []
                        res.data.forEach((item) => {
                            arr.push({ text: item.dmodel.name + '-' + item.umodel.name, id: item.userId })
                        })
                        this.personnelData = arr
                    }
                    this.show1 = false
                })
            },
            timeConfirm(val) {
                this.form.startTime = val[0]
                this.timeShow = false
            },
            // 提交分配
            submit() {
                if (!this.form.num) return uni.showToast({ title: '计划生产数量不能为空!', icon: 'none', duration: 2000 });
                if (!this.form.startTime) return uni.showToast({ title: '计划开始日期不能为空!', icon: 'none', duration: 2000 });
                distributeById({
                    planId: this.id,
                    planNum: this.form.num,
                    planDate: this.form.startTime,
                    proGroupId: this.form.equipmentId,
                    proUserList: this.form.personnelId
                }).then(res => {
                    if (res.code === 200) {
                        uni.showToast({ title: '分配成功', icon: 'success', duration: 2000, mask: true });
                        setTimeout(() => {
                            uni.navigateBack({ delta: 1 });
                        }, 2000)
                    }
                })
            },
            // 查询设备
            getDeviceByConditions() {
                getDeviceByCondition({})
                    .then(res => {
                        if (res.code === 200) {
                            this.equipment = []
                            let arr = []
                            res.data.forEach((element) => {
                                arr.push({ text: element.code + '-' + element.name, id: element.id, checked: false })
                            })
                            this.equipment.push(arr)
                        }
                    })
            }
        }
    }
@@ -113,7 +179,7 @@
            border-bottom: 1rpx solid #ececec;
            .fp_list_item_left {
                flex-shrink: 0;
                margin-bottom: 20rpx;
                margin-bottom: 40rpx;
                display: flex;
                align-items: center;
                text {
@@ -122,9 +188,21 @@
                    font-weight: 400;
                }
            }
            .fp_list_item_right {
            .fp_list_item_right::v-deep {
                display: flex;
                align-items: center;
                flex-direction: column;
                .u-checkbox-group--row {
                    display: flex;
                    flex-direction: column;
                }
                .fp_list_item_right_dis {
                    display: flex;
                    align-items: center;
                    margin-bottom: 20rpx;
                    &:last-child {
                        margin-bottom: 0 !important;
                    }
                }
                .wu {
                    width: 100%;
                    margin: 30rpx 0;
@@ -134,22 +212,6 @@
                    text {
                        font-size: 26rpx;
                        color: black;
                    }
                }
                .van-checkbox {
                    margin-right: 5rpx !important;
                    margin-top: 10rpx !important;
                    &:nth-child(1) {
                        margin-top: 0 !important;
                    }
                    &:nth-child(2) {
                        margin-top: 0 !important;
                    }
                    &:nth-child(3) {
                        margin-top: 0 !important;
                    }
                    .van-checkbox__label {
                        color: black !important;
                    }
                }
                .black {
minipro_standard/pages/planDetails/planDetails.vue
@@ -122,7 +122,7 @@
                <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="x"></view>
                    <view class="details_timeline_item_zw"></view>
                    <view class="details_timeline_item_left">
                        <text :class="{'active_font': !item.produceDate}">投料</text>
@@ -162,16 +162,23 @@
</template>
<script>
    import { queryByID } from '@/util/api/PlanningAPI'
    export default {
        data() {
            return {
                id: null,
                info: {}
            };
        },
        onLoad(option) {
            this.id = option.id
            this.queryByIDs()
        },
        methods: {
            // 获取详情
            queryByIDs() {
                queryByID(this.$route.query.id)
                queryByID(this.id)
                    .then(res => {
                        if (res.code === 200) {
                            this.info = res.data
@@ -445,7 +452,7 @@
                top: 30rpx;
                left: 29rpx;
                width: 1rpx;
                height: 165rpx;
                height: calc(100% + 60rpx);
                border-right: 1rpx dashed #CCCCCC;
            }
            .dian {
minipro_standard/pages/plannedDistribution/plannedDistribution.vue
@@ -1,14 +1,21 @@
<template>
    <view class="content">
        <view class="content_search">
            <Search @searchInput="searchInput" @submit="submit" @reset="reset" placeholder="搜索物料名称/编码"></Search>
            <view class="content_search_x"></view>
            <Search @searchInput="searchInput" placeholder="搜索物料名称/编码"></Search>
            <view class="content_search_x" v-if="tagList.length > 0"></view>
            <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag" />
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_total" :style="{top: top}">共{{search.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
                <view class="fp_list_item" v-for="(item, i) in lists" :key="item.id" @click="clickItem(i)">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @scrolltolower="getLists"
            scroll-y
            :style="{height: height}">
                <view class="fp_list_item" v-for="(item, i) in list" :key="item.id" @click="clickItem(i)">
                    <view class="fp_list_item_header">
                        <u-checkbox :checked="item.isActive"></u-checkbox>
                        <text v-if="item.mmodel">{{item.mmodel.name}}</text>
@@ -44,7 +51,7 @@
        </view>
        <view class="fp_zw"></view>
        <view class="fp_footer">
            <view class="fp_footer_button" @click="submit">分配(1)</view>
            <view class="fp_footer_button" @click="submit">分配</view>
        </view>
    </view>
</template>
@@ -52,158 +59,27 @@
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    import { getList, getSelfList } from '@/util/api/PlanningAPI'
    export default {
        components: { Search, LabelSelection },
        data() {
            return {
                height: '',
                top: '',
                listData: {
                isLoading: false,
                search: {
                    gxId: '',
                    capacity: 10,
                    page: 0,
                    total: 0,
                    startDate: '',
                    endDate: '',
                    procedureIds: [],
                    departIds: '',
                    mixParam: '',
                    cateIds: []
                    first: true // 用于判断是否是第一次进入页面
                },
                tagList: [
                    {
                        id: '',
                        name: '注射',
                        num: '0'
                    },
                    {
                        id: '0',
                        name: '烧结',
                        num: '0'
                    },
                    {
                        id: '1,4',
                        name: '焊接',
                        num: '0'
                    }
                ],
                data: [],    // 工序数据
                factoryList: [],
                finished: true,
                tagList: [],
                finished: false,
                loading: false,
                refreshing: false,
                timeShow: false,
                lists: [
                    {
                        id: 1,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        isActive: false,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 2,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        isActive: false,
                        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',
                        isActive: false,
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 4,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        isActive: false,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 5,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        isActive: false,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    }
                ]
                list: []
            };
        },
        onReady() {
@@ -215,192 +91,129 @@
                }).exec()
            })
        },
        onLoad() {
            this.getLists()
        },
        methods: {
            // 下拉刷新
            onRefresh() {
                if (this.isLoading) return
                this.isLoading = true
                this.search.page = 0
                this.list = []
                this.finished = false
                this.getLists()
            },
            // 点击当前项
            clickItem(i) {
                this.lists.forEach((item, index) => {
                this.list.forEach((item, index) => {
                    item.isActive = i === index;
                })
            },
            // 跳转
            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
            searchInput(e) {
                this.search.mixParam = e
                this.search.page = 0
                this.list = []
                this.finished = false
                this.lists = []
                this.getLists()
            },
            // 点击标签搜索
            clickTag(ids) {
                this.listData.cateIds = ids
                this.listData.page = 0
            // 点击
            clickTag(id) {
                this.search.gxId = id
                this.list = []
                this.search.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
                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 data;
                this.lists.forEach(item => {
                this.list.forEach((item) => {
                    if (item.isActive) {
                        data = item
                    }
                })
                if (!data) {
                    uni.showToast({ title: '至少选择一项计划!', duration: 2000 });
                    uni.showToast({ title: '至少选择一项计划!', icon: 'none', duration: 2000 });
                    return
                }
                uni.navigateTo({
                    url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.workorderDistributNum ? data.num - data.workorderDistributNum : data.num}`
                })
                });
            },
            // 获取当前用户所分配的工序
            async getWorkingProcedures() {
                let res = await getSelfList({})
                if (res.code === 200 && res.data.length > 0) {
                    let arr = []
                    res.data.forEach((item) => {
                        arr.push({ name: item.name, id: item.id })
                    })
                    this.search.gxId = arr[0].id
                    this.tagList = arr
                    return true
                }
                return false
            },
            // 获取计划列表数据
            getLists() {
                console.log('getLists')
            async 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'
                    this.search.page = this.search.page += 1
                    if (this.search.first) {     // 如果是第一次,先请求工序
                        await this.getWorkingProcedures()
                        let res = await getList({
                            capacity: this.search.capacity,
                            page: this.search.page,
                            model: {
                                mixParam: this.search.mixParam,
                                procedureId: this.search.gxId,
                                statusList: [1, 4]
                            }
                        ]
                    }).then(res => {
                        })
                        this.isLoading = false
                        this.loading = false
                        this.listData.total = res.data.total
                        if (this.refreshing) {
                            this.lists = []
                            this.list = []
                            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)
                            }
                            this.search.total = res.data.total
                            res.data.records.forEach((item) => {
                                item.isActive = false
                            })
                            this.list.push(...res.data.records)
                        } else {
                            this.finished = true
                            this.finished = true;
                        }
                    }).catch(err => {
                        this.loading = false
                        this.finished = true
                        this.search.first = false
                    } else {
                        let res = await getList({
                            capacity: this.search.capacity,
                            page: this.search.page,
                            model: {
                                mixParam: this.search.mixParam,
                                procedureId: this.search.gxId,
                                statusList: [1, 4]
                            }
                        })
                        this.isLoading = false
                        if (this.refreshing) {
                            this.lists = []
                            this.list = []
                            this.refreshing = false;
                        }
                    })
                        this.loading = false
                        if (res.code === 200 && res.data.records.length !== 0) {
                            res.data.records.forEach((item) => {
                                item.isActive = false
                            })
                            this.list.push(...res.data.records)
                            this.search.total = res.data.total
                        } else {
                            this.finished = true;
                        }
                    }
                }
            }
        }
@@ -583,7 +396,7 @@
            z-index: 99;
        }
        .fp_zw {
            height: 150px;
            height: calc(98rpx + env(safe-area-inset-bottom));
        }
        .fp_footer {
            width: 100%;
minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -34,7 +34,14 @@
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @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">
@@ -102,6 +109,9 @@
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    import { getList, pageCount } from '@/util/api/PlanningAPI'
    import { getWorkingProcedure, getOrganization } from '@/util/api'
    import { gsdate } from '@/util/utils.js'
    export default {
        components: { Search, LabelSelection },
        data() {
@@ -117,7 +127,7 @@
                    procedureIds: [],
                    departIds: '',
                    mixParam: '',
                    cateIds: []
                    cateIds: null
                },
                tagList: [
                    {
@@ -142,118 +152,13 @@
                    }
                ],
                data: [],    // 工序数据
                factoryList: [],
                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: '工厂'
                        }
                    }
                ]
                lists: [],
                isLoading: false
            };
        },
        onReady() {
@@ -265,7 +170,15 @@
                }).exec()
            })
        },
        onLoad() {
            this.getLists()
            this.getOrganizations()
        },
        methods: {
            // 切换工序
            changeTag(i) {
                this.data[i].isActive = !this.data[i].isActive
            },
            // 跳转
            jump(item) {
                uni.navigateTo({
@@ -275,6 +188,14 @@
            // 获取头部组件高度
            getHeight(height) {
                this.height = height
            },
            // 下拉刷新
            async onRefresh() {
                if (this.isLoading) return;
                this.isLoading = true;
                await this.getLists()
                await this.pageCounts()
                this.isLoading = false;
            },
            // 重置
            reset() {
@@ -291,8 +212,8 @@
                if (this.data.length > 0) {
                    this.data.forEach(item => { item.isActive = false })
                }
                // this.getLists()
                // this.pageCounts()
                this.getLists()
                this.pageCounts()
            },
            // 日期确定
            timeConfirm(val) {
@@ -330,7 +251,7 @@
                this.listData.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
                this.getLists()
            },
            // 获取列表统计
            pageCounts() {
@@ -395,15 +316,14 @@
                this.listData.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
                // this.pageCounts()
                this.getLists()
                this.pageCounts()
            },
            // 获取计划列表数据
            getLists() {
                console.log('getLists')
                if (!this.finished) {
                    this.loading = true
                    this.listData.page = this.listData.page++
                    this.listData.page = this.listData.page += 1
                    getList({
                        capacity: this.listData.capacity,
                        model: {
@@ -412,7 +332,7 @@
                            endDate: this.listData.endDate,
                            procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
                            factoryId: this.listData.departIds,
                            statusList: this.listData.cateIds
                            statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : []
                        },
                        page: this.listData.page,
                        sorts: [
minipro_standard/pages/workbench/workbench.vue
@@ -31,68 +31,18 @@
        computed: mapState([
            'Menu'
        ]),
        onReady() {
            console.log(this.Menu)
        },
        data() {
            return {
                list: [
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    },
                    {
                        icon: require('@/static/logo@2x.png'),
                        label: '测试'
                    }
                ]
            };
        },
        onLoad() {
            uni.hideTabBar()
            // uni.login({
            //     success: data => {
            //         this.wxLogin(data.code)
            //     },
            //     fail: err => {
            //         uni.$u.toast(err)
            //     }
            // })
        },
        methods: {
            // wxLogin(code) {
            //     wxEmpower({code})
            //         .then(res => {
            //             this.openId = res.openid
            //             if (res.userInfo) {
            //                 this.$store.commit('SETTOKEN', res.userInfo.token)
            //                 this.$store.commit('SETUSERINFO', res.userInfo)
            //                 uni.navigateTo({
            //                     url:'/pages/projectList/projectList'
            //                 })
            //             }
            //         })
            //         .catch(err => {
            //             uni.$u.toast(err)
            //         })
            // }
            jump(row) {
                console.log(row)
            }
        }
    }
</script>
minipro_standard/pages_adjust/components/Warehouse.vue
@@ -5,57 +5,106 @@
        </view>
        <view class="content">
            <view class="content_search">
                <u-search :showAction="false" placeholder="请输入仓库名称" v-model="keyword"></u-search>
                <u-search :showAction="false" placeholder="请输入仓库名称" v-model="form.name" @search="searchInput"></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_total">共{{form.total}}条数据</div>
            <scroll-view
            class="content_list"
            @scrolltolower="getList"
            scroll-y>
                <!-- <u-list @scrolltolower="scrolltolower"> -->
                    <!-- <u-list-item > -->
                        <div class="content_list_item"v-for="(item, index) in list" :key="index" @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: #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 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>
                <!--     </u-list-item>
                </u-list> -->
            </scroll-view>
        </view>
    </u-popup>
</template>
<script>
    import { warehouseList } from '@/util/api/WorkOrderAPI'
    export default {
        props: {
            show: Boolean
            show: Boolean,
            systemDicDataId: {
                type: String,
                default: ''
            }
        },
        data() {
            return {
                keyword: '',
                total: 0,
                indexList: []
                form: {
                    capacity: 50,
                    page: 0,
                    total: 0,
                    name: '',
                },
                list: [],
                loading: false,
                finished: false,
                refreshing: false
            };
        },
        methods: {
            searchInput() {
                this.form.page = 0
                this.finished = false
                this.list = []
                this.getList()
            },
            getVal(item) {
                this.$emit('value', item)
            },
            open() {
                this.indexList = []
                this.loadmore()
                this.form.page = 0
                this.finished = false
                this.list = []
                this.getList()
            },
            scrolltolower() {
                this.loadmore()
                this.getList()
            },
            loadmore() {
                for (let i = 0; i < 20; i++) {
                    this.indexList.push({
                        id: i,
                        name: `仓库${i}`
            getList() {
                if (!this.finished) {
                    this.loading = true;
                    this.form.page = this.form.page += 1
                    warehouseList({
                        capacity: this.form.capacity,
                        page: this.form.page,
                        model: {
                            systemDicDataId: this.systemDicDataId,
                            name: this.form.name,
                            status: 1
                        }
                    }).then(res => {
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                        this.loading = false;
                        if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
                            this.form.total = res.data.total
                            this.list.push(...res.data.records)
                        } else {
                            this.finished = true;
                        }
                    }).catch(err => {
                        this.loading = false;
                        this.finished = true;
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                    })
                }
            },
minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
@@ -25,7 +25,14 @@
        </view>
        <view class="content_total" :style="{top: top}">共{{controlData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @scrolltolower="getLists"
            scroll-y
            :style="{height: height}">
                <view class="content_list_item" v-for="(item, i) in list" :key="i">
                    <view class="content_list_item_top">
                        <view class="content_list_item_top_left">
@@ -36,11 +43,11 @@
                        </view>
                    </view>
                    <view class="content_list_item_sx">
                        <text v-if="item.qualityType == 0" class="green">合格 | </text>
                        <text v-if="item.qualityType == 1" class="yellow">不良 | </text>
                        <text v-if="item.qualityType == 2" class="red">报废 | </text>
                        <text>{{ item.procedureName ? item.procedureName : '-' }} | </text>
                        <text>{{ item.batch ? item.batch : '-' }}</text>
                        <text v-if="item.qualityType == 0" class="green">合格&nbsp;|&nbsp;</text>
                        <text v-if="item.qualityType == 1" class="yellow">不良&nbsp;|&nbsp;</text>
                        <text v-if="item.qualityType == 2" class="red">报废&nbsp;|&nbsp;</text>
                        <text>&nbsp;{{ item.procedureName ? item.procedureName : '-' }}&nbsp;|</text>
                        <text>&nbsp;{{ item.batch ? item.batch : '-' }}</text>
                    </view>
                    <!-- item主题信息部分 -->
                    <view class="content_list_item_content">
@@ -71,7 +78,8 @@
<script>
    import Search from '@/components/Search.vue'
    import { orderTyepToStr } from '@/util/constData.js'
    import { getwStockExtList } from "@/util/api/materialStorage"
    export default {
        components: {
            Search
@@ -80,6 +88,7 @@
            return {
                height: '',
                top: '',
                isLoading: false,
                controlData: {
                    finished: false,
                    loading: false,
@@ -96,7 +105,8 @@
                    materialName: '',
                    groupType: '3'
                },
                list: []
                list: [],
                refreshing: false
            };
        },
        onReady() {
@@ -108,20 +118,28 @@
                }).exec()
            })
        },
        onLoad() {
            this.getLists()
        },
        methods: {
            onRefresh() {
                this.isLoading = true
                this.controlData.page = 0;
                this.controlData.finished = false;
                this.list = [];
                this.getLists()
            },
            changeGroup(i) {
                this.groupTypes[i].isActive = !this.groupTypes[i].isActive;
                this.data.groupType = this.groupTypes[i].id
                for (const index in this.groupTypes) {
                    if (index != i) {
                        // console.log(index, i)
                        const item = this.groupTypes[index]
                        item.isActive = false
                    }
                }
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.orderType) {
                    if (item.id == type) {
                        return item.name
@@ -135,182 +153,87 @@
                    url: `/pages/planDetails/planDetails?id=${item.id}`
                })
            },
            // 获取计划列表数据
            getLists() {
                if (!this.controlData.finished) {
                    this.controlData.loading = true;
                    this.controlData.page = this.controlData.page += 1;
                    getwStockExtList({
                        capacity: this.controlData.capacity,
                        model: {
                            materialOrBatch: this.data.materialName,
                            groupType: this.data.groupType,
                            greaterZero: 1
                        },
                        page: this.controlData.page,
                        sorts: [
                            {
                                direction: "ASC",
                                property: "publishDate",
                            }
                        ]
                    }).then((res) => {
                        this.isLoading = false
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                        this.controlData.loading  = false;
                        this.controlData.total = res.data.total;
                        if (res.code === 200) {
                            if (res.data.records.length < this.controlData.capacity) {
                                this.controlData.finished = true;
                            }
                            if (this.controlData.page === 1) {
                                this.list = res.data.records;
                            } else {
                                this.list.push(...res.data.records)
                            }
                        }
                    })
                    .catch((err) => {
                        this.isLoading = false
                        this.controlData.loading = false;
                        this.controlData.finished = true;
                        if (this.refreshing) {
                            this.list = []
                            this.refreshing = false;
                        }
                    })
                } else {
                    this.isLoading = false
                }
            },
            // 获取头部组件高度
            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
                    }
                this.controlData.page = 0;
                this.data.groupType = '3'
                this.controlData.finished = false;
                this.groupTypes.forEach((item, index) => {
                    item.isActive = index === 0;
                })
            },
            // 打开日期插件
            openDate() {
                this.timeShow = true
                this.data.materialName = ''
                this.list = [];
                this.getLists();
            },
            // 搜索
            searchInput(val) {
                this.listData.mixParam = val
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.data.materialName = val;
                this.controlData.page = 0;
                this.controlData.finished = false;
                this.list = [];
                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;
                        }
                    })
                }
                this.controlData.page = 0;
                this.controlData.finished = false;
                this.list = [];
                this.getLists();
            }
        }
    }
minipro_standard/pages_adjust/pages/newTransfer/newTransfer.vue
@@ -74,6 +74,8 @@
    import { documentType } from '@/util/constData.js'
    import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue'
    import Warehouse from '../../components/Warehouse.vue'
    import { createZK } from '@/util/api/agencyAPI'
    export default {
        components: {
            SelectMultipleMaterial,
@@ -127,15 +129,15 @@
            getValue(val) {
                if (this.view.status === 'c') {
                    this.data.exWarehouse = val.name
                    this.data.exWarehouseId = val.id || 1
                    this.data.outUserId = val.managerId || 3
                    this.data.exWarehouseId = val.id
                    this.data.outUserId = val.managerId
                } else if (this.view.status === 'r') {
                    this.data.warehousingWarehouseName = val.name
                    this.data.warehousingWarehouse = val.id || 2
                    this.data.inUserId = val.managerId || 4
                    this.data.warehousingWarehouse = val.id
                    this.data.inUserId = val.managerId
                    this.view.warehouseQualityType = val.tmodel.label
                }
                view.Warehouse = false
                this.view.Warehouse = false
            },
            // 确认单据类型
            onConfirm(val) {
minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
@@ -16,7 +16,7 @@
                <view style="margin-top: 0 " 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="data.billType">
                        {{ orderTyepToStr(data.billType) }}
                        {{ seeText(data.billType) }}
                    </view>
                </view>
                <view class="content_list_item_content_item">
@@ -114,24 +114,88 @@
</template>
<script>
    import { orderTyepToStr } from '@/util/constData.js'
    import {
        orderTyepToStr
    } from '@/util/constData.js'
    import {
        getBoundDetail,
        cancelBound
    } from '@/util/api/materialStorage'
    export default {
        data() {
            return {
                data: {},
                types: [
                    { name: '全部', id: '', isActive: true },
                    { name: '采购订单', id: '0', isActive: false },
                    { name: '生产工单', id: '1', isActive: false },
                    { name: '销售订单', id: '2', isActive: false },
                    { name: '转库单', id: '3', isActive: false },
                    { name: '盘点单', id: '4', isActive: false },
                id: null,
                data: {
                    code: "",
                    createName: "",
                    planDate: "",
                    dealDate: "",
                    status: 0,
                    originType: 0,
                    originCode: "",
                    updateName: "",
                    updateMobile: "",
                    updateTime: "",
                    warehouseName: "",
                    warehouseCode: "",
                    outPlandate: "",
                    inPlandate: "",
                    woutboundDetailsWait: [],
                    woutboundDetailsOut: []
                },
                types: [{
                        name: '全部',
                        id: '',
                        isActive: true
                    },
                    {
                        name: '采购订单',
                        id: '0',
                        isActive: false
                    },
                    {
                        name: '生产工单',
                        id: '1',
                        isActive: false
                    },
                    {
                        name: '销售订单',
                        id: '2',
                        isActive: false
                    },
                    {
                        name: '转库单',
                        id: '3',
                        isActive: false
                    },
                    {
                        name: '盘点单',
                        id: '4',
                        isActive: false
                    },
                ],
                materailArray: []
            };
        },
        onLoad(option) {
            this.id = option.id
            getBoundDetail({
                id: option.id
            })
            .then(res => {
                this.data = res.data
                if (this.data.status === 1) {
                    this.materailArray.push(...this.data.woutboundDetailsOut)
                } else {
                    this.materailArray.push(...this.data.woutboundDetailsWait)
                }
            })
        },
        methods: {
            seeText(id) {
                return orderTyepToStr(id)
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.types) {
@@ -142,10 +206,17 @@
                return '-'
            },
            submit() {
            },
            cancel() {
                cancelBound({ id: this.id })
                    .then(res => {
                        uni.showToast({ title: '取消成功', icon: 'success', duration: 2000 });
                        uni.navigateBack({ delta: 1 });
                    })
                    .catch(err => {
                        uni.showToast({ title: err.message, icon: 'error', duration: 2000 });
                    })
            }
        }
    }
minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
@@ -1,17 +1,18 @@
<template>
    <view class="content">
        <view class="content_search">
            <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
                placeholder="搜索出库单号/出库仓库">
            <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>
                            <view class="Search_item_content_a" :style="listData.planDateStart ? 'color: #000' : ''">
                                {{ listData.planDateStart ? listData.planDateStart : '开始日期'}}
                            </view>
                            <text>-</text>
                            <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
                                {{ listData.endDate ? listData.endDate : '结束日期'}}</view>
                            <view class="Search_item_content_a" :style="listData.planDateEnd ? 'color: #000' : ''">
                                {{ listData.planDateEnd ? listData.planDateEnd : '结束日期'}}
                            </view>
                        </view>
                    </view>
                    <view class="Search_item">
@@ -19,7 +20,7 @@
                        <view class="Search_item_content">
                            <view class="tag">
                                <view class="tag_item" :class="{'tag_active': item.isActive}" v-for="(item, i) in types"
                                :key="item.id" @click="changeTags(i)">{{item.name}}</view>
                                    :key="item.id" @click="changeTags(i)">{{item.name}}</view>
                            </view>
                        </view>
                    </view>
@@ -30,7 +31,14 @@
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @scrolltolower="getLists"
            scroll-y
            :style="{height: height}">
                <view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
                    <!-- item头部视图 -->
                    <view class="content_list_item_top">
@@ -49,7 +57,8 @@
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">单据类型:</view>
                            <view class="content_list_item_content_item_nr">
                                {{ orderTyepToStr(item.billType) }}
                                <!-- orderTyepToStr(item.billType) -->
                                {{ seeText(item.billType) }}
                            </view>
                        </view>
                        <view class="content_list_item_content_item">
@@ -81,14 +90,21 @@
            </scroll-view>
        </view>
        <!-- 选择日期 -->
        <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
        <u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
            @confirm="timeConfirm"></u-calendar>
    </view>
</template>
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    import { orderTyepToStr } from '@/util/constData.js'
    import {
        orderTyepToStr
    } from '@/util/constData.js'
    import {
        getBoundList,
        pageCount
    } from "@/util/api/materialStorage"
    export default {
        components: {
            Search,
@@ -98,6 +114,8 @@
            return {
                height: '',
                top: '',
                minDate: new Date('2021-01-31'),
                maxDate: new Date(),
                listData: {
                    capacity: 10,
                    page: 0,
@@ -106,60 +124,157 @@
                    planDateStart: "",
                    code: "",
                    originType: "",
                    status: ""
                    status: "",
                },
                types: [
                    { name: '车间领料', id: '1', isActive: false },
                    { name: '机台备料', id: '2', isActive: false },
                    { name: '车间转库', id: '3', isActive: false },
                    { name: '完工入库', id: '4', isActive: false },
                    { name: '计划领料', id: '5', isActive: false },
                    { name: '外协领料', id: '6', isActive: false },
                    { name: '外协完工转库', id: '7', isActive: false },
                    { name: '产品入库', id: '8', isActive: false },
                    { name: '产品转库', id: '9', isActive: false },
                    { name: '让步放行入库', id: '10', isActive: false },
                    { name: '让步放行转库', id: '11', isActive: false },
                    { name: '客返返修领料', id: '12', isActive: false },
                    { name: '客返返修入库', id: '13', isActive: false },
                    { name: '跨组织转库', id: '14', isActive: false },
                    { name: '工序报废', id: '15', isActive: false },
                    { name: '客退返修领料', id: '16', isActive: false },
                    { name: '客退返修入库', id: '17', isActive: false },
                    { name: '销售出库', id: '18', isActive: false },
                    { name: '让步销售', id: '19', isActive: false },
                    { name: '工单投料', id: '20', isActive: false },
                    { name: '仓库报废', id: '21', isActive: false },
                    { name: '客退检验领料', id: '22', isActive: false },
                    { name: '客返检验领料', id: '23', isActive: false },
                    { name: '库存调整', id: '28', isActive: false },
                    { name: '废品入库', id: '30', isActive: false }
                ],
                tagList: [
                    {
                        id: "",
                        name: "全部",
                        num: '0',
                types: [{
                        name: '车间领料',
                        id: '1',
                        isActive: false
                    },
                    {
                        id: "0",
                        name: "待出库",
                        num: '0',
                        name: '机台备料',
                        id: '2',
                        isActive: false
                    },
                    {
                        id: "1",
                        name: "已出库",
                        num: "0",
                        name: '车间转库',
                        id: '3',
                        isActive: false
                    },
                    {
                        id: "2",
                        name: "已取消",
                        num: "0",
                        name: '完工入库',
                        id: '4',
                        isActive: false
                    },
                    {
                        name: '计划领料',
                        id: '5',
                        isActive: false
                    },
                    {
                        name: '外协领料',
                        id: '6',
                        isActive: false
                    },
                    {
                        name: '外协完工转库',
                        id: '7',
                        isActive: false
                    },
                    {
                        name: '产品入库',
                        id: '8',
                        isActive: false
                    },
                    {
                        name: '产品转库',
                        id: '9',
                        isActive: false
                    },
                    {
                        name: '让步放行入库',
                        id: '10',
                        isActive: false
                    },
                    {
                        name: '让步放行转库',
                        id: '11',
                        isActive: false
                    },
                    {
                        name: '客返返修领料',
                        id: '12',
                        isActive: false
                    },
                    {
                        name: '客返返修入库',
                        id: '13',
                        isActive: false
                    },
                    {
                        name: '跨组织转库',
                        id: '14',
                        isActive: false
                    },
                    {
                        name: '工序报废',
                        id: '15',
                        isActive: false
                    },
                    {
                        name: '客退返修领料',
                        id: '16',
                        isActive: false
                    },
                    {
                        name: '客退返修入库',
                        id: '17',
                        isActive: false
                    },
                    {
                        name: '销售出库',
                        id: '18',
                        isActive: false
                    },
                    {
                        name: '让步销售',
                        id: '19',
                        isActive: false
                    },
                    {
                        name: '工单投料',
                        id: '20',
                        isActive: false
                    },
                    {
                        name: '仓库报废',
                        id: '21',
                        isActive: false
                    },
                    {
                        name: '客退检验领料',
                        id: '22',
                        isActive: false
                    },
                    {
                        name: '客返检验领料',
                        id: '23',
                        isActive: false
                    },
                    {
                        name: '库存调整',
                        id: '28',
                        isActive: false
                    },
                    {
                        name: '废品入库',
                        id: '30',
                        isActive: false
                    }
                ],
                data: [], // 工序数据
                factoryList: [],
                finished: true,
                tagList: [{
                        id: "",
                        name: "全部",
                        num: '0',
                    },
                    {
                        id: "0",
                        name: "待出库",
                        num: '0',
                    },
                    {
                        id: "1",
                        name: "已出库",
                        num: "0",
                    },
                    {
                        id: "2",
                        name: "已取消",
                        num: "0",
                    }
                ],
                finished: false,
                isLoading: false,
                loading: false,
                refreshing: false,
                timeShow: false,
@@ -175,20 +290,53 @@
                }).exec()
            })
        },
        onLoad() {
            this.getLists()
            this.getPageCount()
            this.listData.page = 0
        },
        methods: {
            onRefresh() {
                this.isLoading = true
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getPageCount()
            },
            seeText(id) {
                return orderTyepToStr(id)
            },
            // 统计数据
            getPageCount() {
                pageCount({
                    type: 0,
                    codeOrHouse: this.listData.code,
                    planDateEnd: this.listData.planDateEnd,
                    planDateStart: this.listData.planDateStart,
                    billType: this.listData.originType
                })
                .then((res) => {
                    if (res.code === 200) {
                        this.tagList[0].num = res.data.allNum.toString()
                        this.tagList[1].num = res.data.startNum.toString()
                        this.tagList[2].num = res.data.endNum.toString()
                        this.tagList[3].num = res.data.cancelNum.toString()
                    }
                })
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.orderType) {
                    if (item.id == type) {
                        return item.name
                for (const item of this.types) {
                    if (parseInt(item.id) === type) {
                        return item.name;
                    }
                }
                return '-'
            },
            // 跳转
            // 跳转详情
            jump(item) {
                uni.navigateTo({
                    url: `/pages/planDetails/planDetails?id=${item.id}`
                    url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${item.id}`
                })
            },
            // 获取头部组件高度
@@ -197,41 +345,35 @@
            },
            // 重置
            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()
                this.listData.code = '';
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.listData.planDateEnd = ''
                this.listData.planDateStart = ''
                this.listData.originType = ''
                this.types.forEach((item) => {
                    item.isActive = false
                })
                this.getLists();
                this.getPageCount()
            },
            // 日期确定
            timeConfirm(val) {
                this.listData.startDate = val[0]
                this.listData.endDate = val[val.length - 1]
                this.listData.planDateEnd = val[val.length - 1]
                this.listData.planDateStart = val[0]
                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 {
            // 切换工序
            changeTags(i) {
                this.types[i].isActive = !this.types[i].isActive;
                listData.originType = this.types[i].id
                for (const index in this.types) {
                    if (index != i) {
                        const item = this.types[index]
                        item.isActive = false
                    }
                })
                }
            },
            // 打开日期插件
            openDate() {
@@ -239,133 +381,72 @@
            },
            // 搜索
            searchInput(val) {
                this.listData.mixParam = val
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.getLists()
                this.listData.code = val;
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getPageCount()
            },
            // 点击标签搜索
            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
                        }
                    })
                this.listData.status = ids
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists()
            },
            // 搜索弹框提交
            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()
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getPageCount()
            },
            // 获取计划列表数据
            getLists() {
                console.log('getLists')
                if (!this.finished) {
                    this.loading = true
                    this.listData.page = this.listData.page++
                    getList({
                    this.loading = true;
                    this.listData.page = this.listData.page += 1;
                    getBoundList({
                        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
                            type: 0,
                            codeOrHouse: this.listData.code,
                            planDateEnd: this.listData.planDateEnd,
                            planDateStart: this.listData.planDateStart,
                            status: this.listData.status,
                            billType: this.listData.originType
                        },
                        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
                            direction: "ASC",
                            property: "publishDate",
                        }, ],
                    }).then((res) => {
                        this.loading = false;
                        this.listData.total = res.data.total;
                        if (res.code === 200) {
                            if (this.listData.page === 1) {
                                this.lists = res.data.records;
                            } else {
                                this.lists.push(...res.data.records)
                                if (this.lists.length === res.data.total) {
                                    this.finished = true;
                                    return
                                }
                                this.lists.push(...res.data.records);
                            }
                        } else {
                            this.finished = true
                        }
                    }).finally(() => {
                        this.loading = false;
                        this.isLoading = false
                    }).catch(err => {
                        this.loading = false
                        this.finished = true
                        if (this.refreshing) {
                            this.lists = []
                            this.refreshing = false;
                        }
                        this.finished = true;
                        this.loading = false;
                    })
                } else {
                    this.isLoading = false
                }
            }
        }
minipro_standard/pages_adjust/pages/transferList/transferList.vue
@@ -1,17 +1,18 @@
<template>
    <view class="content">
        <view class="content_search">
            <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
                placeholder="搜索转库单号">
            <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>
                            <view class="Search_item_content_a" :style="listData.outPlanDateStart ? 'color: #000' : ''">
                                {{ listData.outPlanDateStart ? listData.outPlanDateStart : '开始日期'}}
                            </view>
                            <text>-</text>
                            <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
                                {{ listData.endDate ? listData.endDate : '结束日期'}}</view>
                            <view class="Search_item_content_a" :style="listData.outPlanDateEnd ? 'color: #000' : ''">
                                {{ listData.outPlanDateEnd ? listData.outPlanDateEnd : '结束日期'}}
                            </view>
                        </view>
                    </view>
                    <view class="Search_item">
@@ -30,7 +31,14 @@
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @scrolltolower="getLists"
            scroll-y
            :style="{height: height}">
                <view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
                    <!-- item头部视图 -->
                    <view class="content_list_item_top">
@@ -95,13 +103,20 @@
            </scroll-view>
        </view>
        <!-- 选择日期 -->
        <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
        <u-calendar
        :show="timeShow"
        mode="range"
        @close="timeShow = false"
        :minDate="minDate"
        :maxDate="maxDate"
        @confirm="timeConfirm"></u-calendar>
    </view>
</template>
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    import { getTransferList, ZKPageCount } from "@/util/api/materialStorage";
    export default {
        components: {
            Search,
@@ -111,23 +126,20 @@
            return {
                height: '',
                top: '',
                isLoading: false,
                listData: {
                    capacity: 10,
                    page: 0,
                    total: 0,
                    startDate: '',
                    endDate: '',
                    procedureIds: [],
                    departIds: '',
                    mixParam: '',
                    cateIds: []
                    outPlanDateEnd: "",
                    outPlanDateStart: "",
                    code: "",
                    type: "",
                    status: ""
                },
                types: [
                    // { name: '全部', id: '', isActive: false },
                    // { name: '车间领料', id: '1', isActive: false },
                    // { name: '车间备料', id: '2', isActive: false },
                    // { name: '其他', id: '3', isActive: false },
                    {
                minDate: new Date('2021-01-31'),
                maxDate: new Date(),
                types: [{
                        name: '车间领料',
                        id: '1',
                        isActive: false
@@ -218,25 +230,78 @@
                        isActive: false
                    }
                ],
                orderType: [
                    { name: '车间领料', id: 1 },
                    { name: '计划领料', id: 2 },
                    { name: '机台备料', id: 3 },
                    { name: '完工入库', id: 4 },
                    { name: '车间转库', id: 5 },
                    { name: '外协领料转库', id: 6 },
                    { name: '外协完工转库', id: 7 },
                    { name: '产品入库', id: 8 },
                    { name: '产品转库', id: 9 },
                    { name: '让步放行入库', id: 10 },
                    { name: '让步放行转库', id: 11 },
                    { name: '客返返修领料', id: 12 },
                    { name: '客返返修入库', id: 13 },
                    { name: '跨组织转库', id: 14 },
                    { name: '工序报废', id: 15 },
                    { name: '客退返修领料', id: 16 },
                    { name: '客退返修入库', id: 17 },
                    { name: '废品入库', id: 30 }
                orderType: [{
                        name: '车间领料',
                        id: 1
                    },
                    {
                        name: '计划领料',
                        id: 2
                    },
                    {
                        name: '机台备料',
                        id: 3
                    },
                    {
                        name: '完工入库',
                        id: 4
                    },
                    {
                        name: '车间转库',
                        id: 5
                    },
                    {
                        name: '外协领料转库',
                        id: 6
                    },
                    {
                        name: '外协完工转库',
                        id: 7
                    },
                    {
                        name: '产品入库',
                        id: 8
                    },
                    {
                        name: '产品转库',
                        id: 9
                    },
                    {
                        name: '让步放行入库',
                        id: 10
                    },
                    {
                        name: '让步放行转库',
                        id: 11
                    },
                    {
                        name: '客返返修领料',
                        id: 12
                    },
                    {
                        name: '客返返修入库',
                        id: 13
                    },
                    {
                        name: '跨组织转库',
                        id: 14
                    },
                    {
                        name: '工序报废',
                        id: 15
                    },
                    {
                        name: '客退返修领料',
                        id: 16
                    },
                    {
                        name: '客退返修入库',
                        id: 17
                    },
                    {
                        name: '废品入库',
                        id: 30
                    }
                ],
                tagList: [{
                        id: "",
@@ -262,120 +327,13 @@
                        id: "3",
                        name: "已取消",
                        num: "12",
                    }
                    },
                ],
                data: [], // 工序数据
                factoryList: [],
                finished: true,
                finished: false,
                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: '工厂'
                        }
                    }
                ]
                lists: []
            };
        },
        onReady() {
@@ -386,6 +344,10 @@
                    that.top = `${rect.height}px`
                }).exec()
            })
        },
        onLoad() {
            this.getLists();
            this.getZKPageCount()
        },
        methods: {
            tyepToStr(type) {
@@ -400,8 +362,17 @@
            // 跳转
            jump(item) {
                uni.navigateTo({
                    url: `/pages/planDetails/planDetails?id=${item.id}`
                    url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.id}`
                })
            },
            // 下拉刷新优化页面
            onRefresh() {
                this.isLoading = true
                this.finished = false;
                this.listData.page = 0
                this.loading = true;
                this.getLists();
                this.getZKPageCount()
            },
            // 获取头部组件高度
            getHeight(height) {
@@ -409,41 +380,56 @@
            },
            // 重置
            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()
                this.listData.code = '';
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.listData.type = ''
                this.listData.outPlanDateEnd = ''
                this.listData.outPlanDateStart = ''
                this.types.forEach((item) => {
                    item.isActive = false
                })
                this.getLists()
                this.getZKPageCount()
            },
            // 统计总数
            getZKPageCount() {
                ZKPageCount({
                    code: this.listData.code,
                    outPlanDateEnd: this.listData.outPlanDateEnd,
                    outPlanDateStart: this.listData.outPlanDateStart,
                    type: this.listData.type
                }).then(res => {
                    if (res.code === 200) {
                        this.tagList[0].num = res.data.allNum
                        this.tagList[1].num = res.data.startNum
                        this.tagList[2].num = res.data.outNum
                        this.tagList[3].num = res.data.inNum
                        this.tagList[4].num = res.data.cancelNum
                    }
                })
            },
            loadData() {
                this.getLists()
            },
            // 日期确定
            timeConfirm(val) {
                this.listData.startDate = val[0]
                this.listData.endDate = val[val.length - 1]
                this.listData.outPlanDateStart = val[0]
                this.listData.outPlanDateEnd = 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 {
            changeTags(i) {
                this.types[i].isActive = !this.types[i].isActive;
                this.listData.type = this.types[i].id
                for (const index in this.types) {
                    if (index != i) {
                        const item = this.types[index]
                        item.isActive = false
                    }
                })
                }
            },
            // 打开日期插件
            openDate() {
@@ -451,133 +437,79 @@
            },
            // 搜索
            searchInput(val) {
                this.listData.mixParam = val
                this.listData.code = val
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.getLists()
                this.getZKPageCount()
            },
            // 点击标签搜索
            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
                        }
                    })
                this.listData.status = ids
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists()
            },
            // 搜索弹框提交
            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()
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getZKPageCount()
            },
            // 获取计划列表数据
            getLists() {
                console.log('getLists')
                if (!this.finished) {
                    this.loading = true
                    this.listData.page = this.listData.page++
                    getList({
                    this.loading = true;
                    this.listData.page = this.listData.page += 1;
                    getTransferList({
                        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
                            code: this.listData.code,
                            outPlanDateEnd: this.listData.outPlanDateEnd,
                            outPlanDateStart: this.listData.outPlanDateStart,
                            type: this.listData.type,
                            status: this.listData.status
                        },
                        page: this.listData.page,
                        sorts: [{
                            direction: 'ASC',
                            property: 'publishDate'
                        }]
                    }).then(res => {
                        this.loading = false
                        this.listData.total = res.data.total
                            direction: "ASC",
                            property: "publishDate",
                        }, ],
                    })
                    .then((res) => {
                        this.isLoading = false
                        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)
                        this.loading = false;
                        this.listData.total = res.data.total;
                        if (res.code === 200) {
                            if (res.data.records.length < this.listData.capacity) {
                                this.finished = true;
                            }
                        } else {
                            this.finished = true
                            if (this.listData.page === 1) {
                                this.lists = res.data.records;
                            } else {
                                this.lists.push(...res.data.records);
                            }
                        }
                    }).catch(err => {
                        this.loading = false
                        this.finished = true
                    })
                    .catch((err) => {
                        this.isLoading = false
                        this.loading = false;
                        this.finished = true;
                        if (this.refreshing) {
                            this.lists = []
                            this.refreshing = false;
                        }
                    })
                } else {
                    this.isLoading = false
                }
            }
        }
minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
@@ -1,131 +1,287 @@
<template>
    <view class="content">
    <view class="content2">
        <view class="order-message">
            <view class="content_list_item_top">
                <view class="content_list_item_top_left">
                    <!--<text>入库单号:</text>-->
                    <!--          <text>转库单号:</text>-->
                    <text>{{ data.code }}</text>
                </view>
                <view class="content_list_item_top_right">
                    <text class="warning" v-if="data.status === 0">待入库</text>
                    <text class="green" v-else-if="data.status === 1">已入库</text>
                    <text class="info" v-else-if="data.status === 2">已取消</text>
                    <text class="created" v-if="data.status === 0">待出库</text>
                    <text class="warning" v-else-if="data.status === 1">已出库</text>
                    <text class="green" v-else-if="data.status == 2">已入库</text>
                    <text class="info" v-else-if="data.status === 3">已取消</text>
                </view>
            </view>
            <!-- item主题信息部分 -->
            <view class="content_list_item_content">
                <view class="content_list_item_content_item">
                <view style="margin-top: 0 " class="content_list_item_content_item">
                    <view class="content_list_item_content_item_label">单据类型:</view>
                    <view class="content_list_item_content_item_nr">
                        {{ orderTyepToStr(data.billType) }}
                        {{ tyepToStr(data.type) }}
                    </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_label">转出组织:</view>
                    <view class="content_list_item_content_item_nr">
                        {{ data.warehouseCode + ' | ' + data.warehouseName }}
                        {{ data.outDepartName }}
                    </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_label">转入组织:</view>
                    <view class="content_list_item_content_item_nr">
                        {{ data.planDate }}
                        {{ data.inDepartName }}
                    </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_label">转出仓库:</view>
                    <view class="content_list_item_content_item_nr">
                        {{ tyepToStr(data.originType) }}
                        {{ data.outWarehouseName }}
                    </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_label">转出仓管员:</view>
                    <view class="content_list_item_content_item_nr">
                        {{ data.originCode ? data.originCode : '-' }}
                        {{ data.outUserName }}
                    </view>
                </view>
                <view v-if="data.updateName" class="content_list_item_content_item">
                    <view class="content_list_item_content_item_label">操作人:</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">
                        {{ data.updateName + ' - ' + data.updateMobile }}
                        {{ data.inWarehouseName }}
                    </view>
                </view>
                <view v-if="data.updateTime" class="content_list_item_content_item">
                    <view class="content_list_item_content_item_label">操作时间:</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">
                        {{ data.updateTime }}
                        {{ data.inUserName }}
                    </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">
                        {{ data.outPlandate }}
                    </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">
                        {{ data.inPlandate }}
                    </view>
                </view>
            </view>
        </view>
        <!-- 转库物料 -->
        <view class="title">
            <text class="title-prefix"></text>
            <text>{{ data.status==1 ? '已入库物料' : '待入库物料' }}</text>
        </view>
        <view class="material-content">
            <view class="item-style" v-for="(item, index) in materailArray" :key="index">
                <view class="item-title-style">
                    <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text>
            <!-- 转库物料 -->
            <view class="material-title">
                <view class="title">
                    <text class="title-prefix"></text>
                    <text>转库物料</text>
                </view>
                <view class="item-content-style">
                    <view class="content_list_item_content_item">
                        <text class="content_list_item_content_item_label">批次号:</text>
                        <text class="content_list_item_content_item_nr">{{ item.batch || '-' }}</text>
            </view>
            <view class="material-content">
                <view class="item-style" v-for="(item, index) in data.wtransferDetailList" :key="index">
                    <view class="item-title-style">
                        <text style="font-weight: 500;">{{ item.materialName + ' | ' + item.materialCode}}</text>
                    </view>
                    <view class="content_list_item_content_item">
                        <text class="content_list_item_content_item_label">数量:</text>
                        <text class="content_list_item_content_item_nr">{{ item.doneNum + item.unitName }}</text>
                    </view>
                    <view class="content_list_item_content_item">
                        <text class="content_list_item_content_item_label">工序:</text>
                        <text class="content_list_item_content_item_nr">{{ item.procedureName || '-' }}</text>
                    </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">
                            <text v-if="item.qualityType == 0" class="green">合格</text>
                            <text v-else-if="item.qualityType == 1" class="yellow">不良</text>
                            <text v-else-if="item.qualityType == 2" class="red">报废</text>
                            <text v-else>-</text>
                    <view class="item-content-style">
                        <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.procedureName || '-' }}
                            </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">
                                <text v-if="item.qualityType==0" class="green">合格</text>
                                <text v-else-if="item.qualityType==1" class="yellow">不良</text>
                                <text v-else-if="item.qualityType==2" class="red">报废</text>
                                <text v-else>-</text>
                            </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.outPlannum + item.unitName }}
                            </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.outActnum + item.unitName }}
                            </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.inActnum + item.unitName }}
                            </view>
                        </view>
                    </view>
                    <view class="content_list_item_content_item">
                        <text class="content_list_item_content_item_label">入库货位:</text>
                        <text
                            class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
                    </view>
                </view>
            </view>
        </view>
        <view v-if="data.status === 0" style="height:94rpx"></view>
        <view v-if="data.status === 0" class="bottom-button">
            <button class="button button-cancel" @click="submit">去入库</button>
            <!-- <button class="button button-cancel" @click="cancel">取消</button> -->
        <view v-if="(data.status === 0 || data.status === 1) && show" style="background:#F7F7F7; height:94rpx"></view>
        <view v-if="(data.status === 0 || data.status === 1) && show" class="bottom-button">
            <button class="button" @click="submit">{{ data.status === 0 ? '去出库' : '去入库' }}</button>
        </view>
    </view>
</template>
<script>
    import { orderTyepToStr } from '@/util/constData.js'
    import {
        wTransferExtDetail
    } from '@/util/api/materialStorage'
    export default {
        data() {
            return {
                types: [
                    { name: '全部', id: '', isActive: true },
                    { name: '采购订单', id: '0', isActive: false },
                    { name: '生产工单', id: '1', isActive: false },
                    { name: '销售订单', id: '2', isActive: false },
                    { name: '转库单', id: '3', isActive: false },
                    { name: '盘点单', id: '4', isActive: false },
                types: [{
                        name: '全部',
                        id: '',
                        isActive: true
                    },
                    {
                        name: '采购订单',
                        id: '0',
                        isActive: false
                    },
                    {
                        name: '生产工单',
                        id: '1',
                        isActive: false
                    },
                    {
                        name: '销售订单',
                        id: '2',
                        isActive: false
                    },
                    {
                        name: '转库单',
                        id: '3',
                        isActive: false
                    },
                    {
                        name: '盘点单',
                        id: '4',
                        isActive: false
                    },
                ],
                data: {}
                data: {
                    code: "",
                    status: 0,
                    outDepartName: "",
                    inDepartName: "",
                    outWarehouseName: "",
                    inWarehouseName: "",
                    outPlandate: "",
                    inPlandate: "",
                    wtransferDetailList: []
                },
                orderType: [{
                        name: '车间领料',
                        id: 1
                    },
                    {
                        name: '计划领料',
                        id: 2
                    },
                    {
                        name: '机台备料',
                        id: 3
                    },
                    {
                        name: '完工入库',
                        id: 4
                    },
                    {
                        name: '车间转库',
                        id: 5
                    },
                    {
                        name: '外协领料转库',
                        id: 6
                    },
                    {
                        name: '外协完工转库',
                        id: 7
                    },
                    {
                        name: '成品入库',
                        id: 8
                    },
                    {
                        name: '成品转库',
                        id: 9
                    },
                    {
                        name: '让步放行入库',
                        id: 10
                    },
                    {
                        name: '让步放行转库',
                        id: 11
                    },
                    {
                        name: '客返返修领料',
                        id: 12
                    },
                    {
                        name: '客返返修入库',
                        id: 13
                    },
                    {
                        name: '跨组织转库',
                        id: 14
                    },
                    {
                        name: '工序报废',
                        id: 15
                    },
                    {
                        name: '客退返修领料',
                        id: 16
                    },
                    {
                        name: '客退返修入库',
                        id: 17
                    }
                ],
                show: false
            };
        },
        onLoad(option) {
            wTransferExtDetail(option.id)
                .then(res => {
                    this.data = res.data
                    if (res.data.inUserId == this.$store.state.userInfo.id) {
                        this.show = true
                    }
                })
        },
        methods: {
            // 跳转出库入库
            submit() {
                if (this.data.status === 0) { // 出库
                    console.log('出库')
                    // router.push({ name: 'issueOperation', query: { id: route.query.id, type: 7 } })
                } else if (this.data.status === 1) { // 入库
                    if (this.data.type === 3) { // 备料确认
                        console.log('备料确认')
                        // router.push({ name: 'orderStock', query: { id: route.query.id, status: data.value.status, next: 1 } })
                        return
                    }
                    console.log('入库')
                    // router.push({ name: 'warehousing', query: { id: route.query.id, type: 7 } })
                }
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.types) {
                    if (parseInt(item.id) === this.type) {
                for (const item of this.orderType) {
                    if (item.id == type) {
                        return item.name
                    }
                }
@@ -136,25 +292,27 @@
</script>
<style lang="scss" scoped>
    .content {
    .content2 {
        background: white;
        .order-message {
            padding: 30rpx;
            padding-top: 30rpx;
            // padding: 30rpx;
            display: flex;
            flex-direction: column;
            // border-bottom: 1rpx solid #ececec;
            .content_list_item_top {
                padding: 0 30rpx;
                display: flex;
                align-items: center;
                justify-content: space-between;
                .content_list_item_top_left {
                    display: flex;
                    align-items: center;
                    // align-items: center;
                    text {
                    span {
                        font-size: 32rpx;
                        font-weight: 500;
                        color: #333333;
@@ -183,7 +341,13 @@
                }
            }
            .material-title {
                // background-color: #f7f7f7;
                margin-top: 10rpx;
            }
            .content_list_item_content {
                margin: 0 30rpx;
                padding: 24rpx 30rpx;
                background: #f7f7f7;
                border-radius: 16rpx;
@@ -192,16 +356,17 @@
                justify-content: space-between;
                margin-top: 32rpx;
                .content_list_item_content_item:first-child {
                    margin-top: 0;
                }
                .content_list_item_content_item {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    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;
@@ -220,11 +385,11 @@
        }
        .title {
            background-color: #f7f7f7;
            padding: 30rpx;
            height: 32rpx;
            margin-left: 30rpx;
            padding-top: 40rpx;
            padding-bottom: 24rpx;
            font-size: 30rpx;
            display: flex;
            align-items: center;
            .title-prefix {
                display: inline-block;
@@ -237,43 +402,36 @@
        }
        .material-content {
            padding: 30rpx;
            .item-style {
                width: initial;
                border-bottom: 1rpx solid #ececec;
                margin-top: 30rpx;
                &:first-child {
                    margin-top: 0 !important;
                }
                border-bottom: 1rpx solid #ECECEC;
                padding-bottom: 30rpx;
                &:last-child {
                    border: none;
                }
                .item-title-style {
                    padding: 0 30rpx;
                    margin-top: 30rpx;
                    margin-bottom: 12rpx;
                    font-size: 30rpx;
                }
                .item-content-style {
                    // padding: 24rpx 30rpx;
                    // background-color: #f7f7f7;
                    // border-radius: 16rpx;
                    margin: 0 30rpx;
                    background-color: #f7f7f7;
                    border-radius: 16rpx;
                    display: flex;
                    flex-wrap: wrap;
                    padding-bottom: 30rpx;
                    justify-content: space-between;
                    &:last-child {
                        padding-bottom: 0;
                    }
                    padding: 1rpx 1rpx 30rpx 1rpx;
                    .content_list_item_content_item {
                        width: 100%;
                        display: flex;
                        margin-top: 24rpx;
                        margin-left: 24rpx;
                        .content_list_item_content_item_label {
                            font-size: 24rpx;
@@ -300,30 +458,16 @@
            width: 100%;
            bottom: 0;
            height: 188rpx;
            display: flex;
            justify-content: space-between;
            .button-action {
                background: #fff;
                color: $nav-color;
            }
            .button-cancel {
                background: $nav-color;
                color: #FFFFFF;
            }
            .button {
                margin: 32rpx 32rpx 68rpx 32rpx;
                height: 88rpx;
                /*width: 668rpx;*/
                // width: 334rpx;
                font-size: 30rpx;
                width: calc(100% - 64rpx);
                border: none;
                border-radius: 8rpx;
                box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.08);
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: $nav-color;
                color: #fff;
            }
        }
    }
minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
@@ -3,7 +3,6 @@
        <view class="order-message">
            <view class="content_list_item_top">
                <view class="content_list_item_top_left">
                    <!--<text>入库单号:</text>-->
                    <text>{{ data.code }}</text>
                </view>
                <view class="content_list_item_top_right">
@@ -16,7 +15,7 @@
                <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="data.billType">
                        {{ orderTyepToStr(data.billType) }}
                        {{ seeText(data.billType) }}
                    </view>
                </view>
                <view class="content_list_item_content_item">
@@ -79,7 +78,8 @@
                    </view>
                    <view class="content_list_item_content_item">
                        <text class="content_list_item_content_item_label">入库货位:</text>
                        <text class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
                        <text
                            class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
                    </view>
                </view>
            </view>
@@ -96,9 +96,15 @@
    import {
        orderTyepToStr
    } from '@/util/constData.js'
    import {
        getBoundDetail,
        cancelBound
    } from '@/util/api/materialStorage'
    export default {
        data() {
            return {
                id: null,
                types: [{
                        name: '全部',
                        id: '',
@@ -130,13 +136,46 @@
                        isActive: false
                    },
                ],
                data: {},
                data: {
                    code: "",
                    createName: "",
                    planDate: "",
                    dealDate: "",
                    status: 0,
                    originType: 0,
                    originCode: "",
                    updateName: "",
                    updateMobile: "",
                    updateTime: "",
                    warehouseName: "",
                    warehouseCode: "",
                    outPlandate: "",
                    inPlandate: "",
                    woutboundDetailsWait: [],
                    woutboundDetailsOut: []
                },
                materailArray: []
            };
        },
        onLoad(option) {
            this.id = option.id
            getBoundDetail({
                id: option.id
            })
            .then(res => {
                this.data = res.data
                if (this.data.status === 1) {
                    this.materailArray.push(...this.data.woutboundDetailsOut)
                } else {
                    this.materailArray.push(...this.data.woutboundDetailsWait)
                }
            })
        },
        methods: {
            seeText(id) {
                return orderTyepToStr(id)
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.types) {
                    if (parseInt(item.id) === this.type) {
                        return item.name
@@ -146,6 +185,28 @@
            },
            submit() {
            },
            cancel() {
                cancelBound({
                    id: this.id
                })
                .then(res => {
                    uni.showToast({
                        title: '取消成功',
                        icon: 'success',
                        duration: 2000
                    });
                    uni.navigateBack({
                        delta: 1
                    });
                })
                .catch(err => {
                    uni.showToast({
                        title: err.message,
                        icon: 'error',
                        duration: 2000
                    });
                })
            }
        }
    }
minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
@@ -1,17 +1,18 @@
<template>
    <view class="content">
        <view class="content_search">
            <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
                placeholder="搜索入库单号/入库仓库">
            <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>
                            <view class="Search_item_content_a" :style="listData.planDateStart ? 'color: #000' : ''">
                                {{ listData.planDateStart ? listData.planDateStart : '开始日期'}}
                            </view>
                            <text>-</text>
                            <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">
                                {{ listData.endDate ? listData.endDate : '结束日期'}}</view>
                            <view class="Search_item_content_a" :style="listData.planDateEnd ? 'color: #000' : ''">
                                {{ listData.planDateEnd ? listData.planDateEnd : '结束日期'}}
                            </view>
                        </view>
                    </view>
                    <view class="Search_item">
@@ -30,7 +31,14 @@
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
            <scroll-view
            :refresher-enabled="true"
            :refresher-triggered="isLoading"
            @refresherrefresh="onRefresh"
            refresher-background="#fff"
            @scrolltolower="getLists"
            scroll-y
            :style="{height: height}">
                <view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
                    <!-- item头部视图 -->
                    <view class="content_list_item_top">
@@ -49,7 +57,7 @@
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">单据类型:</view>
                            <view class="content_list_item_content_item_nr">
                                {{ orderTyepToStr(item.billType) }}
                                {{ seeText(item.billType) }}
                            </view>
                        </view>
                        <view class="content_list_item_content_item">
@@ -81,14 +89,21 @@
            </scroll-view>
        </view>
        <!-- 选择日期 -->
        <u-calendar :show="timeShow" @close="timeShow = false" @confirm="timeConfirm"></u-calendar>
        <u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
            @confirm="timeConfirm"></u-calendar>
    </view>
</template>
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    import { orderTyepToStr } from '@/util/constData.js'
    import {
        orderTyepToStr
    } from '@/util/constData.js'
    import {
        getBoundList,
        pageCount
    } from "@/util/api/materialStorage";
    export default {
        components: {
            Search,
@@ -98,6 +113,9 @@
            return {
                height: '',
                top: '',
                minDate: new Date('2021-01-31'),
                maxDate: new Date(),
                isLoading: false,
                listData: {
                    capacity: 10,
                    page: 0,
@@ -106,60 +124,146 @@
                    planDateStart: "",
                    code: "",
                    originType: "",
                    status: ""
                    status: "",
                },
                types: [
                    { name: '车间领料', id: '1', isActive: false },
                    { name: '机台备料', id: '2', isActive: false },
                    { name: '车间转库', id: '3', isActive: false },
                    { name: '完工入库', id: '4', isActive: false },
                    { name: '计划领料', id: '5', isActive: false },
                    { name: '外协领料', id: '6', isActive: false },
                    { name: '外协完工转库', id: '7', isActive: false },
                    { name: '产品入库', id: '8', isActive: false },
                    { name: '产品转库', id: '9', isActive: false },
                    { name: '让步放行入库', id: '10', isActive: false },
                    { name: '让步放行转库', id: '11', isActive: false },
                    { name: '客返返修领料', id: '12', isActive: false },
                    { name: '客返返修入库', id: '13', isActive: false },
                    { name: '跨组织转库', id: '14', isActive: false },
                    { name: '工序报废', id: '15', isActive: false },
                    { name: '客退返修领料', id: '16', isActive: false },
                    { name: '客退返修入库', id: '17', isActive: false },
                    { name: '销售出库', id: '18', isActive: false },
                    { name: '让步销售', id: '19', isActive: false },
                    { name: '工单投料', id: '20', isActive: false },
                    { name: '仓库报废', id: '21', isActive: false },
                    { name: '客退检验领料', id: '22', isActive: false },
                    { name: '客返检验领料', id: '23', isActive: false },
                    { name: '库存调整', id: '28', isActive: false },
                    { name: '废品入库', id: '30', isActive: false }
                ],
                tagList: [
                    {
                        id: "",
                        name: "全部",
                        num: '0',
                types: [{
                        name: '车间领料',
                        id: '1',
                        isActive: false
                    },
                    {
                        id: "0",
                        name: "待出库",
                        num: '0',
                        name: '机台备料',
                        id: '2',
                        isActive: false
                    },
                    {
                        id: "1",
                        name: "已出库",
                        num: "0",
                        name: '车间转库',
                        id: '3',
                        isActive: false
                    },
                    {
                        id: "2",
                        name: "已取消",
                        num: "0",
                        name: '完工入库',
                        id: '4',
                        isActive: false
                    },
                    {
                        name: '计划领料',
                        id: '5',
                        isActive: false
                    },
                    {
                        name: '外协领料',
                        id: '6',
                        isActive: false
                    },
                    {
                        name: '外协完工转库',
                        id: '7',
                        isActive: false
                    },
                    {
                        name: '产品入库',
                        id: '8',
                        isActive: false
                    },
                    {
                        name: '产品转库',
                        id: '9',
                        isActive: false
                    },
                    {
                        name: '让步放行入库',
                        id: '10',
                        isActive: false
                    },
                    {
                        name: '让步放行转库',
                        id: '11',
                        isActive: false
                    },
                    {
                        name: '客返返修领料',
                        id: '12',
                        isActive: false
                    },
                    {
                        name: '客返返修入库',
                        id: '13',
                        isActive: false
                    },
                    {
                        name: '跨组织转库',
                        id: '14',
                        isActive: false
                    },
                    {
                        name: '工序报废',
                        id: '15',
                        isActive: false
                    },
                    {
                        name: '客退返修领料',
                        id: '16',
                        isActive: false
                    },
                    {
                        name: '客退返修入库',
                        id: '17',
                        isActive: false
                    },
                    {
                        name: '工单产出',
                        id: '24',
                        isActive: false
                    },
                    {
                        name: '采购入库',
                        id: '25',
                        isActive: false
                    },
                    {
                        name: '客退检验入库',
                        id: '26',
                        isActive: false
                    },
                    {
                        name: '客返检验入库',
                        id: '27',
                        isActive: false
                    },
                    {
                        name: '库存调整',
                        id: '28',
                        isActive: false
                    },
                    {
                        name: '废品入库',
                        id: '30',
                        isActive: false
                    }
                ],
                data: [], // 工序数据
                factoryList: [],
                finished: true,
                tagList: [{
                        id: "",
                        name: "全部",
                        num: "0",
                    },
                    {
                        id: "0",
                        name: "待入库",
                        num: "0",
                    },
                    {
                        id: "1",
                        name: "已入库",
                        num: "0",
                    },
                    {
                        id: "2",
                        name: "已取消",
                        num: "0",
                    }
                ],
                finished: false,
                loading: false,
                refreshing: false,
                timeShow: false,
@@ -175,11 +279,25 @@
                }).exec()
            })
        },
        onLoad() {
            this.getLists()
            this.getPageCount()
        },
        methods: {
            onRefresh() {
                this.isLoading = true
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists()
                this.getPageCount()
            },
            seeText(id) {
                return orderTyepToStr(id)
            },
            tyepToStr(type) {
                //  <!-- 1、车间领料;2、车间备料;3、其他;4、完工入库 -->
                for (const item of this.orderType) {
                    if (item.id == type) {
                for (const item of this.types) {
                    if (parseInt(item.id) === type) {
                        return item.name
                    }
                }
@@ -188,7 +306,7 @@
            // 跳转
            jump(item) {
                uni.navigateTo({
                    url: `/pages/planDetails/planDetails?id=${item.id}`
                    url: `/pages_adjust/pages/warehousingDetails1/warehousingDetails1?id=${item.id}`
                })
            },
            // 获取头部组件高度
@@ -197,41 +315,95 @@
            },
            // 重置
            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.listData.code = '';
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.types.forEach((item) => {
                    item.isActive = false
                })
                this.listData.originType = ''
                this.listData.planDateEnd = ''
                this.listData.planDateStart = ''
                this.getLists();
                this.getPageCount()
            },
            // 统计数据
            getPageCount() {
                pageCount({
                    type: 1,
                    codeOrHouse: this.listData.code,
                    planDateEnd: this.listData.planDateEnd,
                    planDateStart: this.listData.planDateStart,
                    billType: this.listData.originType
                }).then(res => {
                    if (res.code === 200) {
                        this.tagList[0].num = res.data.allNum.toString()
                        this.tagList[1].num = res.data.startNum.toString()
                        this.tagList[2].num = res.data.endNum.toString()
                        this.tagList[3].num = res.data.cancelNum.toString()
                    }
                })
            },
            // 获取计划列表数据
            getLists() {
                if (!this.finished) {
                    this.loading = true;
                    this.listData.page = this.listData.page += 1;
                    getBoundList({
                        capacity: this.listData.capacity,
                        model: {
                            type: 1,
                            codeOrHouse: this.listData.code,
                            planDateEnd: this.listData.planDateEnd,
                            planDateStart: this.listData.planDateStart,
                            status: this.listData.status,
                            billType: this.listData.originType
                        },
                        page: this.listData.page,
                        sorts: [{
                            direction: "ASC",
                            property: "publishDate",
                        }]
                    })
                    .then((res) => {
                        this.loading = false;
                        this.listData.total = res.data.total;
                        if (res.code === 200) {
                            if (res.data.records.length < this.listData.capacity) {
                                this.finished = true;
                            }
                            if (this.listData.page === 1) {
                                this.lists = res.data.records;
                            } else {
                                this.lists.push(...res.data.records);
                            }
                        }
                    })
                    .finally(() => {
                        this.loading = false;
                        this.isLoading = false
                    })
                } else {
                    this.isLoading = false
                }
                // this.getLists()
                // this.pageCounts()
            },
            // 日期确定
            timeConfirm(val) {
                this.listData.startDate = val[0]
                this.listData.endDate = val[val.length - 1]
                this.listData.planDateStart = val[0]
                this.listData.planDateEnd = 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 {
            // 切换单据类型
            changeTags(i) {
                this.types[i].isActive = !this.types[i].isActive;
                this.listData.originType = this.types[i].id
                for (const index in this.types) {
                    if (index != i) {
                        const item = this.types[index]
                        item.isActive = false
                    }
                })
                }
            },
            // 打开日期插件
            openDate() {
@@ -239,19 +411,20 @@
            },
            // 搜索
            searchInput(val) {
                this.listData.mixParam = val
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.getLists()
                this.listData.code = val;
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getPageCount()
            },
            // 点击标签搜索
            clickTag(ids) {
                this.listData.cateIds = ids
                this.listData.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
                this.listData.status = ids
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists()
            },
            // 获取列表统计
            pageCounts() {
@@ -270,103 +443,13 @@
                    }
                })
            },
            // 获取工厂数据
            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;
                        }
                    })
                }
                this.listData.page = 0;
                this.finished = false;
                this.lists = [];
                this.getLists();
                this.getPageCount()
            }
        }
    }
minipro_standard/util/api/PlanningAPI.js
@@ -48,7 +48,7 @@
// }
// 根据ID发布计划
export function getWorkingProcedure (data) {
export function publishById (data) {
  return request.post('/ext/plansExt/publishById', data)
}
// export function publishById(data: any): Promise<any> {
minipro_standard/util/api/index.js
@@ -47,4 +47,14 @@
// 微信退出登录
export function wxLoginOut(data) {
    return http.post('/system/wxLoginOut', data)
}
// 查询当前用户所有主组织下的工序
export function getWorkingProcedure(data) {
    return http.post('/ext/proceduresExt/productesGroup', data)
}
// 查询当前用户所有主组织下的工序
export function getOrganization(data) {
    return http.post('/ext/departmentExt/getDepartmentListByConditon', data)
}
minipro_standard/util/api/materialStorage.js
@@ -49,7 +49,7 @@
// 提交转库单出入库
export function inOutSubmit(params) {
    return http.get('/ext/wTransferExt/wTransferForInOutUpload', { params })
    return request.get('/ext/wTransferExt/wTransferForInOutUpload', { params })
}
// export function inOutSubmit(params: any): Promise<any> {
//   return httpRequest({
@@ -89,7 +89,7 @@
 * @returns
 */
export function getBoundDetail(params) {
    return http.get('/ext/wOutboundExt/findById', { params })
    return request.get('/ext/wOutboundExt/findById', { params })
}
// export function getBoundDetail(params: any): Promise<any> {
//   return httpRequest({
@@ -104,7 +104,7 @@
 * @returns
 */
export function cancelBound(params) {
    return http.get('/ext/wOutboundExt/cancel', { params })
    return request.get('/ext/wOutboundExt/cancel', { params })
}
// export function cancelBound(params: any): Promise<any> {
//   return httpRequest({