wtt
2026-02-02 657b67ff21e0389b75aea7ee547aec2fbcb35bf3
pages/fenbushidiaorudan/form_test.vue
@@ -168,7 +168,7 @@
            <view v-if="tabs == 2">
                <view class="list" v-for="(item,index) in Materlist" :key="index">
                    <uni-card :title="item.物料名称" :extra="item.物料代码" style="margin: 10px;"
                        @tap="showMaterialDetail(item)">
                        @tap="delMater(item)">
                        <view class="card-detail">
                            <view class="detail">
                                <text>源单单号:</text>{{item.源单单号}}
@@ -420,6 +420,8 @@
                    HSPName_B: '',
                    HSCWHName_B: '',
                    HSCSPName_B: '',
                    HSourceFlag: false,
                }
            }
        },
@@ -488,6 +490,47 @@
            }
        },
        methods: {
            //删除物料码
            delMater(item) {
                uni.showModal({
                    title: '提示',
                    content: '确认要删除 " ' + item.物料名称 + ' " 所有扫码记录?删除后将不可恢复!',
                    success: (res) => {
                        if (res.confirm) {
                            uni.request({
                                url: this.serverUrl +
                                    '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
                                data: {
                                    HInterID: this.hform.HInterID,
                                    HMaterID: item.HMaterID,
                                    HAuxPropID: item.HAuxPropID,
                                    HMTONo: item.HMTONo,
                                    HSourceInterID: item.HSourceInterID,
                                    HSourceEntryID: item.HSourceEntryID,
                                    HBillType: this.hform.HBillType
                                },
                                success: (res) => {
                                    if (res.data.count == 1) {
                                        this.DisBillEntryList()
                                    } else {
                                        uni.showToast({
                                            title: res.data.Message,
                                            icon: 'none'
                                        })
                                    }
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.showToast({
                                        title: '接口请求失败',
                                        icon: 'none'
                                    })
                                },
                            });
                        }
                    }
                });
            },
            // 用户模块权限判断
            async checkModRight() {
                try {
@@ -609,7 +652,7 @@
                if (!this.hform.HOutStockPlaceName) this.hform.HOutStockPlaceID = 0
                const sHQty = this.hform.HQty || 0
                const HSourceFlag = !!this.hform.HSourceBillNo
                const HSourceFlag = this.hform.HSourceFlag
                try {
                    console.log('开始处理条码:', sBarCode, sHQty, HSourceFlag, this.hform);
@@ -719,6 +762,8 @@
            // 设置源单信息
            async setSourceBillInfo(data) {
                this.hform.HSourceFlag = true
                return
                if (data.hDeptIDField != 0) {
                    this.hform.HDeptID = data.hDeptIDField
                    this.hform.HDeptName = data.hDeptNameField
@@ -746,12 +791,16 @@
                // 更新组织显示
                const inOrgIndex = this.arrayHOrgValue.findIndex(e => e == data.hStockInOrgIDField)
                const outOrgIndex = this.arrayHOrgValue.findIndex(e => e == data.hStockOutOrgIDField)
                if (inOrgIndex !== -1) {
                    this.hform.HStockInOrgName = this.arrayHOrgName[inOrgIndex]
                }
                if (outOrgIndex !== -1) {
                    this.hform.HStockOutOrgName = this.arrayHOrgName[outOrgIndex]
                }
                console.log('HStockInOrgName: ',this.hform.HStockInOrgName);
                console.log('HStockOutOrgName: ',this.hform.HStockOutOrgName);
                // 如果组织发生变化,清空仓库仓位
                if (this.hform.HStockInOrgID != uni.getStorageSync('OrganizationID')) {
@@ -947,6 +996,7 @@
                    })
                    if (res.data.count == 1) {
                        this.hform.HSourceFlag = true
                        CommonUtils.playSound(1)
                        await this.setSourceBillInfo(res.data.data)
                        this.tabs = 2
@@ -1348,6 +1398,7 @@
                            }
                            this.tabs = 2
                            this.hform.HSourceFlag = true
                            this.DisBillEntryList()
                        }
                    }
@@ -1357,7 +1408,7 @@
            // 新增单据
            addNew() {
                uni.redirectTo({
                    url: '/pages/fenbushidiaoru/form?OperationType=1'
                    url: '/pages/fenbushidiaorudan/form_test?OperationType=1'
                })
            },
@@ -1514,6 +1565,10 @@
            border: 1px solid #acacac;
            position: relative;
            display: flex;
            .uni-combox {
                width: 100%;
            }
        }
        .righton {