chenhaozhe
2025-07-14 b6c21a6f18bb5b0da6de8dd67a924be14dfe506b
完成 来料条码打印模块 添加 采购订单模块 完成 采购订单模块 修改
2个文件已添加
5个文件已修改
991 ■■■■■ 已修改文件
components/blueToothConnector/blueToothConnector.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigoudingdan/caigoudingdan.vue 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigoudingdan/generate.vue 483 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomadaying/tiaomadaying.vue 223 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/svgs/folder_bg.svg 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/blueToothConnector/blueToothConnector.vue
@@ -23,6 +23,7 @@
                <uni-card :title="device.name" :extra="connectedDeviceId === device.address?'已连接':'未连接'"
                    style="margin: 10px;">
                    <view class="operation-zone">
                        <view></view>
                        <button class="op1" size="mini" plain @click="connectBT(device)">连接设备</button>
                    </view>
                </uni-card>
@@ -314,9 +315,17 @@
    .operation-zone {
        display: flex;
        justify-content: space-around;
        margin-top: 10rpx;
        justify-content: flex-end;
        padding: 10rpx;
        >view {
            flex: 1;
        }
        >button{
            display: inline-block;
            width: 6rem;
        }
        .op1 {
            border: 1px solid #41a863;
            color: #41a863;
pages.json
@@ -462,6 +462,20 @@
                    "style": {
                        "navigationBarTitleText": "来料条码打印"
                    }
                },
                {
                    "path" : "pages/caigoudingdan/caigoudingdan",
                    "style" :
                    {
                        "navigationBarTitleText" : "采购订单"
                    }
                },
                {
                    "path" : "pages/caigoudingdan/generate",
                    "style" :
                    {
                        "navigationBarTitleText" : "条码生成"
                    }
                }
    ],
    "tabBar": {
pages/caigoudingdan/caigoudingdan.vue
New file
@@ -0,0 +1,246 @@
<template>
    <view class="content">
        <view class="form">
            <view class="form-item">
                <view class="title"><text>*</text>条码:</view>
                <view class="right" style="width: 380rpx;">
                    <input v-model="HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(HBarCode)" />
                </view>
                <uni-icons type="scan"
                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                    size="20" @click="toScanCode"></uni-icons>
            </view>
            <view class="form-item">
                <view class="title">单据号:</view>
                <view class="righton">
                    <input v-model="baseInfo.HBillNo" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">供应商:</view>
                <view class="righton">
                    <input v-model="baseInfo.HSupName" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">部门:</view>
                <view class="righton">
                    <input v-model="baseInfo.HDeptName" disabled />
                </view>
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
            <uni-card :title="item.物料代码" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
                <view class="card-detail">
                    <view class="detail">
                        <text>物料名称:</text>{{item.物料名称}}
                    </view>
                    <view class="detail">
                        <text>规格型号:</text>{{item.规格型号}}
                    </view>
                    <view class="detail">
                        <text>订单数量:</text>{{item.数量}}
                    </view>
                </view>
            </uni-card>
        </view>
        <view class="over" v-if="listData.length == 0">暂无数据</view>
        <view class="over" v-if="listData.length != 0">已到底</view>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import {
        CommonUtils
    } from "../../utils/common";
    export default {
        data() {
            return {
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                HBarCode: '',
                baseInfo: {
                    HBillNo: '',
                    HSupName: '',
                    HDeptName: '',
                    HInterID: '',
                },
                sWhere: '',
                listData: [],
            }
        },
        onLoad() {},
        methods: {
            //扫码
            toScanCode() {
                uni.scanCode({
                    onlyFromCamera: true,
                    success: (res) => {
                        console.log('条码内容:' + res.result);
                        this.HBarCode = res.result
                        this.getCode(this.HBarCode)
                    }
                });
            },
            //扫条码处理
            getCode(HBarCode) {
                if (!HBarCode) {
                    uni.showToast({
                        title: '条码不能为空',
                        icon: 'none'
                    })
                } else {
                    CommonUtils.doRequest(
                        "/Cg_POOrderBill/list", {
                            sWhere: ` and 单据号 = '${HBarCode}'`,
                            user: this.userInfo.Czymc
                        },
                        (res) => {
                            console.log('采购订单: ', res)
                            let {data, count} = res.data
                            if(count > 0){
                                this.baseInfo = {
                                    HBillNo: data[0].单据号,
                                    HSupName: data[0].供应商,
                                    HDeptName: data[0].部门,
                                    HInterID: data[0].hmainid,
                                }
                                this.listData = data
                            } else {
                                uni.showToast({
                                    title: res.data.Message,
                                    icon: 'none'
                                })
                            }
                        }
                    )
                }
            },
            toSon(item) {
                uni.navigateTo({
                    url: `./generate?OperationType=1&closeType=1&linterid=${this.baseInfo.HInterID}&hmaterid=${item["HMaterID"]}`
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 640rpx;
        margin: 20rpx auto;
    }
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title {
            width: 180rpx;
            text {
                color: red;
                font-weight: bold;
            }
        }
        .right {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input {
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    .list {
        width: 100%;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail {
                // width: 50%;
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                margin-right: 20rpx;
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
        }
        .more {
            color: #888;
            font-size: 24rpx;
            display: flex;
            border-top: 1px solid #eee;
            padding-top: 20rpx;
            .part {
                width: 50%;
                text-align: center;
            }
        }
    }
</style>
pages/caigoudingdan/generate.vue
New file
@@ -0,0 +1,483 @@
<template>
    <view class="content">
        <view class="form">
            <view class="form-item">
                <view class="title">物料编码:</view>
                <view class="righton">
                    <input v-model="baseInfo.HMaterNumber" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">物料名称:</view>
                <view class="righton">
                    <input v-model="baseInfo.HMaterName" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">规格型号:</view>
                <view class="righton">
                    <input v-model="baseInfo.HMaterModel" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">批次:</view>
                <view class="righton">
                    <input v-model="baseInfo.HBatchNo" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">收料数量:</view>
                <view class="righton">
                    <input v-model="baseInfo.HQty" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">MTO号:</view>
                <view class="righton">
                    <input v-model="baseInfo.HMTONo" disabled />
                </view>
            </view>
            <view class="form-item">
                <view class="title">每箱数量:</view>
                <view class="right">
                    <input v-model="baseInfo.HMinQty" type="number" placeholder="请输入数量" @confirm="getNum()"
                        @blur="getNum()" />
                </view>
            </view>
            <view class="buttons">
                <button class="btn-b" size="mini" type="default" @tap="getList()">条码生成</button>
                <button class="btn-c" size="mini" type="default" @tap="search">打印</button>
            </view>
        </view>
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
            <uni-card :title="item.物料代码" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
                <view class="card-detail">
                    <view class="detail">
                        <text>物料名称:</text>{{item.物料名称}}
                    </view>
                    <view class="detail">
                        <text>规格型号:</text>{{item.规格型号}}
                    </view>
                    <view class="detail">
                        <text>数量:</text>{{item.数量}}
                    </view>
                    <view class="detail" style="width: 100%;">
                        <text>条码编号:</text>{{item.条码编号}}
                    </view>
                </view>
            </uni-card>
        </view>
        <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
        </labelPrinterComponentVue>
        <view class="over" v-if="listData.length == 0">暂无数据</view>
        <view class="over" v-if="listData.length != 0">已到底</view>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    import {
        CommonUtils
    } from "../../utils/common";
    export default {
        data() {
            return {
                printInfo: "",
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                OperationType: 1, //数据类型  1添加 保存  2复制  3 编辑
                linterid: '',
                HEntryID: '',
                hmaterid: '',
                baseInfo: {
                    HBillNo: '',
                    HMainID: '',
                    HSubID: '',
                    HOrderBillNo: '',
                    HMaterID: '',
                    HMaterNumber: '',
                    HMaterName: '',
                    HMaterModel: '',
                    HQty: '',
                    HMTONo: '',
                    HQty: '',
                    HMinQty: '',
                    HBQty: '',
                },
                sWhere: '',
                listData: [],
            }
        },
        onLoad(e) {
            console.log(e)
            this.OperationType = e.OperationType
            this.linterid = e.linterid
            this.hmaterid = e.hmaterid
            this.getData()
        },
        methods: {
            getData() {
                CommonUtils.doRequest(
                    "/Cg_POOrderBill/list", {
                        sWhere: ` and hmainid = ${this.linterid} and HMaterID  = ${this.hmaterid}`
                        ,user: this.userInfo.Czymc
                    },
                    (res) => {
                        console.log('采购订单: ', res)
                        let {
                            data,
                            count
                        } = res.data
                        if (count > 0) {
                            this.baseInfo = {
                                HMainID: data[0]['hmainid'],
                                HSubID: data[0]['HEntryID'],
                                HBillNo: data[0]['单据号'],
                                HMaterID: data[0]['HMaterID'],
                                HMaterNumber: data[0]['物料代码'],
                                HMaterName: data[0]['物料名称'],
                                HMaterModel: data[0]['规格型号'],
                                HQty: data[0]['数量'],
                                HMTONo: data[0]['计划跟踪号']
                            }
                            this.listData = data
                        } else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    }
                )
            },
            getNum(e) {
                if (this.baseInfo.HMinQty && this.baseInfo.HMinQty > 0) {
                    var a = Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty)
                    this.baseInfo.HBQty = Math.ceil(Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty))
                    this.$forceUpdate()
                } else {
                    uni.showToast({
                        title: '请输入大于0的合理数量',
                        icon: "none"
                    })
                }
            },
            async search() {
                if (this.$printer.isConnected() === false) {
                    this.$refs.labelPrinter.openPopup()
                } else {
                    // this.printInfo = async () => {
                    //     let cpcl = await this.$printer.cpcl().clear()
                    //         .page(new CPage({
                    //             width: 608,
                    //             height: 400
                    //         }))
                    //         .qrcode(new CQRCode({
                    //             x: 500,
                    //             y: 30,
                    //             width: 3,
                    //             content: this.generatedBarCode,
                    //             codeRotation: CCodeRotation.ROTATION_0,
                    //             level: CCorrectLevel.L
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 30,
                    //             content: "供应商: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 80,
                    //             content: "供应商料号: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 130,
                    //             content: "物料编码: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 180,
                    //             content: "物料分组: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 300,
                    //             y: 180,
                    //             content: "规格型号: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 230,
                    //             content: "数量: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 300,
                    //             y: 230,
                    //             content: "日期: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 280,
                    //             content: "检验员: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 300,
                    //             y: 280,
                    //             content: "计划跟踪号: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .text(new CText({
                    //             x: 30,
                    //             y: 330,
                    //             content: "检验结果: ",
                    //             font: CFont.TSS24
                    //         }))
                    //         .box(new CBox({
                    //             topLeftX: 260,
                    //             topLeftY: 320,
                    //             bottomRightX: 280,
                    //             bottomRightY: 340,
                    //             lineWidth: 4,
                    //         }))
                    //         .text(new CText({
                    //             x: 290,
                    //             y: 320,
                    //             content: "合格",
                    //             font: CFont.TSS24
                    //         }))
                    //         .box(new CBox({
                    //             topLeftX: 360,
                    //             topLeftY: 320,
                    //             bottomRightX: 380,
                    //             bottomRightY: 340,
                    //             lineWidth: 4,
                    //         }))
                    //         .text(new CText({
                    //             x: 390,
                    //             y: 320,
                    //             content: "不合格",
                    //             font: CFont.TSS24
                    //         }))
                    //         .box(new CBox({
                    //             topLeftX: 480,
                    //             topLeftY: 320,
                    //             bottomRightX: 500,
                    //             bottomRightY: 340,
                    //             lineWidth: 4,
                    //         }))
                    //         .text(new CText({
                    //             x: 510,
                    //             y: 320,
                    //             content: "特采",
                    //             font: CFont.TSS24
                    //         }))
                    //         .form(new CForm())
                    //         .print();
                    //     console.log(cpcl.command().string())
                    //     return cpcl.command().binary()
                    // }
                    // await this.$nextTick(() => {
                    //     this.$refs.labelPrinter.execPrint()
                    // })
                    this.printInfo = `! 0 200 200 400 1
PAGE-WIDTH 608
SETQRVER 3
B QR 500 30 M 2 U 3
LA,${this.generatedBarCode}
ENDQR
T 24 0 30 30 供应商:
T 24 0 30 80 供应商料号:
T 24 0 30 130 物料编码:
T 24 0 30 180 物料分组:
T 24 0 300 180 规格型号:
T 24 0 30 230 数量:
T 24 0 300 230 日期:
T 24 0 30 280 检验员:
T 24 0 300 280 计划跟踪号:
T 24 0 30 330 检验结果:
BOX 260 330 280 350 4
T 24 0 290 330 合格
BOX 360 330 380 350 4
T 24 0 390 330 不合格
BOX 480 330 500 350 4
T 24 0 510 330 特采
FORM
PRINT`
                    await this.$nextTick(() => {
                        this.$refs.labelPrinter.execPrint()
                    })
                }
            },
            getList() {
                var sMain = []
                sMain[0] = this.baseInfo
                var sMainStr = JSON.stringify(sMain);
                //获取选择的组织
                var HOrgType = uni.getStorageSync('Organization');
                //获取选择的工厂代码
                var CampanyName = "xxx";
                //获取选择的源单类型
                var HSourceBillType = "收料通知单";
                //获取选择的条码类型
                var HSelectBarCodeType = "唯一条码";
                //获取当前登录人员
                var UserName = uni.getStorageSync('HUserName');
                var sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
                    CampanyName + ';' + UserName;
                uni.request({
                    url: this.serverUrl + '/Sc_BarCode/Sub_SaveBill',
                    method: 'POST',
                    data: {
                        msg: sMainSub,
                        CampanyName: CampanyName
                    },
                    success: (res) => {
                        if (res.data.count == 1) {
                            this.listData = res.data.data
                        } else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 640rpx;
        margin: 20rpx auto;
    }
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title {
            width: 180rpx;
            text {
                color: red;
                font-weight: bold;
            }
        }
        .right {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input {
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20rpx;
        button {
            border-radius: 50rpx;
            width: 220rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    .list {
        width: 100%;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            line-height: 120%;
            .detail {
                // width: 50%;
                font-size: 26rpx;
                margin-bottom: 12rpx;
                color: #555;
                margin-right: 20rpx;
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
        }
        .more {
            color: #888;
            font-size: 24rpx;
            display: flex;
            border-top: 1px solid #eee;
            padding-top: 20rpx;
            .part {
                width: 50%;
                text-align: center;
            }
        }
    }
</style>
pages/index/index.vue
@@ -166,9 +166,15 @@
                    },
                    {
                        img: '../../static/icon/icon16.png',
                        text: '条码打印',
                        text: '来料条码打印',
                        url: '/pages/tiaomadaying/tiaomadaying',
                        id: 28,
                    },
                    {
                        img: '../../static/icon/icon16.png',
                        text: '采购订单',
                        url: '/pages/caigoudingdan/caigoudingdan',
                        id: 29,
                    }
                ]
            }
pages/tiaomadaying/tiaomadaying.vue
@@ -1,7 +1,7 @@
<template>
    <view class="container">
        <view class="content">
            <view class="header"></view>
            <view class="header">基本信息</view>
            <view class="items">
                <view class="item">
                    <view class="left">条码编号:</view>
@@ -17,19 +17,19 @@
                <view class="item">
                    <view class="left">源单号:</view>
                    <view class="right">
                        <input name="HSourceBillNo" v-model="lailiaoInfo.HSourceBillNo" />
                        <input name="HBillNo" v-model="lailiaoInfo.HBillNo" />
                    </view>
                </view>
                <view class="item">
                    <view class="left">源单行号:</view>
                    <view class="right">
                        <input name="HSourceBillLineNo" v-model="lailiaoInfo.HSourceBillLineNo" />
                        <input name="HBillLineNo" v-model="lailiaoInfo.HBillLineNo" />
                    </view>
                </view>
                <view class="item">
                    <view class="left">物料编码:</view>
                    <view class="right">
                        <input name="HMaterNo" v-model="lailiaoInfo.HMaterNo" />
                        <input name="HMaterNo" v-model="lailiaoInfo.HMaterNumber" />
                    </view>
                </view>
                <view class="item">
@@ -41,7 +41,7 @@
                <view class="item">
                    <view class="left">规格型号:</view>
                    <view class="right">
                        <input name="HMaterType" v-model="lailiaoInfo.HMaterType" />
                        <input name="HMaterType" v-model="lailiaoInfo.HMaterModel" />
                    </view>
                </view>
                <view class="item">
@@ -77,10 +77,14 @@
            </view>
        </view>
        <view class="operation-zone">
            <button @click="print">打印</button>
            <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
            </labelPrinterComponentVue>
            <button class="btn-c" :disabled="buttonStatus.btn1 == false" @click="GenereateBarCode">生成</button>
            <button class="btn-c" :disabled="buttonStatus.btn2 == false" @click="print">打印</button>
            <view></view>
            <button class="btn-c" @click="setClearLailiaoInfo">新增</button>
            <button class="btn-c" @click="exit">退出</button>
        </view>
        <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
        </labelPrinterComponentVue>
    </view>
</template>
@@ -118,18 +122,30 @@
            return {
                printInfo: "",
                userInfo: getUserInfo(),
                buttonStatus: {
                    btn1: true,
                    btn2: false
                },
                generatedBarCode: '',
                lailiaoInfo: {
                    HMainID:'',
                    HSubID:'',
                    HOrderBillNo:'',
                    HMaterID:'',
                    barCodeNo: '',
                    HSourceBillNo: '',
                    HSourceBillLineNo: '',
                    HMaterNo: '',
                    HBillNo: '',
                    HBillLineNo: '',
                    HMaterNumber: '',
                    HMaterName: '',
                    HMaterType: '',
                    HMaterModel: '',
                    HBatchNo: '',
                    HQty: '',
                    HMTONo: '',
                    HSupName: '',
                    HSupNameShort: ''
                    HSupNameShort: '',
                    HMinQty:'',
                    HBQty:'',
                    HSupID: ''
                }
            };
        },
@@ -151,7 +167,7 @@
                    //             x: 500,
                    //             y: 30,
                    //             width: 3,
                    //             content: "PDDZDA00017106",
                    //             content: this.generatedBarCode,
                    //             codeRotation: CCodeRotation.ROTATION_0,
                    //             level: CCorrectLevel.L
                    //         }))
@@ -267,24 +283,24 @@
PAGE-WIDTH 608
SETQRVER 3
B QR 500 30 M 2 U 3
LA,PDDZDA00017106
LA,${this.generatedBarCode}
ENDQR
T 24 0 30 30 供应商:
T 24 0 30 80 供应商料号:
T 24 0 30 130 物料编码:
T 24 0 30 30 供应商: ${this.lailiaoInfo.HSupName}
T 24 0 30 80 供应商料号:
T 24 0 30 130 物料编码: ${this.lailiaoInfo.HMaterName}
T 24 0 30 180 物料分组: 
T 24 0 300 180 规格型号:
T 24 0 30 230 数量:
T 24 0 300 180 规格型号: ${this.lailiaoInfo.HMaterModel}
T 24 0 30 230 数量:  ${this.lailiaoInfo.HQty}
T 24 0 300 230 日期: 
T 24 0 30 280 检验员: 
T 24 0 300 280 计划跟踪号:
T 24 0 300 280 计划跟踪号: ${this.lailiaoInfo.HMTONo || ''}
T 24 0 30 330 检验结果: 
BOX 260 320 280 340 4
T 24 0 290 320 合格
BOX 360 320 380 340 4
T 24 0 390 320 不合格
BOX 480 320 500 340 4W
T 24 0 510 320 特采
BOX 260 330 280 350 4
T 24 0 290 330 合格
BOX 360 330 380 350 4
T 24 0 390 330 不合格
BOX 480 330 500 350 4
T 24 0 510 330 特采
FORM
PRINT`
@@ -304,14 +320,47 @@
                }
                let d = data[row - 1]
                this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
                    HMaterNo: d['物料编码'],
                    HMaterNumber: d['物料编码'],
                    HMaterName: d['物料名称'],
                    HMaterType: d['规格型号'],
                    HMaterModel: d['规格型号'],
                    HBatchNo: d['批号'],
                    HQty: d['数量'],
                    HMinQty: d['数量'],
                    HBQty: d['数量'],
                    HSupID: d['HSupID'],
                    HSupName: d['供应商'],
                    HSupNameShort: d['供应商']
                    HSupNameShort: d['供应商'],
                    HMTONo: d['订单跟踪号'],
                    HMainID:d['linterid'],
                    HSubID:d['HEntryID'],
                    HMaterID:d['HMaterID'],
                }) 
            },
            setClearLailiaoInfo() {
                this.lailiaoInfo = {
                    HMainID:'',
                    HSubID:'',
                    HOrderBillNo:'',
                    HMaterID:'',
                    barCodeNo: '',
                    HBillNo: '',
                    HBillLineNo: '',
                    HMaterNumber: '',
                    HMaterName: '',
                    HMaterModel: '',
                    HBatchNo: '',
                    HQty: '',
                    HMTONo: '',
                    HSupName: '',
                    HSupNameShort: '',
                    HMinQty:'',
                    HBQty:'',
                }
                this.buttonStatus = {
                    btn1: true,
                    btn2: false
                }
            },
            toScanCode() {
                uni.scanCode({
@@ -328,8 +377,8 @@
                            }
                            let barCodeInfo = res.result.split("@")
                            let [PurchaseBillNo, Row] = barCodeInfo
                            this.lailiaoInfo.HSourceBillNo = PurchaseBillNo,
                            this.lailiaoInfo.HSourceBillLineNo = Row
                            this.lailiaoInfo.HBillNo = PurchaseBillNo,
                            this.lailiaoInfo.HBillLineNo = Row
                            console.log( {
                                    sWhere: ` and 单据号 = '${PurchaseBillNo}'`,
                                    user: this.userInfo.Czymc,
@@ -354,49 +403,109 @@
                        }
                    }
                });
            },
            GenereateBarCode(){
                let sMain = []
                sMain[0] = this.lailiaoInfo
                let sMainStr = JSON.stringify(sMain);
                //获取选择的组织
                let HOrgType = uni.getStorageSync('Organization');
                //获取选择的工厂代码
                let CampanyName = "xxx";
                //获取选择的源单类型
                let HSourceBillType = "来料通知单";
                //获取选择的条码类型
                let HSelectBarCodeType = "唯一条码";
                //获取当前登录人员
                let UserName = uni.getStorageSync('HUserName');
                let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' + CampanyName + ';' + UserName;
                CommonUtils.doRequest(
                "/Sc_BarCode/Sub_SaveBill",
                {
                    msg: sMainSub,
                    CampanyName: CampanyName
                },
                (res) => {
                    console.log(res)
                    let {data, count, Message} = res.data
                    if(count > 0){
                        this.buttonStatus = {
                            btn1: false,
                            btn2: true
                        }
                        this.generatedBarCode = data[0]['条码编号']
                        console.log(this.generatedBarCode)
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }else {
                        uni.showToast({
                            icon: 'none',
                            title: Message
                        })
                    }
                },
                (err) => {
                },
                "POST"
                )
            },
            exit() {
                uni.navigateBack()
            }
        }
    }
</script>
<style lang="scss">
<style lang="scss" scoped>
    * {
        box-sizing: border-box;
    }
    input {
        padding: 8rpx 20rpx;
        font-size: 24rpx;
        line-height: 24rpx;
        font-size: 30rpx;
        line-height: 30rpx;
    }
    .container {
        display: flex;
        flex-direction: column;
        height: 100%;
        height: 100vh;
        padding: 20rpx 0 ;
        .content {
            flex: 1;
            background-image: url('/static/svgs/folder_bg.svg');
            background-size: cover;
            padding: 20rpx;
            .header {
                font-size: 30rpx;
            }
            .items {
                display: flex;
                flex-direction: column;
                gap: 10rpx;
                padding: 20rpx;
                padding: 40rpx 0rpx;
                .item {
                    display: flex;
                    flex-direction: row;
                    padding: 0 10rpx;
                    gap: 20rpx;
                    font-size: 24rpx;
                    font-size: 30rpx;
                    // height: 1.5rem;
                    // justify-content: center;
                    align-items: center;
                    .left {
                        text-align: left;
                        width: 5rem;
                        width: 6rem;
                    }
                    .right {
@@ -416,10 +525,42 @@
        }
        .operation-zone {
            height: 6rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 30rpx;
            padding: 20rpx;
            >view {
                flex: 1;
            }
            >button {
                width: 4rem;
                padding: 0;
                font-size: 25rpx;
                border-radius: 50rpx;
                line-height: 66rpx;
                font-size: 28rpx;
            }
            >button[disabled] {
                background-color: #acacac;
                color: #fff;
            }
            .btn-a{
                background-color: #acacac;
                color: #fff;
            }
            .btn-b{
                background-color: #41a863;
                color: #fff;
            }
            .btn-c{
                background-color: #3a78ff;
                color: #fff;
            }
        }
    }
</style>
static/svgs/folder_bg.svg
@@ -1 +1 @@
<svg width="100%" height="100%" viewBox="0 0 750 590" preserveAspectRatio="none"  xmlns="http://www.w3.org/2000/svg"><!-- 标题区域 (固定高度 64px) --><g id="title" transform="translate(0)"><polyline fill="none" stroke="#000" points="0 64 0 0 300 0 375 64" stroke-width="3"/></g><!-- 内容区域 (自动填充剩余高度) --><g id="content" transform="translate(0 64)"><!-- 使用相对坐标重绘内容区域 --><polyline fill="none" stroke="#000" points="375 0 750 0 750 526 0 526 0 0" stroke-width="3"/></g></svg>
<svg width="100%" height="100%" viewBox="0 0 750 590" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><!-- 标题区域 (固定高度 64px) --><g id="title" transform="translate(0)"><polyline fill="none" stroke="#000" points="0 32 0 0 150 0 170 32" stroke-width="2"/></g><!-- 内容区域 (自动填充剩余高度) --><g id="content" transform="translate(0 32)"><!-- 使用相对坐标重绘内容区域 --><polyline fill="none" stroke="#000" points="170 0 750 0 750 526 0 526 0 0" stroke-width="2"/></g></svg>