采购订单标签打印 修改生成逻辑 采购订单子标签 打印 添加 客户编号 分组 款号字段
1个文件已添加
8个文件已修改
279 ■■■■■ 已修改文件
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigoudingdan/caigoudingdan.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigoudingdan/generate.vue 139 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab1.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tiaomadaying/tiaomadaying.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/common.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/menuListApp.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "1.0.43",
    "versionCode" : 143,
    "versionName" : "1.0.45",
    "versionCode" : 145,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages/caigoudingdan/caigoudingdan.vue
@@ -32,8 +32,8 @@
        <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="list" v-for="(item,index) in listData" :key="item['行号']" @tap="toSon(item)">
            <uni-card :title="item.物料代码" :extra="'行号:  ' + item['行号']" style="margin: 10px;">
                <view class="card-detail">
                    <view class="detail">
                        <text>物料名称:</text>{{item.物料名称}}
@@ -44,10 +44,9 @@
                    <view class="detail">
                        <text>订单数量:</text>{{item.数量}}
                    </view>
                    <view class="detail">
                    <!-- <view class="detail">
                        <text>行号:</text>{{item.行号}}
                    </view>
                    </view> -->
                </view>
            </uni-card>
pages/caigoudingdan/generate.vue
@@ -39,8 +39,8 @@
            </view>
            <view class="form-item">
                <view class="title">每箱数量:</view>
                <view class="right">
                    <input v-model="baseInfo.HMinQty" type="number" placeholder="请输入数量" @confirm="getNum()"
                <view class="righton">
                    <input disabled v-model="baseInfo.HMinQty" type="number" placeholder="请输入数量" @confirm="getNum()"
                        @blur="getNum()" />
                </view>
            </view>
@@ -55,8 +55,8 @@
        <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
        <view class="list" v-for="(item,index) in listData" :key="index">
            <uni-card :title="item.物料代码" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
        <view class="list" v-for="(item,index) in listData" :key="item['行号']">
            <uni-card :title="item.物料代码" :extra="'行号. ' + item['行号']" style="margin: 10px;">
                <view class="card-detail">
                    <view class="detail">
                        <text>物料名称:</text>{{item.物料名称}}
@@ -133,9 +133,9 @@
                    HSourceBillNo: '',
                    HMaker: getUserInfo()["Czymc"],
                    HSupNumber: '',
                    HStyleNo: '',
                    HGroup: '',
                    HCustomNo: '',
                    HCoilNO: '',
                    HFurnaceNO: '',
                    HFactory: '',
                },
                sWhere: '',
                listData: [],
@@ -149,6 +149,8 @@
            console.log("页面传递参数: ", e)
            this.OperationType = e.OperationType
            this.billNo = e.billNo
            this.baseInfo.HBillNo = e.billNo
            this.baseInfo.HBillLineNo = e.lineNo
            this.lineNo = e.lineNo
            this.getData()
        },
@@ -186,9 +188,9 @@
                                HSubID: d['HEntryID'],
                                HMaterID: d['HMaterID'],
                                HDate: d['日期'],
                                HStyleNo: d['款号'],
                                HGroup: d['分组'],
                                HCustomNo: d['客户编号']
                                HCoilNO: d['款号'],
                                HFurnaceNO: d['分组'],
                                HFactory: d['客户编号']
                            })
                            console.log(this.baseInfo)
                            // CommonUtils.playSound(1)
@@ -224,13 +226,14 @@
                if (this.$printer.isConnected() === false) {
                    this.$refs.labelPrinter.openPopup()
                } else {
                    let HBarCodeNoStr =
                    `${this.baseInfo.HBillNo}@${this.baseInfo.HBillLineNo}@${this.baseInfo.HMaterNumber || ''}@${this.baseInfo.HMTONo || ''}@${this.baseInfo.HQty || 0}@${this.baseInfo.HSupNumber  || ''}`
                    let pcsInfo = this.baseInfo.HPcsName ? '(' + this.baseInfo.HPcsName + ')' : ''
                    let printContent = []
                    let printInfoBuffer = []
                    let count = 0
                    for (let listOne of this.listData) {
                        let HBarCodeNoStr =
                            `${this.baseInfo.HBillNo}@${this.baseInfo.HBillLineNo}@${this.baseInfo.HMaterNumber || ''}@${this.baseInfo.HMTONo || ''}@${this.baseInfo.HQty || 0}@${this.baseInfo.HSupNumber  || ''}`
                        let pcsInfo = this.baseInfo.HPcsName ? '(' + this.baseInfo.HPcsName + ')' : ''
                        printContent.push(`! 0 200 200 400 1
PAGE-WIDTH 608
SETQRVER 3
@@ -243,11 +246,11 @@
T 55 0 0 100 (Supplier Sku No.)
T 24 0 0 120 物料名称: ${this.baseInfo.HMaterName}
T 55 0 0 145 (Material Code)
T 24 0 0 165 款号: ${this.baseInfo.HStyleNo}
T 24 0 0 165 款号: ${this.baseInfo.HCoilNO}
T 55 0 0 190 (Style No.)
T 24 0 300 165 客户编号: ${this.baseInfo.HCustomNo}
T 24 0 300 165 客户编号: ${this.baseInfo.HFactory}
T 55 0 300 190 (Consumer No.)
T 24 0 0 210 分组: ${this.baseInfo.HGroup || ''}
T 24 0 0 210 分组: ${this.baseInfo.HFurnaceNO || ''}
T 55 0 0 235 (Group) 
T 24 0 300 210 规格: ${this.baseInfo.HMaterModel}
T 55 0 300 235 (SKU NO.) 
@@ -291,7 +294,7 @@
            },
            getList() {
                let HBarCodeNoStr =
                    `${this.baseInfo.HBillNo}@${this.baseInfo.HBillLineNo}@${this.baseInfo.HMaterNumber || ''}@${this.baseInfo.HMTONo || ''}@${this.baseInfo.HQty || 0}@${this.baseInfo.HSupNumber  || ''}`
                    `${this.baseInfo.HBillNo}@${this.baseInfo.HBillLineNo}@${this.baseInfo.HMaterNumber || ''}@${this.baseInfo.HMTONo || ''}@${this.baseInfo.HQty || 0}@${this.baseInfo.HSupNumber  || ''}`
                var sMain = []
                sMain[0] = this.baseInfo
                var sMainStr = JSON.stringify(sMain);
@@ -306,53 +309,58 @@
                //获取当前登录人员
                var UserName = uni.getStorageSync('HUserName');
                let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
                    CampanyName + ';' + UserName + ';' + HBarCodeNoStr;
                    CampanyName + ';' + UserName + ';' + HBarCodeNoStr +
                    ';"' + this.lailiaoInfo.HFactory + '";"' + this.lailiaoInfo.HCoilNO +
                    '";"' + this.lailiaoInfo.HFurnaceNO + '"';
                CommonUtils.doRequest(
                    "/Sc_BarCode/SaveBarCode_NoGenerate", {
                        msg: sMainSub,
                        CampanyName: CampanyName
                    },
                    (res) => {
                        console.log(res)
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count > 0) {
                            // this.generatedBarCode = data[0]['条码编号']/
                            // console.log(this.generatedBarCode)
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                    "/Sc_BarCode/SaveBarCode_NoGenerate", {
                        msg: sMainSub,
                        CampanyName: CampanyName
                    },
                    (res) => {
                        console.log(res)
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count > 0) {
                            // this.generatedBarCode = data[0]['条码编号']/
                            // console.log(this.generatedBarCode)
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                            this.codeGenComplete = true
                            this.buttonStatus = {
                                btn1: true,
                                btn2: false
                            }
                        } else {
                            this.buttonStatus = {
                                btn1: false,
                                btn2: false
                            }
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    },
                    (err) => {
                        this.buttonStatus = {
                            btn1: false,
                            btn2: false
                        }
                        uni.showToast({
                            icon: 'none',
                            title: err
                        })
                    },
                    "POST"
                            this.buttonStatus = {
                                btn1: true,
                                btn2: false
                            }
                            for (let listOne of this.listData) {
                                listOne['条码编号'] = HBarCodeNoStr
                            }
                        } else {
                            this.buttonStatus = {
                                btn1: false,
                                btn2: false
                            }
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    },
                    (err) => {
                        this.buttonStatus = {
                            btn1: false,
                            btn2: false
                        }
                        uni.showToast({
                            icon: 'none',
                            title: err
                        })
                    },
                    "POST"
                )
            }
        }
@@ -381,20 +389,20 @@
        }
        .right {
            width: 450rpx;
            flex: 1;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton {
            width: 450rpx;
            flex: 1;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input {
            width: 100%;
            width: inherit;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
@@ -437,6 +445,7 @@
    .list {
        width: 100%;
        word-break: break-all;
        .card-detail {
            width: 100%;
pages/index/index.vue
@@ -34,6 +34,7 @@
        },
        data() {
            return {
                menuListRowName: 'index',
                canEdit: false,
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                itemData: [{
pages/index/tab1.vue
@@ -29,6 +29,7 @@
    export default {
        data() {
            return {
                menuListRowName: 'tab1',
                canEdit: false,
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                itemData: [{
pages/index/tab2.vue
@@ -29,6 +29,7 @@
    export default {
        data() {
            return {
                menuListRowName: 'tab2',
                canEdit: false,
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                itemData: [{
pages/tiaomadaying/tiaomadaying.vue
@@ -157,9 +157,10 @@
                    HSourceBillNo: '',
                    HMaker: getUserInfo()["Czymc"],
                    HSupNumber: '',
                    HStyleNo: '',
                    HGroup: '',
                    HCustomNo: '',
                    HCoilNO: '',
                    HFurnaceNO: '',
                    HFactory: '',
                    HInnerBillNo: '',
                }
            };
        },
@@ -198,11 +199,11 @@
T 55 0 0 100 (Supplier Sku No.)
T 24 0 0 120 物料名称: ${this.lailiaoInfo.HMaterName}
T 55 0 0 145 (Material Code)
T 24 0 0 165 款号: ${this.lailiaoInfo.HStyleNo}
T 24 0 0 165 款号: ${this.lailiaoInfo.HCoilNO}
T 55 0 0 190 (Style No.)
T 24 0 300 165 客户编号: ${this.lailiaoInfo.HCustomNo}
T 24 0 300 165 客户编号: ${this.lailiaoInfo.HFactory}
T 55 0 300 190 (Consumer No.)
T 24 0 0 210 分组: ${this.lailiaoInfo.HGroup || ''}
T 24 0 0 210 分组: ${this.lailiaoInfo.HFurnaceNO || ''}
T 55 0 0 235 (Group) 
T 24 0 300 210 规格: ${this.lailiaoInfo.HMaterModel}
T 55 0 300 235 (SKU NO.) 
@@ -254,9 +255,9 @@
                    HSubID: d['HEntryID'],
                    HMaterID: d['HMaterID'],
                    HDate: d['日期'],
                    HStyleNo: d['款号'],
                    HGroup: d['分组'],
                    HCustomNo: d['客户编号']
                    HCoilNO: d['款号'] || '',
                    HFurnaceNO: d['分组'] || '',
                    HFactory: d['客户编号'] || '',
                })
                CommonUtils.playSound(1)
                this.buttonStatus.btn2 = true
@@ -286,9 +287,9 @@
                    HDate: '',
                    HSourceBillNo: '',
                    HSupNumber: '',
                    HStyleNo: '',
                    HGroup: '',
                    HCustomNo: '',
                    HCoilNO: '',
                    HFurnaceNO: '',
                    HFactory: '',
                }
                this.buttonStatus = {
@@ -314,12 +315,9 @@
                    let barCodeInfo = barCode.split("@")
                    let [PurchaseBillNo, Row, MaterNumber, MTO, HQty, HSupNumber] = barCodeInfo
                    this.lailiaoInfo.HBillNo = PurchaseBillNo
                    this.lailiaoInfo.HInnerBillNo = PurchaseBillNo
                    this.lailiaoInfo.HSourceBillNo = PurchaseBillNo
                    this.lailiaoInfo.HBillLineNo = Row
                    console.log({
                        sWhere: ` and 单据号 = '${PurchaseBillNo}' and 行号 = ${Row}`,
                        user: this.userInfo.Czymc,
                    })
                    CommonUtils.doRequest(
                        "/Cg_POOrderBill/list", {
                            sWhere: ` and 单据号 = '${PurchaseBillNo}' and 行号 = ${Row}`,
@@ -428,8 +426,11 @@
                //获取当前登录人员
                let UserName = uni.getStorageSync('HUserName');
                let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
                    CampanyName + ';' + UserName + ';' + HBarCodeNoStr;
                    CampanyName + ';' + UserName + ';' + HBarCodeNoStr +
                    ';"' + this.lailiaoInfo.HFactory + '";"' + this.lailiaoInfo.HCoilNO +
                     '";"' + this.lailiaoInfo.HFurnaceNO + '"';
                console.log(sMainSub.split(';'))
                CommonUtils.doRequest(
                    "/Sc_BarCode/SaveBarCode_NoGenerate", {
                        msg: sMainSub,
utils/common.js
@@ -239,6 +239,54 @@
            }
        })
    }
    doRequest2({url, data, resFunction, errFunction, method, that}){
        that = that || this;
        let errorTip = null;
        uni.showLoading({
            title: '加载中...'
        })
        uni.request({
            method: method || "GET",
            url: this.serverUrl + url,
            data: data || "",
            success: (res) => {
                if (typeof resFunction === 'function') {
                    resFunction.call(that, res)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问成功回调函数类型不为函数或者空!")
                }
            },
            fail: (err) => {
                console.error(err)
                errorTip = () => {
                    uni.showToast({
                        icon: "none",
                        title: err.errMsg || err.data.message || "接口异常!",
                        duration: 2000
                    })
                }
                if (typeof errFunction === 'function') {
                    errFunction.call(that, err)
                } else if (typeof errFunction === 'undefined' || errFunction === null) {
                    return
                } else {
                    throw new TypeError("访问失败回调函数类型不为函数或者空!")
                }
            },
            complete() {
                setTimeout(() => {
                    uni.hideLoading()
                    if (errorTip != null) {
                        errorTip()
                    }
                }, 1000)
            }
        })
    }
    // uni-app 播放音频封装
    playSound(e) {
utils/menuListApp.js
New file
@@ -0,0 +1,39 @@
import { getUserInfo } from "./auth";
import { CommonUtils } from "./common";
export function getMenuList({ user = getUserInfo()['Czymc'], menuName }) {
    CommonUtils.doRequest2({
        url: '',
        data: {
            HMakeName: user,
            menuName,
        },
        (res) => {
            let {data, count, Message} = res.data;
            if(count == 1) {
            }else {
            }
        }
    })()
}
export function setMenuList({user = getUserInfo()['Czymc'], menuName, payload}) {
    CommonUtils.doRequest2({
        url: '',
        data: {
            user,
            menuName,
            payload,
        },
        (res) => {
            let {data, count, Message} = res.data;
            if(count == 1) {
            }else {
            }
        }
    })()
}