1
zrg
2025-07-14 faa1899c1ad1c6e252fb8f69c5f3e52354a590e8
1
5个文件已修改
2个文件已添加
1600 ■■■■ 已修改文件
components/blueToothConnector/blueToothConnector.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/shangmudan/form.vue 752 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/shangmudan/table.vue 594 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomadaying/tiaomadaying.vue 223 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/svgs/folder_bg.svg 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/blueToothConnector/blueToothConnector.vue
@@ -23,7 +23,6 @@
                <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>
@@ -315,17 +314,9 @@
    .operation-zone {
        display: flex;
        justify-content: flex-end;
        padding: 10rpx;
        >view {
            flex: 1;
        }
        >button{
            display: inline-block;
            width: 6rem;
        }
        justify-content: space-around;
        margin-top: 10rpx;
        .op1 {
            border: 1px solid #41a863;
            color: #41a863;
pages.json
@@ -464,17 +464,17 @@
                    }
                },
                {
                    "path" : "pages/caigoudingdan/caigoudingdan",
                    "path" : "pages/MJGL/shangmudan/table",
                    "style" : 
                    {
                        "navigationBarTitleText" : "采购订单"
                        "navigationBarTitleText" : "上模单"
                    }
                },
                {
                    "path" : "pages/caigoudingdan/generate",
                    "path" : "pages/MJGL/shangmudan/form",
                    "style" : 
                    {
                        "navigationBarTitleText" : "条码生成"
                        "navigationBarTitleText" : "上模单"
                    }
                }
    ],
pages/MJGL/shangmudan/form.vue
New file
@@ -0,0 +1,752 @@
<template>
    <view>
        <view class="form">
            <view class="form-item">
                <view class="title"><text>*</text>条形码:</view>
                <view class="right" style="width: 380rpx;">
                    <input v-model="hform.HBarCode" disabled placeholder="请扫描条码"/>
                </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 name="HBillNo" disabled v-model="hform.HBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">单据日期:</view>
                <view class="right">
                    <picker mode="date" v-model="hform.HDate" @change="HDateChange">
                        <input disabled v-model="hform.HDate" placeholder="请选择日期" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>使用部门:</view>
                <view class="right">
                    <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" @input="HDeptNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>操作员:</view>
                <view class="right">
                    <uni-combox :candidates="arrayHEmpName" placeholder="请选择操作员" v-model="hform.HEmpName" @input="HEmpNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>负责人:</view>
                <view class="right">
                    <uni-combox :candidates="arrayHEmpName" placeholder="请选择负责人" v-model="hform.HMangerName" @input="HManagerNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产资源:</view>
                <view class="right">
                    <uni-combox :candidates="arrayHSourceName" placeholder="请选择生产资源" v-model="hform.HSourceName" @input="HSourceNameChange"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="title">器具编码:</view>
                <view class="righton">
                    <input name="HMouldNumber" v-model="hform.HMouldNumber" disabled placeholder="请输入器具编码" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">器具名称:</view>
                <view class="righton">
                    <input name="HMouldName" v-model="hform.HMouldName" disabled placeholder="请输入器具名称" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">器具型号:</view>
                <view class="righton">
                    <input name="HMouldModel" v-model="hform.HMouldModel" disabled placeholder="请输入器具型号" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">数量:</view>
                <view class="righton">
                    <input name="HQty" v-model="hform.HQty" disabled placeholder="请输入数量" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">上模时间:</view>
                <view class="righton">
                    <input name="HScanDate" disabled v-model="hform.HScanDate" placeholder="请选择" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产订单:</view>
                <view class="righton">
                    <input name="HICMOBillNo" disabled v-model="hform.HICMOBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">流转卡:</view>
                <view class="righton">
                    <input disabled v-model="hform.HProcExchBillNo" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">备注:</view>
                <view class="right">
                    <textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="请输入备注"></textarea>
                </view>
            </view>
            <view class="tab_area"></view>
            <view v-if="showmore">
                <view class="form-item">
                    <view class="title">制单人:</view>
                    <view class="righton">
                        <input v-model="hform.HMaker" disabled/>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">制单日期:</view>
                    <view class="righton">
                        <input v-if="hform.HMakeDate" v-model="hform.HMakeDate.substr(0,10)" disabled/>
                        <input v-else v-model="hform.HMakeDate" disabled/>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改人:</view>
                    <view class="righton">
                        <input v-model="hform.HUpDater" disabled/>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">修改日期:</view>
                    <view class="righton">
                        <input v-if="hform.HUpDateDate" v-model="hform.HUpDateDate.substr(0,10)" disabled/>
                        <input v-else v-model="hform.HUpDateDate" disabled/>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核人:</view>
                    <view class="righton">
                        <input v-model="hform.HChecker" disabled/>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">审核日期:</view>
                    <view class="righton">
                        <input v-if="hform.HCheckDate" v-model="hform.HCheckDate.substr(0,10)" disabled/>
                        <input v-else v-model="hform.HCheckDate" disabled/>
                    </view>
                </view>
            </view>
            <view class="other">
                <view v-if="!showmore" @tap="showmore = true">
                    展开其他信息<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
                </view>
                <view v-if="showmore" @tap="showmore = false">
                    折叠其他信息<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
                </view>
            </view>
            <view class="tab_area"></view>
            <view class="bottom-btn">
                <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button>
                <button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">提交</button>
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
    </view>
</template>
<script>
    import getDateTime from '@/utils/getdateTime.js';
    import { getUserInfo } from "@/utils/auth.js";
    export default {
        data() {
            return {
                userInfo:getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
                linterid:'',
                HBillNo:'',
                btnType:1,//1新增,3修改
                showmore: false,
                arrayHDeptName:[],//部门
                HDeptNameList:[],
                arrayHEmpName:[],//发现人/负责人
                HEmpNameList:[],
                arrayHSourceName:[],//生产资源
                HSourceNameList:[],
                isEdit: false,
                hform:{
                    HInterID:'',
                    HBillNo:'',
                    HDate:getDateTime.dateTimeStr('y-m-d'),
                    HBarCode:'',
                    HDeptName:'',
                    HDeptID:'',
                    HEmpName:'',
                    HEmpID:'',
                    HMangerName:'',
                    HMangerID:'',
                    HSourceName:'',
                    HSourceID:'',
                    HMouldNumber:'',
                    HMouldID:'',
                    HMouldName:'',
                    HMouldModel:'',
                    HQty:'',
                    HScanDate:getDateTime.dateTimeStr('y-m-d h:i:s'),
                    HICMOBillNo:'',
                    HICMOInterID:'',
                    HICMOEntryID:'',
                    HProcExchBillNo:'',
                    HProcExchInterID:'',
                    HProcExchEntryID:'',
                    HOrgID:uni.getStorageSync('OrganizationID'),
                    HMaker:'',
                    HMakeDate:'',
                    HUpDater:'',
                    HUpDateDate:'',
                    HChecker:'',
                    HCheckDate:'',
                    HCloseMan:'',
                    HCloseDate:'',
                    HDeleteMan:'',
                    HDeleteDate:'',
                    eventType:'Add'
                }
            }
        },
        onLoad(e) {
            this.hform.HMaker = uni.getStorageSync('HUserName')
            console.log(e,this.userInfo)
            if(e.linterid){
                this.btnType = 3
                this.linterid = e.linterid
                this.HBillNo = e.HBillNo
                this.getEditData(e.linterid, e.HBillNo)
            }else{
                this.getNewData()
            }
            this.getHDeptList()
            this.getHEmpList()
            this.getHSourceList()
        },
        methods: {
            //扫码
            toScanCode(){
                uni.scanCode({
                    onlyFromCamera: true,
                    success: (res) => {
                        console.log('条码内容:' + res.result);
                        this.hform.HBarCode = res.result
                        this.getHBarCodeData(res.result)
                    }
                });
            },
            //日期
            HDateChange(e){
                console.log(e.detail.value)
                this.hform.HDate = e.detail.value
            },
            getHBarCodeData(HBarCode) {
                if(!this.hform.HSourceName){
                    uni.showToast({
                        title:'请先选择生产资源',
                        icon:'none'
                    });
                    return;
                }
                var HBillType = "";
                var barNo = "";
                if (HBarCode.length < 22) {
                    barNo = HBarCode.substr(0, 4);
                    switch (barNo) {
                        case "GXLX":
                        HBillType = "3772";
                            break;
                    }
                }
                if (HBarCode.length > 22) {
                    barNo = HBarCode.substr(0, 22);
                    switch (barNo) {
                        case "https://qr61.cn/omM1Cj":
                            HBillType = "3899";
                            break;
                        case "https://qr61.cn/oAhaGh":
                            HBillType = "3308";
                            break;
                        case "https://www.aliwork.com":
                            HBillType = "3308";
                            break;
                    }
                }
                uni.request({
                    url: this.serverUrl + '/Sc_MouldUpperBill/txtHBarCode_KeyDown',
                    data: {
                        HBarCode: this.hform.HBarCode,
                        HSourceID:this.hform.HSourceID,
                        UserID:uni.getStorageSync('Czybm'),
                        HBillType:HBillType
                    },
                    success: (res) => {
                        console.log(2, res.data);
                        if (res.data.code == 1) {
                            var data = res.data.data[0];
                            console.log(3, data);
                            var num=data.Num;
                            console.log(4, num);
                            switch (num) {
                                case 1:
                                    this.hform.HSourceID = data.HItemID;
                                    this.hform.HSourceName = data.HName;
                                break;
                                case 2:
                                    this.hform.HICMOBillNo = data.单据号;
                                    this.hform.HICMOInterID = data.hmainid;
                                    this.hform.HICMOEntryID = data.HEntryID;
                                break;
                                case 3:
                                    this.hform.HMouldID = data.hmainid;
                                    this.hform.HMouldNumber = data.模具编号;
                                    this.hform.HMouldName = data.模具名称;
                                    this.hform.HMouldModel = data.模具型号;
                                    this.hform.HQty = 1;
                                break;
                                case 4:
                                    this.hform.HProcExchBillNo = data.单据号;
                                    this.hform.HProcExchInterID = data.hmainid;
                                    this.hform.HProcExchEntryID = data.HEntryID;
                                    this.hform.HICMOBillNo = data.任务单号;
                                    this.hform.HICMOInterID = data.hicmointerid;
                                    this.hform.HICMOEntryID = data.HICMOEntryID;
                                break;
                                default:
                                    uni.showToast({
                                        title: '未知的返回类型',
                                        icon: 'none',
                                    });
                                break;
                            }
                        } else {
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            //获取使用部门数据
            getHDeptList(){
                uni.request({
                    url: this.serverUrl + '/PublicPageMethod/DeptList',
                    data: { sWhere: "where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + uni.getStorageSync('OrganizationID') + "" },
                    success: (res) => {
                        if(res.data.count == 1){
                            this.HDeptNameList = res.data.data
                            for(var i=0;i<res.data.data.length;i++){
                                this.arrayHDeptName[i] = res.data.data[i].HName
                            }
                            this.$forceUpdate();
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //选择使用部门
            HDeptNameChange(e){
                for(var i=0;i<this.HDeptNameList.length;i++){
                    if(this.HDeptNameList[i].HName == e){
                        this.hform.HDeptID = this.HDeptNameList[i].HItemID
                    }
                }
            },
            //操作员、负责人
            getHEmpList(){
                uni.request({
                    url: this.serverUrl + '/Web/GetEmployeeList_Json',
                    data: { Employee: '',HGroupID:0 },
                    success: (res) => {
                        if(res.data.count == 1){
                            this.HEmpNameList = res.data.data
                            for(var i=0;i<res.data.data.length;i++){
                                this.arrayHEmpName[i] = res.data.data[i].HName
                            }
                            this.$forceUpdate();
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //选择操作员
            HEmpNameChange(e){
                for(var i=0;i<this.HEmpNameList.length;i++){
                    if(this.HEmpNameList[i].HName == e){
                        this.hform.HEmpID = this.HEmpNameList[i].HItemID
                    }
                }
            },
            //选择负责人
            HManagerNameChange(e){
                for(var i=0;i<this.HEmpNameList.length;i++){
                    if(this.HEmpNameList[i].HName == e){
                        this.hform.HMangerID = this.HEmpNameList[i].HItemID
                    }
                }
            },
            //生产资源
            getHSourceList(){
                uni.request({
                    url: this.serverUrl + '/api/newBill/getSourceList',
                    data: { sWhere: '' },
                    success: (res) => {
                        if(res.data.code == 1){
                            this.HSourceNameList = res.data.data.Gy_Source
                            for(var i=0;i<res.data.data.Gy_Source.length;i++){
                                this.arrayHSourceName[i] = res.data.data.Gy_Source[i].生产资源
                            }
                            this.$forceUpdate();
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //选择生产资源
            HSourceNameChange(e){
                for(var i=0;i<this.HSourceNameList.length;i++){
                    if(this.HSourceNameList[i].生产资源 == e){
                        this.hform.HSourceID = this.HSourceNameList[i].HItemID
                    }
                }
            },
            ifEdit(){
                this.isEdit = true
                this.hform.eventType = 'Modify'
            },
            //编辑回显
            getEditData(linterid,HBillNo){
                //主表
                var sWhere = " and hmainid='" + linterid + "'";
                uni.request({
                    url: this.serverUrl + '/Sc_MouldUpperBill/Sc_MouldUpperBillList',
                    data: { sWhere: sWhere,user: uni.getStorageSync('HUserName') },
                    success: (res) => {
                        console.log(1,res.data.data[0]);
                        if(res.data.code == 1){
                            var data = res.data.data[0]
                            this.btnType=3
                            this.hform.HInterID= data.hmainid
                            this.hform.HBillNo= data.单据号
                            this.hform.HBarCode= data.条形码
                            this.hform.HDeptID= data.HDeptID
                            this.hform.HDeptName= data.部门
                            this.hform.HEmpID= data.HEmpID
                            this.hform.HEmpName= data.操作员
                            this.hform.HMangerID= data.HMangerID
                            this.hform.HMangerName= data.负责人
                            this.hform.HRemark= data.表头备注
                            this.hform.HDate = data.日期.substr(0,10)
                            this.hform.HSourceID=data.HSourceID,
                            this.hform.HSourceName=data.生产资源,
                            this.hform.HMouldID=data.HMouldID,
                            this.hform.HMouldNumber=data.模具编码,
                            this.hform.HMouldName=data.模具名称,
                            this.hform.HMouldModel=data.模具规格,
                            this.hform.HQty=data.数量,
                            this.hform.HScanDate=data.上模扫码时间,
                            this.hform.HICMOBillNo=data.HICMOBillNo,
                            this.hform.HICMOInterID=data.HICMOInterID,
                            this.hform.HICMOEntryID=data.HICMOEntryID,
                            this.hform.HProcExchBillNo=data.HProcExchBillNo,
                            this.hform.HProcExchInterID=data.HProcExchInterID,
                            this.hform.HProcExchEntryID=data.HProcExchEntryID,
                            this.hform.HOrgID=data.HOrgID,
                            this.hform.HMaker= data.制单人
                            this.hform.HMakeDate= data.制单日期
                            this.hform.HUpDater= data.修改人
                            this.hform.HUpDateDate= data.修改日期
                            this.hform.HChecker= data.审核人
                            this.hform.HCheckDate= data.审核日期
                            this.hform.HDeleteMan= data.作废人
                            this.hform.HDeleteDate= data.作废日期
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //新增
            getNewData(){
                uni.request({
                    url: this.serverUrl + '/Web/GetMAXNum',
                    data: { HBillType: '3846' },
                    success: (res) => {
                        console.log(res.data)
                        if(res.data.count == 1){
                            this.hform.HInterID = res.data.data[0].HInterID
                            this.hform.HBillNo = res.data.data[0].HBillNo
                            this.btnType=1
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            submit() {
                if(!this.hform.HBarCode){
                    uni.showToast({
                        title:'请扫描模具条形码',
                        icon:'none'
                    })
                }else if(!this.hform.HSourceName){
                    uni.showToast({
                        title:'请选择生产资源',
                        icon:'none'
                    })
                }else if(!this.hform.HMouldName){
                    uni.showToast({
                        title:'模具不能为空',
                        icon:'none'
                    })
                }else if(!this.hform.HEmpName){
                    uni.showToast({
                        title:'请选择操作员',
                        icon:'none'
                    })
                }else if(!this.hform.HMangerName){
                    uni.showToast({
                        title:'请选择负责人',
                        icon:'none'
                    })
                }else{
                    uni.showLoading({
                        title:'请稍候'
                    })
                    var sMainStr = JSON.stringify(this.hform);
                    var sMainSub = sMainStr + ";" + uni.getStorageSync('HUserName')+";"+this.btnType;
                    console.log(sMainSub);
                    uni.request({
                        url: this.serverUrl + '/Sc_MouldUpperBill/AddSc_MouldUpperBill_PDA',
                        method:'POST',
                        dataType:"json",
                        data:{ oMain: sMainSub },
                        success: (res) => {
                            console.log(1,res);
                            uni.hideLoading()
                            if(res.data.count == 1){
                                let pages = getCurrentPages();
                                let prePage = pages[pages.length - 2];
                                prePage.$vm.getList()
                                if(this.isEdit){
                                    setTimeout(()=>{
                                        uni.redirectTo({
                                            url:'/pages/weiwaigxIn/form?linterid=' + this.linterid + '&HBillNo=' + this.linterid
                                        })
                                    },1000)
                                }else{
                                    setTimeout(()=>{
                                        uni.navigateBack()
                                    },1000)
                                }
                            }
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title:'接口请求失败',
                                icon:'none'
                            })
                        },
                    });
                }
            },
            goBack(){
                uni.showModal({
                    title: '提示',
                    content: '确认要退出当前页面吗?',
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            uni.navigateBack()
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form{
        width: 668rpx;
        margin: 20rpx auto;
        padding-bottom: 240rpx;
    }
    .tab_area{
        width: 100%;
        height: 50rpx;
    }
    .other{
        margin-top: 8rpx;
        text-align: center;
        font-size: 28rpx;
        padding: 4rpx 18rpx;
        color: #1890FF;
    }
    .form-item{
        display: flex;
        align-items: center;
        font-size: 30rpx;
        padding: 6rpx 0;
        .title{
            width: 208rpx;
            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;
        }
        textarea{
            width: 98%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .bottom-btn{
        width: 100%;
        // height: 120rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        background-color: #fff;
        box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
        padding: 30rpx 40rpx 40rpx 40rpx;
        button{
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a{
            background-color: #3A78FF;
            color: #fff;
        }
        .btn-b{
            background-color: #41a863;
            color: #fff;
        }
        .btn-c{
            background-color: #acacac;
            color: #fff;
            position: absolute;
            right: 120rpx;
        }
        .btn-d{
            background-color: #ff8901;
            color: #fff;
        }
    }
</style>
pages/MJGL/shangmudan/table.vue
New file
@@ -0,0 +1,594 @@
<template>
    <view class="content">
        <view class="form">
            <view class="form-item">
                <view class="title">状态:</view>
                <view class="right">
                    <picker :range="arrayStatus" :value="hform.HStatus" @change="HStatusChange">
                        <input name="HStatus" disabled :value="hform.HStatus" placeholder="请选择状态" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title">开始时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.HBeginDate" @change="HBeginDateChange">
                        <input name="HBeginDate" disabled :value="hform.HBeginDate" placeholder="请选择" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title">结束时间:</view>
                <view class="right">
                    <picker mode="date" :value="hform.HEndDate" @change="HEndDateChange">
                        <input name="HEndDate" disabled :value="hform.HEndDate" placeholder="请选择" />
                    </picker>
                </view>
            </view>
            <view v-if="showmore">
                <view class="form-item">
                    <view class="title">任务单号:</view>
                    <view class="right">
                        <input v-model="hform.HICMOBillNo" placeholder="请输入任务单号" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="right">
                        <input v-model="hform.HBillNo" placeholder="请输入单据号" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">流转卡号:</view>
                    <view class="right">
                        <input v-model="hform.HProcExchBillNo" placeholder="请输入工序流转卡号" />
                    </view>
                </view>
            </view>
            <view class="other">
                <view v-if="!showmore" @tap="showmore = true">
                    展开其他条件<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
                </view>
                <view v-if="showmore" @tap="showmore = false">
                    折叠其他条件<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
                </view>
            </view>
            <view class="buttons">
                <button class="btn-a" size="mini" type="default" @tap="clear">重置</button>
                <button class="btn-b" size="mini" type="default" @tap="creat">新增</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 showList" :key="index">
            <uni-card :title="item.HProcExchBillNo" :extra="item.单据号" style="margin: 10px;"
                @tap="showDetail = showDetail==index?-1:index">
                <!-- #ifndef MP-WEIXIN-->
                <view class="card-detail">
                    <view class="detail" v-if="item.部门">
                        <text>部门:</text>{{item.部门}}
                    </view>
                    <view class="detail" v-if="item.负责人">
                        <text>负责人:</text>{{item.负责人}}
                    </view>
                    <view class="detail" v-if="item.模具编码">
                        <text>模具编码:</text>{{item.模具编码}}
                    </view>
                    <view class="detail" v-if="item.模具名称">
                        <text>模具名称:</text>{{item.模具名称}}
                    </view>
                    <view class="detail" v-if="item.模具规格">
                        <text>模具规格:</text>{{item.模具规格}}
                    </view>
                    <view class="detail" v-if="item.生产资源">
                        <text>生产资源:</text>{{item.生产资源}}
                    </view>
                    <view class="detail" v-if="item.上模扫码时间">
                        <text>上模时间:</text>{{item.上模扫码时间.substr(0,10)}}
                    </view>
                </view>
                <view class="card-detail" v-if="showDetail == index">
                    <view class="detail" v-if="item.制单人">
                        <text>制单人:</text>{{item.制单人}}
                    </view>
                    <view class="detail" v-if="item.制单日期">
                        <text>制单日期:</text>{{item.制单日期.substr(0,10)}}
                    </view>
                    <view class="detail" v-if="item.修改人">
                        <text>修改人:</text>{{item.修改人}}
                    </view>
                    <view class="detail" v-if="item.修改日期">
                        <text>修改日期:</text>{{item.修改日期.substr(0,10)}}
                    </view>
                    <view class="detail" v-if="item.审核人">
                        <text>审核人:</text>{{item.审核人}}
                    </view>
                    <view class="detail" v-if="item.审核日期">
                        <text>审核日期:</text>{{item.审核日期.substr(0,10)}}
                    </view>
                    <view class="detail" v-if="item.关闭人">
                        <text>关闭人:</text>{{item.关闭人}}
                    </view>
                    <view class="detail" v-if="item.关闭日期">
                        <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}}
                    </view>
                    <view class="detail" v-if="item.备注">
                        <text>备注:</text>{{item.备注}}
                    </view>
                </view>
                <!-- #endif -->
                <!-- #ifdef MP-WEIXIN -->
                <uni-card style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
                    <view class="card-detail">
                        <view class="detail" v-if="item['部门']">
                            <text>部门:</text>{{item['部门']}}
                        </view>
                        <view class="detail" v-if="item['操作员']">
                            <text>操作员:</text>{{item['操作员']}}
                        </view>
                        <view class="detail" v-if="item['负责人']">
                            <text>负责人:</text>{{item['负责人']}}
                        </view>
                        <view class="detail" v-if="item['模具编码']">
                            <text>模具编码:</text>{{item['模具编码']}}
                        </view>
                        <view class="detail" v-if="item['模具名称']">
                            <text>模具名称:</text>{{item['模具名称']}}
                        </view>
                        <view class="detail" v-if="item['模具规格']">
                            <text>模具规格:</text>{{item['模具规格']}}
                        </view>
                        <view class="detail" v-if="item['上模扫码时间']">
                            <text>上模扫码时间:</text>{{item['上模扫码时间'].substr(0,19)}}
                        </view>
                    </view>
                    <view class="card-detail" v-if="showDetail == index">
                        <view class="detail" v-if="item['数量']">
                            <text>数量:</text>{{item['数量']}}
                        </view>
                        <view class="detail" v-if="item['生产订单']">
                            <text>生产订单:</text>{{item['HICMOBillNo']}}
                        </view>
                        <view class="detail" v-if="item['流转卡号']">
                            <text>流转卡号:</text>{{item['HProcExchBillNo']}}
                        </view>
                        <view class="detail" v-if="item['制单人']">
                            <text>制单人:</text>{{item['制单人']}}
                        </view>
                        <view class="detail" v-if="item['制单日期']">
                            <text>制单日期:</text>{{item['制单日期'].substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item['修改人']">
                            <text>修改人:</text>{{item['修改人']}}
                        </view>
                        <view class="detail" v-if="item['修改日期']">
                            <text>修改日期:</text>{{item['修改日期'].substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item['审核人']">
                            <text>审核人:</text>{{item['审核人']}}
                        </view>
                        <view class="detail" v-if="item['审核日期']">
                            <text>审核日期:</text>{{item['审核日期'].substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item['关闭人']">
                            <text>关闭人:</text>{{item['关闭人']}}
                        </view>
                        <view class="detail" v-if="item['关闭日期']">
                            <text>关闭日期:</text>{{item['关闭日期'].substr(0,10)}}
                        </view>
                        <view class="detail" v-if="item['备注']">
                            <text>备注:</text>{{item['备注']}}
                        </view>
                    </view>
                    <!-- #endif -->
                    <view class="more" v-if="showDetail == index && operations != index">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起
                        </view>
                        <view class="part" @tap.stop="operations = operations==index?-1:index">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="more" v-if="showDetail != index && operations != index">
                        <view class="part" style="border-right: 1px solid #eee;">
                            <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息
                        </view>
                        <view class="part" @tap.stop="operations = operations==index?-1:index">
                            <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
                                size="14"></uni-icons>操作
                        </view>
                    </view>
                    <view class="op" v-if="operations == index">
                        <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button>
                        <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button>
                        <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                    </view>
                </uni-card>
        </view>
        <view class="over" v-if="listData.length == 0">暂无数据</view>
        <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view>
        <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from "@/utils/auth.js";
    export default {
        data() {
            return {
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                showmore: false,
                arrayStatus: ['全部', '未审核', '已审核', '已关闭'],
                hform: {
                    HStatus: '全部',
                    HBeginDate: '',
                    HEndDate: '',
                    HICMOBillNo: '',
                    HBillNo: '',
                    HProcExchBillNo: '',
                },
                sWhere: '',
                listData: [],
                showList: [],
                showDetail: -1,
                operations: -1,
                page: 1,
            }
        },
        onLoad() {
            this.getList()
        },
        onReachBottom: function() {
            this.page++
            setTimeout(() => {
                this.showList = this.showList.concat(this.getPage(this.page, this.listData))
            }, 100)
        },
        onPullDownRefresh: function() {
            this.clear()
            setTimeout(() => {
                uni.stopPullDownRefresh();
            }, 1000);
        },
        methods: {
            getPage(page, list) {
                let sindex = (parseInt(page) - 1) * 20
                let eindex = parseInt(page) * 20
                let newList = list.slice(sindex, eindex)
                return newList
            },
            getList() {
                uni.showLoading({
                    title: '加载中...'
                })
                uni.request({
                    url: this.serverUrl + '/Sc_MouldUpperBill/Sc_MouldUpperBillList',
                    data: {
                        sWhere: this.sWhere,
                        user: uni.getStorageSync('HUserName')
                    },
                    success: (res) => {
                        console.log(1, res.data.data);
                        if (res.data.count == 1) {
                            this.listData = res.data.data
                            this.showList = this.getPage(this.page, this.listData)
                            setTimeout(() => {
                                uni.hideLoading()
                            }, 1000)
                        } else {
                            uni.hideLoading()
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.hideLoading()
                        uni.showToast({
                            title: '接口请求失败',
                            icon: 'none'
                        })
                    },
                });
            },
            //状态
            HStatusChange(e) {
                console.log(e.detail.value)
                this.hform.HStatus = this.arrayStatus[e.detail.value]
            },
            //选择单据日期
            HBeginDateChange(e) {
                console.log(e.detail.value)
                this.hform.HBeginDate = e.detail.value
            },
            //选择单据日期
            HEndDateChange(e) {
                console.log(e.detail.value)
                this.hform.HEndDate = e.detail.value
            },
            //搜索
            search() {
                this.sWhere = ''
                this.listData = []
                this.page = 1
                this.showList = []
                console.log(this.hform)
                if (this.hform.HStatus) {
                    if (this.hform.HStatus == '全部') {
                        this.sWhere += "";
                    } else if (this.hform.HStatus == '未审核') {
                        this.sWhere += " and 审核人=''";
                    } else if (this.hform.HStatus == '已审核') {
                        this.sWhere += " and 审核人<>''";
                    } else if (this.hform.HStatus == '已关闭') {
                        this.sWhere += " and 关闭人<>''";
                    }
                }
                if (this.hform.BenginHCreateDate) {
                    this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.BenginHCreateDate + "'";
                }
                if (this.hform.EndHCreateDate) {
                    this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.EndHCreateDate + "'";
                }
                if (this.hform.HBillNo) {
                    this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'";
                }
                if (this.hform.HICMOBillNo) {
                    this.sWhere += " and 生产订单号 like '%" + this.hform.HICMOBillNo + "%'";
                }
                if (this.hform.HProcExchBillNo) {
                    this.sWhere += " and 流转卡号 like '%" + this.hform.HProcExchBillNo + "%'";
                }
                this.getList()
            },
            //新增
            creat() {
                uni.navigateTo({
                    url: '/pages/MJGL/shangmudan/form'
                })
            },
            //重置
            clear() {
                this.listData = []
                this.page = 1
                this.showList = []
                this.showmore = false
                this.sWhere = ''
                this.showDetail = -1,
                    this.operations = -1,
                    this.hform = {
                        HStatus: '全部',
                        HBeginDate: '',
                        HEndDate: '',
                        HICMOBillNo: '',
                        HBillNo: '',
                        HProcExchBillNo: '',
                    }
                this.getList()
            },
            //编辑
            edit(item) {
                console.log(item)
                uni.navigateTo({
                    url: '/pages/MJGL/shangmudan/form?linterid=' + item.hmainid + '&HBillNo=' + item.单据号
                })
            },
            //删除
            del(item) {
                console.log(item)
                uni.showModal({
                    title: '提示',
                    content: '确认要删除吗,删除后不能恢复',
                    success: (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            uni.request({
                                url: this.serverUrl +'/Sc_MouldUpperBill/DeltetSc_MouldUpperBill',
                                data: {
                                    HInterID: item.hmainid + "_" + item.hsubid,
                                    HPRDORGID: uni.getStorageSync('OrganizationID'),
                                    user: uni.getStorageSync('HUserName')
                                },
                                success: (res) => {
                                    console.log(1, res);
                                    if (res.data.count == 1) {
                                        this.clear()
                                    }
                                    uni.showToast({
                                        title: res.data.Message,
                                        icon: 'none'
                                    })
                                },
                                fail: (res) => {
                                    console.log(res);
                                    uni.showToast({
                                        title: '接口请求失败',
                                        icon: 'none'
                                    })
                                },
                            });
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 640rpx;
        margin: 20rpx auto;
    }
    .other {
        margin-top: 8rpx;
        text-align: center;
        font-size: 28rpx;
        padding: 4rpx 18rpx;
        color: #1890FF;
    }
    .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;
            }
        }
        .op {
            display: flex;
            justify-content: space-around;
            margin-top: 20rpx;
            button {
                padding: 0;
                width: 150rpx;
                font-size: 25rpx;
            }
            .op1 {
                border: 1px solid #41a863;
                color: #41a863;
            }
            .op2 {
                border: 1px solid #d98d00;
                color: #d98d00;
            }
            .op3 {
                border: 1px solid #3a78ff;
                color: #3a78ff;
            }
            .op4 {
                border: 1px solid #da0000;
                color: #da0000;
            }
            .op5 {
                border: 1px solid #888;
                color: #888;
            }
        }
    }
</style>
pages/index/index.vue
@@ -166,14 +166,14 @@
                    },
                    {
                        img: '../../static/icon/icon16.png',
                        text: '来料条码打印',
                        text: '条码打印',
                        url: '/pages/tiaomadaying/tiaomadaying',
                        id: 28,
                    },
                    {
                        img: '../../static/icon/icon16.png',
                        text: '采购订单',
                        url: '/pages/caigoudingdan/caigoudingdan',
                        text: '上模单',
                        url: '/pages/MJGL/shangmudan/table',
                        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="HBillNo" v-model="lailiaoInfo.HBillNo" />
                        <input name="HSourceBillNo" v-model="lailiaoInfo.HSourceBillNo" />
                    </view>
                </view>
                <view class="item">
                    <view class="left">源单行号:</view>
                    <view class="right">
                        <input name="HBillLineNo" v-model="lailiaoInfo.HBillLineNo" />
                        <input name="HSourceBillLineNo" v-model="lailiaoInfo.HSourceBillLineNo" />
                    </view>
                </view>
                <view class="item">
                    <view class="left">物料编码:</view>
                    <view class="right">
                        <input name="HMaterNo" v-model="lailiaoInfo.HMaterNumber" />
                        <input name="HMaterNo" v-model="lailiaoInfo.HMaterNo" />
                    </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.HMaterModel" />
                        <input name="HMaterType" v-model="lailiaoInfo.HMaterType" />
                    </view>
                </view>
                <view class="item">
@@ -77,14 +77,10 @@
            </view>
        </view>
        <view class="operation-zone">
            <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>
            <button @click="print">打印</button>
            <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
            </labelPrinterComponentVue>
        </view>
        <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
        </labelPrinterComponentVue>
    </view>
</template>
@@ -122,30 +118,18 @@
            return {
                printInfo: "",
                userInfo: getUserInfo(),
                buttonStatus: {
                    btn1: true,
                    btn2: false
                },
                generatedBarCode: '',
                lailiaoInfo: {
                    HMainID:'',
                    HSubID:'',
                    HOrderBillNo:'',
                    HMaterID:'',
                    barCodeNo: '',
                    HBillNo: '',
                    HBillLineNo: '',
                    HMaterNumber: '',
                    HSourceBillNo: '',
                    HSourceBillLineNo: '',
                    HMaterNo: '',
                    HMaterName: '',
                    HMaterModel: '',
                    HMaterType: '',
                    HBatchNo: '',
                    HQty: '',
                    HMTONo: '',
                    HSupName: '',
                    HSupNameShort: '',
                    HMinQty:'',
                    HBQty:'',
                    HSupID: ''
                    HSupNameShort: ''
                }
            };
        },
@@ -167,7 +151,7 @@
                    //             x: 500,
                    //             y: 30,
                    //             width: 3,
                    //             content: this.generatedBarCode,
                    //             content: "PDDZDA00017106",
                    //             codeRotation: CCodeRotation.ROTATION_0,
                    //             level: CCorrectLevel.L
                    //         }))
@@ -283,24 +267,24 @@
PAGE-WIDTH 608
SETQRVER 3
B QR 500 30 M 2 U 3
LA,${this.generatedBarCode}
LA,PDDZDA00017106
ENDQR
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 30 供应商:
T 24 0 30 80 供应商料号:
T 24 0 30 130 物料编码:
T 24 0 30 180 物料分组: 
T 24 0 300 180 规格型号: ${this.lailiaoInfo.HMaterModel}
T 24 0 30 230 数量:  ${this.lailiaoInfo.HQty}
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 计划跟踪号: ${this.lailiaoInfo.HMTONo || ''}
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 特采
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 特采
FORM
PRINT`
@@ -320,47 +304,14 @@
                }
                let d = data[row - 1]
                this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
                    HMaterNumber: d['物料编码'],
                    HMaterNo: d['物料编码'],
                    HMaterName: d['物料名称'],
                    HMaterModel: d['规格型号'],
                    HMaterType: d['规格型号'],
                    HBatchNo: d['批号'],
                    HQty: d['数量'],
                    HMinQty: d['数量'],
                    HBQty: d['数量'],
                    HSupID: d['HSupID'],
                    HSupName: d['供应商'],
                    HSupNameShort: d['供应商'],
                    HMTONo: d['订单跟踪号'],
                    HMainID:d['linterid'],
                    HSubID:d['HEntryID'],
                    HMaterID:d['HMaterID'],
                    HSupNameShort: d['供应商']
                }) 
            },
            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({
@@ -377,8 +328,8 @@
                            }
                            let barCodeInfo = res.result.split("@")
                            let [PurchaseBillNo, Row] = barCodeInfo
                            this.lailiaoInfo.HBillNo = PurchaseBillNo,
                            this.lailiaoInfo.HBillLineNo = Row
                            this.lailiaoInfo.HSourceBillNo = PurchaseBillNo,
                            this.lailiaoInfo.HSourceBillLineNo = Row
                            console.log( {
                                    sWhere: ` and 单据号 = '${PurchaseBillNo}'`,
                                    user: this.userInfo.Czymc,
@@ -403,109 +354,49 @@
                        }
                    }
                });
            },
            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" scoped>
<style lang="scss">
    * {
        box-sizing: border-box;
    }
    input {
        padding: 8rpx 20rpx;
        font-size: 30rpx;
        line-height: 30rpx;
        font-size: 24rpx;
        line-height: 24rpx;
    }
    .container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        padding: 20rpx 0 ;
        height: 100%;
        .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: 40rpx 0rpx;
                padding: 20rpx;
                .item {
                    display: flex;
                    flex-direction: row;
                    padding: 0 10rpx;
                    gap: 20rpx;
                    font-size: 30rpx;
                    font-size: 24rpx;
                    // height: 1.5rem;
                    // justify-content: center;
                    align-items: center;
                    .left {
                        text-align: left;
                        width: 6rem;
                        width: 5rem;
                    }
                    .right {
@@ -525,42 +416,10 @@
        }
        .operation-zone {
            height: 3rem;
            height: 6rem;
            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 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>
<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>