From 86bf08f21b4f802b96ab35bf468087c3fd0cc6f5 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 08 八月 2025 15:10:31 +0800
Subject: [PATCH] 采购订单标签打印 修改生成逻辑 采购订单子标签 打印 添加 客户编号 分组 款号字段
---
pages/index/tab1.vue | 1
utils/common.js | 48 +++++++++
pages/caigoudingdan/generate.vue | 139 ++++++++++++++-------------
manifest.json | 4
utils/menuListApp.js | 39 +++++++
pages/index/tab2.vue | 1
pages/tiaomadaying/tiaomadaying.vue | 37 +++---
pages/index/index.vue | 1
pages/caigoudingdan/caigoudingdan.vue | 9 -
9 files changed, 189 insertions(+), 90 deletions(-)
diff --git a/manifest.json b/manifest.json
index 90f2120..9863410 100644
--- a/manifest.json
+++ b/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" : {
diff --git a/pages/caigoudingdan/caigoudingdan.vue b/pages/caigoudingdan/caigoudingdan.vue
index da4217d..8caa7fd 100644
--- a/pages/caigoudingdan/caigoudingdan.vue
+++ b/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.鐗╂枡浠g爜" :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.鐗╂枡浠g爜" :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>
diff --git a/pages/caigoudingdan/generate.vue b/pages/caigoudingdan/generate.vue
index b7e2f02..e98cf90 100644
--- a/pages/caigoudingdan/generate.vue
+++ b/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.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+ <view class="list" v-for="(item,index) in listData" :key="item['琛屽彿']">
+ <uni-card :title="item.鐗╂枡浠g爜" :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%;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8a607ac..c14695d 100644
--- a/pages/index/index.vue
+++ b/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: [{
diff --git a/pages/index/tab1.vue b/pages/index/tab1.vue
index 7ec20ca..5e82091 100644
--- a/pages/index/tab1.vue
+++ b/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: [{
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index f4f8f34..19ea4d8 100644
--- a/pages/index/tab2.vue
+++ b/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: [{
diff --git a/pages/tiaomadaying/tiaomadaying.vue b/pages/tiaomadaying/tiaomadaying.vue
index 68dfb7c..2290d3e 100644
--- a/pages/tiaomadaying/tiaomadaying.vue
+++ b/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,
diff --git a/utils/common.js b/utils/common.js
index 2ba726f..24d5d0c 100644
--- a/utils/common.js
+++ b/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) {
diff --git a/utils/menuListApp.js b/utils/menuListApp.js
new file mode 100644
index 0000000..f509c61
--- /dev/null
+++ b/utils/menuListApp.js
@@ -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 {
+
+ }
+ }
+ })()
+}
\ No newline at end of file
--
Gitblit v1.9.1