chenhaozhe
2025-09-01 5a5811e85ae92a93319fbd5b1fa7f6bdd3aac336
添加 记录当前提交保存 单据 次数,单号,时间 请求函数
3个文件已修改
95 ■■■■ 已修改文件
pages/caigouruku/form.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomaguanli/table_son.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/xiaoshouchuku/form.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigouruku/form.vue
@@ -274,6 +274,10 @@
                HPageTitle: '采购入库单',
                materMeta: [
                ],
                showHStockPlaceName: false,
                showHMainSourceBillType: true,
                showHSourceBillNo: true,
@@ -1077,6 +1081,7 @@
                                    this.showHSupName = false
                                    this.tabs = 2
                                } else { //物料条码
                                    this.materMeta.push(data)
                                    this.tabs = 2
                                    if (!this.hform.HSourceBillNo) {
                                        this.hform.HSupName = data.hSupNameField
@@ -1156,6 +1161,7 @@
                        console.log('物料', res.data)
                        if (res.data.count == 1) {
                            var data = res.data.data
                            this.materMeta = data.BarCodeDetailslist
                            this.Materlist = data.Materlist
                            if (!data.BarCodeDetailslist[0].HBarCode) {
                                this.hform.HMaterName_B = ''
@@ -1389,10 +1395,14 @@
                            data: {
                                oMain: sMainStr
                            },
                            success: (res) => {
                            success: async (res) => {
                                console.log(1, res);
                                uni.hideLoading()
                                if (res.data.count == 1) {
                                    let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HBillNo
                                    try {
                                        // 为条码设置出库单号和出库次数
                                        await this.Set_BarCodeBill(sMain)
                                    uni.showModal({
                                        title: '提示',
                                        content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
@@ -1410,6 +1420,14 @@
                                            }
                                        }
                                    });
                                    }catch(err) {
                                        uni.showToast({
                                            title: err,
                                            icon: 'none'
                                        })
                                    }
                                } else {
                                    uni.showToast({
                                        title: res.data.Message,
@@ -1432,7 +1450,25 @@
            showBillList() {
                this.$refs.billList.showPopup()
            },
            Set_BarCodeBill(sMain) {
                return new Promise((resolve, reject) => {
                    CommonUtils.doRequest2({
                        method: 'POST',
                        url: 'Sc_BarCode/Set_BarCodeBill',
                        data: {
                            msg: sMain
                        },
                        resFunction: (res) => {
                            let {data, count, Message} = res.data
                            if(count == 1) {
                                resolve()
                            }else {
                                reject(Message)
                            }
                        }
                    })
                })
            },
            goBack() {
                uni.showModal({
                    title: '提示',
pages/tiaomaguanli/table_son.vue
@@ -328,7 +328,7 @@
                //获取选择的源单类型
                var HSourceBillType = "收料通知单";
                //获取选择的条码类型
                var HSelectBarCodeType = "品种条码";
                var HSelectBarCodeType = "唯一条码";
                //获取当前登录人员
                var UserName = uni.getStorageSync('HUserName');
                let listDataTemp = []
pages/xiaoshouchuku/form.vue
@@ -285,10 +285,10 @@
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
        <PushSeOutStockBillPopupVue v-if="enableModule == 1" ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
            :HStockOrgID="hform.HStockOrgID"></PushSeOutStockBillPopupVue>
        <BillListPopupVue v-else-if="enableModule == 2" ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
            :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
        <PushSeOutStockBillPopupVue v-if="enableModule == 1" ref="billList" :HBillType="hform.HBillType"
            :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></PushSeOutStockBillPopupVue>
        <BillListPopupVue v-else-if="enableModule == 2" ref="billList" :HBillType="hform.HBillType"
            :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
    </view>
</template>
<script>
@@ -301,6 +301,9 @@
    import {
        getUserStockRelation
    } from '../../utils/userRelationManager';
    import {
        CommonUtils
    } from '../../utils/common';
    export default {
        data() {
            return {
@@ -318,6 +321,9 @@
                showHSupName: true,
                BarCodeFocus: false,
                HSourceBillNoFocus: false,
                materMeta: [
                ],
                tabs: 0,
                HMainSourceBillType: '发货通知单',
@@ -1101,6 +1107,7 @@
                                    this.showHSupName = false
                                    this.tabs = 2
                                } else { //物料条码
                                    this.materMeta.push(data)
                                    this.tabs = 2
                                    if (!this.hform.HSourceBillNo) {
                                        this.hform.HSupName = data.hSupNameField
@@ -1180,6 +1187,7 @@
                        console.log('物料', res.data)
                        if (res.data.count == 1) {
                            var data = res.data.data
                            this.materMeta = data.BarCodeDetailslist
                            this.Materlist = data.Materlist
                            if (data.FIFOlist.length != 0) {
                                if (data.FIFOlist[0].HMaterID != 0) {
@@ -1410,10 +1418,13 @@
                            data: {
                                oMain: sMainStr
                            },
                            success: (res) => {
                            success: async (res) => {
                                console.log(1, res);
                                uni.hideLoading()
                                if (res.data.count == 1) {
                                    let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HBillNo
                                    try {
                                        await this.Set_BarCodeBill(sMain)
                                    uni.showModal({
                                        title: '提示',
                                        content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
@@ -1427,10 +1438,16 @@
                                                console.log('用户点击取消');
                                                setTimeout(() => {
                                                    uni.navigateBack();
                                                }, 500)
                                                    }, 50)
                                            }
                                        }
                                    });
                                    } catch(e) {
                                        uni.showToast({
                                            title: e,
                                            icon: 'none'
                                        })
                                    }
                                } else {
                                    uni.showToast({
                                        title: res.data.Message,
@@ -1449,7 +1466,29 @@
                    }
                }
            },
            Set_BarCodeBill(sMain) {
                return new Promise((resolve, reject) => {
                    CommonUtils.doRequest2({
                        method: 'POST',
                        url: 'Sc_BarCode/Set_BarCodeBill',
                        data: {
                            msg: sMain
                        },
                        resFunction: (res) => {
                            let {
                                data,
                                count,
                                Message
                            } = res.data
                            if (count == 1) {
                                resolve()
                            } else {
                                reject(Message)
                            }
                        }
                    })
                })
            },
            goBack() {
                uni.showModal({
                    title: '提示',