wtt
2025-09-08 fcd0d5e8655aba83519be297e408cdd07fb133ca
Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
5个文件已修改
453 ■■■■ 已修改文件
components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/quyangdan/table.vue 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomachaima/tiaomachaima2.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue
@@ -76,7 +76,6 @@
                <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size"
                    :total="length"></uni-pagination>
            </view>
        </uni-popup>
    </view>
</template>
package.json
@@ -13,6 +13,7 @@
    "@psdk/device-ble-uniapp": "^0.6.1",
    "@psdk/esc": "^0.6.1",
    "@psdk/tspl": "^0.6.1",
    "dayjs": "^1.11.18",
    "echarts": "^5.6.0",
    "i": "^0.3.7",
    "npm": "^9.5.1",
pages.json
@@ -628,158 +628,114 @@
        },
        {
            "path": "pages/shengchanlingliaoshengdan/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产领料",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shengchanlingliaoshengdan/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产领料单"
            }
        },
        {
            "path": "pages/weiwailingliao/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "委外领料",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/weiwailingliao/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "委外领料单"
            }
        },
        {
            "path": "pages/shengchanrukushengdan/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产入库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shengchanrukushengdan/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产入库单"
            }
        },
        {
            "path": "pages/shengchanbuliao/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产补料",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/shengchanbuliao/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "生产补料单"
            }
        },
        {
            "path": "pages/qitaruku_v2/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "其他入库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/qitaruku_v2/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "其他入库单"
            }
        },
        {
            "path": "pages/qitachuku_v2/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "其他出库",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/qitachuku_v2/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "其他出库单"
            }
        },
        {
            "path": "pages/zhijiediaobo/table",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "直接调拨",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/zhijiediaobo/form",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "直接调拨单"
            }
        },
        {
            "path": "pages/xiugaimima/index",
            "style": {
            "style" :
            {
                "navigationBarTitleText": "修改密码"
            }
        }, {
            "path": "pages/jishikucunchaxun/table",
            "style": {
                "navigationBarTitleText": "ERP及时库存查询"
                // "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/weiwairuku/table",
            "style": {
                "navigationBarTitleText": "委外入库"
            }
        },
        {
            "path": "pages/weiwairuku/form",
            "style": {
                "navigationBarTitleText": "委外入库单"
            }
        },
        {
            "path": "pages/tiaomaguanli/table",
            "style": {
                "navigationBarTitleText": "条码管理"
            }
        },
        {
            "path": "pages/tiaomaguanli/table_son",
            "style": {
                "navigationBarTitleText": "条码生成"
            }
        },
        {
            "path" : "pages/huanyangdan/table",
            "style" :
            {
                "navigationBarTitleText" : "还样单维护"
            }
        },
        {
            "path" : "pages/huanyangdan/form",
            "style" :
            {
                "navigationBarTitleText" : "还样单"
            }
        },
        {
            "path" : "pages/quyangdan/table",
            "style" :
            {
                "navigationBarTitleText" : "取样单维护"
            }
        },
        {
            "path" : "pages/quyangdan/form",
            "style" :
            {
                "navigationBarTitleText" : "取样单"
            }
        }
    ],
pages/quyangdan/table.vue
@@ -1,21 +1,135 @@
<template>
    <view>
        <view class="page-header"></view>
        <view class="page-header">
            <view class="search-item">
                <view class="left">日期间隔</view>
                <view class="right">
                    <picker mode="selector" :value="curDateGap" :range="dateRangePicker"
                        @change="onDateRangePickerChangeHandler">
                        <input disabled v-model="curDateGap" placeholder="请选择日期间隔" />
                        <view class="picker-overlay"></view>
                    </picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">开始日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="startDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">
                            <text>{{ startDate }}</text>
                        </view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">结束日期</view>
                <view class="right">
                    <uni-datetime-picker :clear-icon="false" type="date" v-model="endDate"
                        :disabled="!enableCustomDateRange">
                        <view class="datetime-picker-inner"
                            :class="enableCustomDateRange?'font__enable':'font__disable'">{{ endDate }}</view>
                    </uni-datetime-picker>
                </view>
            </view>
            <view class="search-item">
                <view class="left">单据号</view>
                <view class="right">
                    <input type="text" auto-focus v-model="HBillNo" />
                </view>
            </view>
            <view class="button-groups">
                <button type="default" size="mini" class="btn-c" @tap.stop="onSearchClickHandler">查询</button>
                <button type="default" size="mini" class="btn-a" @tap.stop="onResetClickHandler">重置</button>
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <scroll-view class="page-content">
            <view class="over" v-if="listData.length == 0">暂无数据</view>
        </scroll-view>
        <!-- 分页器 -->
        <view class="page-footer"></view>
        <view class="page-footer">
            <uni-pagination id="#pagination" title="标题文字" v-model="pageMeta.curPage" :pageSize="pageMeta.size"
                :total="pageMeta.total"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import dayjs from 'dayjs'
    import {
        CommonUtils
    } from '@/utils/common.js'
    import {
        getUserInfo
    } from '../../utils/auth'
    export default {
        data() {
            return {
                // 分页控制
                pageMeta: {
                    curPage: 1,
                    size: 50,
                    total: 0,
                },
                // 滚动控制
                scrollTop: 0,
                old: {
                    scrollTop: 0
                },
                dateRangePicker: ["任意间隔", "今天", "近两天", "近三天",
                    "近四天", "近五天", "近六天", "近七天", "近30天"
                ],
                curDateGap: "近七天",
                enableCustomDateRange: false,
                startDate: dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD'),
                endDate: dayjs(new Date()).format('YYYY-MM-DD'),
                HBillNo: '',
                listData: [],
            }
        },
        computed: {
            dateSwhere: {
                get() {
                    let date = new Date()
                    switch (this.curDateGap) {
                        case "今天":
                            return ` and 日期 between convert(date, ${date.toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近一天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 1).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近两天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 2).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近三天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 3).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近四天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 4).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近五天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 5).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近六天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 6).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近七天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 7).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "近30天":
                            return ` and 日期 between convert(date, ${date.setDate(date.getDate() - 30).toLocaleDateString()}, 110) and convert(date, ${date.toLocaleDateString()}, 110)`;
                            break;
                        case "任意间隔":
                            return ` and 日期 between convert(date, ${date.setDate(this.startDate).toLocaleDateString()}, 110) and convert(date, ${date.setDate(this.startDate).toLocaleDateString()}, 110)`;
                            break;
                    }
                }
            }
        },
@@ -26,11 +140,172 @@
                this.$nextTick(function() {
                    this.scrollTop = 0
                });
            },
            onDateRangePickerChangeHandler({
                detail
            }) {
                this.enableCustomDateRange = false
                this.curDateGap = this.dateRangePicker[detail.value]
                let date = new Date()
                switch (this.curDateGap) {
                    case "今天":
                        this.startDate = dayjs(date).format("YYYY-MM-DD")
                        break;
                    case "近一天":
                        this.startDate = dayjs(date).subtract(1, 'day').format("YYYY-MM-DD")
                        break;
                    case "近两天":
                        this.startDate = dayjs(date).subtract(2, 'day').format("YYYY-MM-DD")
                        break;
                    case "近三天":
                        this.startDate = dayjs(date).subtract(3, 'day').format("YYYY-MM-DD")
                        break;
                    case "近四天":
                        this.startDate = dayjs(date).subtract(4, 'day').format("YYYY-MM-DD")
                        break;
                    case "近五天":
                        this.startDate = dayjs(date).subtract(5, 'day').format("YYYY-MM-DD")
                        break;
                    case "近六天":
                        this.startDate = dayjs(date).subtract(6, 'day').format("YYYY-MM-DD")
                        break;
                    case "近七天":
                        this.startDate = dayjs(date).subtract(7, 'day').format("YYYY-MM-DD")
                        break;
                    case "近30天":
                        this.startDate = dayjs(date).subtract(30, 'day').format("YYYY-MM-DD")
                        break;
            }
                if (this.curDateGap == '任意间隔') {
                    this.enableCustomDateRange = true
        }
            },
            onSearchClickHandler() {
                let sWhere = ''
                if (this.startDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.startDate + "'";
                }
                if (this.endDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + this.endDate + "'";
                }
                if (this.HBillNo) {
                    sWhere += " and 单据号 like '%" + this.HBillNo + "%'";
                }
                this.get_DisplayPage(sWhere);
            },
            onResetClickHandler() {
            },
            get_DisplayPage(sWhere) {
                CommonUtils.doRequest2({
                    url: '/QC_TakeSampleCheckBill/getQC_TakeSampleCheckBillListPage',
                    data: {
                        "sWhere": sWhere,
                        "user": getUserInfo()["Czymc"],
                        "page": 1,
                        "size": 50
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            Message,
                            count
                        } = res.data
                        console.log('res.data: ', res.data);
                        this.listData = data;
                        this.pageMeta.total = count
                    }
                })
            }
        },
    }
</script>
<style>
<style lang="scss">
    .page-header {
        display: flex;
        box-sizing: border-box;
        padding: 20rpx;
        flex-direction: column;
        gap: 10rpx;
        font-size: 32rpx;
        .search-item {
            display: flex;
            flex-direction: row;
            gap: 10rpx;
            justify-content: center;
            align-items: center;
            .left {
                width: 4em;
            }
            .right {
                flex: 1;
                position: relative;
                border-radius: 22rpx;
                border: 1px solid #acacac;
                display: flex;
                padding: 4rpx 10rpx;
                picker {
                    width: 100%;
                }
            }
        }
        input {
            width: inherit;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
        .datetime-picker-inner {
            padding: 8rpx 20rpx;
            font-size: 30rpx;
            display: flex;
            align-items: center;
        }
        .font__enable {
            color: #000;
        }
        .font__disable {
            color: #cccccc;
        }
    }
    .button-groups {
        box-sizing: border-box;
        padding: 10rpx 0 0 0;
        display: flex;
        flex-direction: row;
        gap: 10rpx;
        justify-content: space-between;
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    .page-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 32rpx 10rpx;
    }
</style>
pages/tiaomachaima/tiaomachaima2.vue
@@ -140,8 +140,7 @@
            return {
                CommonUtils,
                userInfo: getUserInfo(),
                serverUrl: 'http://192.168.2.227:8082/API',
                // serverUrl: 'http://47.96.97.237/API/',
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                barCodeInfoMeta: {
                    barCodeNo: "",
                    splitNum: "",
@@ -263,13 +262,12 @@
                        title: '拆分数量不能大于条码原数量!'
                    });
                }
                uni.request({
                    url: this.serverUrl + '/Sc_BarCode/SplitBarCode_Sub',
                    data: {
                this.doRequest(
                    "/Sc_BarCode/SplitBarCode_Sub",
                    {
                        HBarCodeNo: this.barCodeInfoMeta.barCodeNo,
                    },
                    success: (res) => {
                    (res) => {
                        this.barCodeSplitInfo = []
                        if (res.data.count > 0) {
@@ -281,13 +279,14 @@
                            }
                            //拆分条码:数量为 splitNum
                            // let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0]));
                            let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0]));
                            let HSplitNum = this.barCodeInfoMeta.splitNum;
                            let HBarCode = res.data.data.NextBarCode;
                            console.log('HBarCode: ',HBarCode);
                            this.barCodeSplitInfo.push({
                                HSplitNum: this.barCodeInfoMeta.splitNum,
                                HBarCode: res.data.data.NextBarCode
                                HBarCode: res.data.data.NextBarCode,
                                HNumber: barCodeItem1.HNumber,
                                HName: barCodeItem1.HName,
                                HModel: barCodeItem1.HModel
                            });
                            //更新原先条码数量
@@ -301,51 +300,10 @@
                            });
                        }
                    },
                    fail: (err) => {
                    (err) => {
                        console.error(err)
                    }
                })
                // this.doRequest(
                //     "/Sc_BarCode/SplitBarCode_Sub",
                //     {
                //         HBarCodeNo: this.barCodeInfoMeta.barCodeNo,
                //     },
                //     (res) => {
                //         this.barCodeSplitInfo = []
                //         if (res.data.count > 0) {
                //             if (res.data.data.length < 1) {
                //                 return uni.showToast({
                //                     icon: 'none',
                //                     title: Message
                //                 });
                //             }
                //             //拆分条码:数量为 splitNum
                //             let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0]));
                //             HSplitNum = this.barCodeInfoMeta.splitNum;
                //             HBarCode = res.data.NextBarCode;
                //             this.barCodeSplitInfo.push({
                //                 HSplitNum: this.barCodeInfoMeta.splitNum,
                //                 HBarCode: res.data.NextBarCode
                //             });
                //             //更新原先条码数量
                //             this.barCodeInfo['剩余数量'] = this.barCodeInfo['数量'] - this.barCodeInfoMeta.splitNum;
                //             this.cantGenerate = false;
                //         } else {
                //             uni.showToast({
                //                 icon: 'none',
                //                 title: '没有找到对应的单据'
                //             });
                //         }
                //     },
                //     (err) => {
                //         console.error(err)
                //     }
                // )
                )
            },
            //保存方法
            SaveBarCodeCreate() {