chenhaozhe
2025-10-11 98b5b5c37767713e46b99632a6786698fbc81445
注释冲突代码
6个文件已修改
232 ■■■■ 已修改文件
.hbuilderx/launch.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigoutuiliao/form.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomaguanli/table.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zutuosaoma/form.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/common.js 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.hbuilderx/launch.json
@@ -25,7 +25,7 @@
            "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
            "openVueDevtools" : true,
            "packageName" : "com.shebeiguanli.www",
            "playground" : "standard",
            "playground" : "custom",
            "type" : "uni-app:app-android"
        }
    ]
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "1.0.93",
    "versionCode" : 193,
    "versionName" : "1.0.94",
    "versionCode" : 194,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages/caigoutuiliao/form.vue
@@ -244,7 +244,9 @@
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
        <BillSelectPopupXiaoWeiVue v-if="enableModule == 1" ref="billList" :HBillType="hform.HBillType"
            :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></BillSelectPopupXiaoWeiVue>
        <BillListPopupVue v-else-if="enableModule == 2" ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
            :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
        <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
    </view>
@@ -262,11 +264,14 @@
    } from '../../utils/userRelationManager';
    import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
    import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue";
    import BillSelectPopupXiaoWeiVue from '../../components/BillSelectPopupXiaoWei/BillSelectPopupXiaoWei.vue';
    export default {
        components: {
            BillListPopupVue,
            BarCodePopupVue
            BarCodePopupVue,
            BillSelectPopupXiaoWeiVue
        },
        data() {
            return {
                HSourceBillNoFocus: false,
@@ -355,6 +360,20 @@
            }
        },
        computed: {
            enableModule: {
                get() {
                    if (this.hform.HMainSourceBillType == 1201 &&
                        /小卫|智云/.test(uni.getStorageSync('Organization'))
                    ) {
                        return 1
                    } else {
                        return 2
                    }
                }
                // 其他条件
            },
            HStockPlaceNameListComputed: {
                get() {
                    // 动态计算对应仓库的仓位
pages/tiaomaguanli/table.vue
@@ -146,6 +146,13 @@
                            console.log('扫码返回', res.data.data);
                            this.HBarCode = ''
                            if (res.data.count == 1) {
                                if(res.data.data.length < 1) {
                                     this.playSound(0)
                                     return uni.showToast({
                                         title: '该单据号对应的单据不存在!',
                                         icon: 'none'
                                     })
                                }
                                this.playSound(1)
                                var data = res.data.data
                                this.baseInfo = {
pages/zutuosaoma/form.vue
@@ -80,6 +80,14 @@
                    </view>
                </view>
            </view>
            <view class="bill-info">
                <checkbox-group @change="checkboxGroupChangeHandler">
                <view class="form-item" style="justify-content: right;">
                    <view class="title">质量审批</view>
                    <checkbox value="qualityApproval"></checkbox>
                </view>
                </checkbox-group>
            </view>
        </view>
        <view class="bottom-btn" id="bottom-btn">
            <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini" @tap="cmdSubmit">提交</button>
@@ -173,6 +181,8 @@
                    HInterID: '',
                    HStockOrgName: uni.getStorageSync("Organization"),
                    HStockOrgID: uni.getStorageSync("OrganizationID"),
                    HQualityApproval: false,
                },
                // 分页模块元数据
                paginationMeta: {
@@ -181,6 +191,14 @@
            }
        },
        methods: {
            checkboxGroupChangeHandler(e) {
                let checkBoxValues = Array.from(e.detail.value)
                if(checkBoxValues.findIndex(elem => elem == 'qualityApproval') != -1) {
                    this.hform.HQualityApproval = true
                }else {
                    this.hform.HQualityApproval = false
                }
            },
            onTableRowClickHandler(row, index) {
                console.log('row: ',row);
                if(!this.listData[index].checked){
utils/common.js
@@ -1,19 +1,20 @@
class commonUtils {
    serverUrl
    audioContext // 全局音频实例
    constructor() {
        this.serverUrl = uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/';
        this.audioContext = null;
    }
    setServerUrl(url) {
        this.serverUrl = url
    }
    getServerUrl() {
        return this.serverUrl
    }
    // 防抖函数
    debounce(func, delay, immediate = false) {
@@ -245,60 +246,67 @@
            }
        })
    }
    doRequest2({url, data, resFunction, errFunction,method, that}){
        that = that || this;
        let errorTip = null;
        uni.showLoading({
            title: '加载中...'
        })
        uni.request({
            method: method || "GET",
            url: this.serverUrl + url,
            data: data || "",
            success: (res) => {
                if (typeof resFunction === 'function') {
                    resFunction.call(that, res)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问成功回调函数类型不为函数或者空!")
                }
            },
            fail: (err) => {
                console.error(err)
                errorTip = () => {
                    uni.showToast({
                        icon: "none",
                        title: err.errMsg || err.data.message || "接口异常!",
                        duration: 2000
                    })
                }
                if (typeof errFunction === 'function') {
                    errFunction.call(that, err)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问失败回调函数类型不为函数或者空!")
                }
            },
            complete: () => {
                setTimeout(() => {
                    uni.hideLoading()
                    if (errorTip != null) {
                        errorTip()
                    }
                }, 1000)
            }
        })
    }
    stringToBoolean(str) {
      // 忽略大小写的转换
      return str?.toLowerCase() === "true";
    }
    doRequest2({
        url,
        data,
        resFunction,
        errFunction,
        method,
        that
    }) {
        that = that || this;
        let errorTip = null;
        uni.showLoading({
            title: '加载中...'
        })
        uni.request({
            method: method || "GET",
            url: this.serverUrl + url,
            data: data || "",
            success: (res) => {
                if (typeof resFunction === 'function') {
                    resFunction.call(that, res)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问成功回调函数类型不为函数或者空!")
                }
            },
            fail: (err) => {
                console.error(err)
                errorTip = () => {
                    uni.showToast({
                        icon: "none",
                        title: err.errMsg || err.data.message || "接口异常!",
                        duration: 2000
                    })
                }
                if (typeof errFunction === 'function') {
                    errFunction.call(that, err)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问失败回调函数类型不为函数或者空!")
                }
            },
            complete: () => {
                setTimeout(() => {
                    uni.hideLoading()
                    if (errorTip != null) {
                        errorTip()
                    }
                }, 1000)
            }
        })
    }
    stringToBoolean(str) {
        // 忽略大小写的转换
        return str?.toLowerCase() === "true";
    }
    // uni-app 播放音频封装
    playSound(e) {
@@ -309,13 +317,57 @@
            innerAudioContext.src = '/static/jingbao.wav';
        }
        innerAudioContext.play(); // 播放音频
        innerAudioContext.onPlay(() => {
            console.log('开始播放');
        });
        innerAudioContext.onError((res) => {
            console.log(res.errMsg);
            console.log(res.errCode);
        });
        innerAudioContext.onPause(function() {
            console.log('播放出现错误,销毁');
            innerAudioContext.destroy();
        })
    }
    // playSound(e) {
    //     // 全局维护一个音频实例,防止缓存溢出
    //     if (this.audioContext) {
    //         this.audioContext.destroy();
    //     }
    //     this.audioContext = uni.createInnerAudioContext();
    //     if (e == 1) {
    //         this.audioContext.src = '/static/success.wav';
    //     } else {
    //         this.audioContext.src = '/static/jingbao.wav';
    //     }
    //     this.audioContext.play(); // 播放音频
    //
    //     // 播放结束后销毁实例
    //     this.audioContext.onEnded(() => {
    //         this.audioContext.destroy();
    //         this.audioContext = null;
    //     });
    //
    //     // 错误处理
    //     this.audioContext.onError((err) => {
    //         uni.showToast({
    //             icon: 'none',
    //             title: `音频播放错误: ${err}`
    //         })
    //
    //         this.audioContext.destroy();
    //         this.audioContext = null;
    //     });
    // }
    replaceWithFunction(str, handler) {
      return str.replace(/\{(.+?)\}/g, (match, key) => {
        // 调用处理函数,传入匹配到的键
        return handler(key, match);
      });
        return str.replace(/\{(.+?)\}/g, (match, key) => {
            // 调用处理函数,传入匹配到的键
            return handler(key, match);
        });
    }
}