From e4aa70e719eb1ee1bb4fb9886fec95d7b83e4f38 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期三, 14 五月 2025 14:14:17 +0800
Subject: [PATCH] 1.递交

---
 pages/wlgl/cgdh3.vue |  191 -----------------------------------------------
 1 files changed, 1 insertions(+), 190 deletions(-)

diff --git a/pages/wlgl/cgdh3.vue b/pages/wlgl/cgdh3.vue
index fbd9a3e..09fbbfb 100644
--- a/pages/wlgl/cgdh3.vue
+++ b/pages/wlgl/cgdh3.vue
@@ -315,32 +315,7 @@
 				isDisabledSubmitButton: false,
 				radioValue: '',
 
-				purchorderArr: [
-					// {
-					// 	partcode: 'MO-001',
-					// 	partname: '鐗╂枡鍚嶇О1',
-					// 	partspec: '#001',
-					// 	arrowType: false
-					// },
-					// {
-					// 	partcode: 'MO-002',
-					// 	partname: '鐗╂枡鍚嶇О1',
-					// 	partspec: '#001',
-					// 	arrowType: true
-					// },
-					// {
-					// 	partcode: 'MO-003',
-					// 	partname: '鐗╂枡鍚嶇О1',
-					// 	partspec: '#001',
-					// 	arrowType: true
-					// },
-					// {
-					// 	partcode: 'MO-004',
-					// 	partname: '鐗╂枡鍚嶇О1',
-					// 	partspec: '#001',
-					// 	arrowType: true
-					// },
-				],
+				purchorderArr: [],
 
 				gfxxSheetShow: false,
 				gfxxArr: [], //渚涙柟淇℃伅
@@ -411,27 +386,14 @@
 
 				const res = await MesAppPurchOrderLabelBarCode(this.global.formatData(data))
 
-				// this.labelArr = res.data
-
-				// this.labelCount = 0
-				// this.labelArr.map(i => i.labqty).forEach(i => {
-				// 	this.labelCount += parseFloat(i)
-				// })
-
 				this.purchorderArr.forEach(it => {
 					if (it.partcode === partcode) {
-
 						it.labelArr = res.data
 						it.labelCount = 0
 						res.data.map(i => i.labqty).forEach(i => {
 							it.labelCount += parseFloat(i)
 						})
 					}
-
-					// else {
-					// 	it.labelArr = []
-					// 	it.labelCount = 0
-					// }
 				})
 
 				console.log(this.purchorderArr, 88)
@@ -451,16 +413,6 @@
 						this.radioValue = item.partcode
 					}
 				})
-
-				// const that = this
-				// that.$nextTick(() => {
-				// 	console.log('11111')
-				// 	// setTimeout(() => {ss
-				// 	that.$forceUpdate()
-				// 	console.log('22222')
-				// 	// }, 1000)
-				// })
-
 			},
 			// 鑾峰彇渚涙柟淇℃伅涓嬫媺
 			async getPurchSupplierSelect() {
@@ -548,15 +500,6 @@
 
 			// 鍒犻櫎
 			deleteLabel(number, val) {
-				// VAL 鐖� item  val瀛恑t
-
-				// this.labelArr = this.labelArr.filter(i => i.labcode !== val.labcode)
-				// this.labelCount = 0
-				// this.labelArr.map(i => i.labqty).forEach(i => {
-				// 	this.labelCount += parseFloat(i)
-				// })
-				console.log(number, val)
-
 				this.purchorderArr[number].labelArr = this.purchorderArr[number].labelArr.filter(i => i.labcode !== val
 					.labcode)
 				this.purchorderArr[number].labelCount = 0
@@ -566,40 +509,16 @@
 				})
 
 				this.$forceUpdate()
-
 			},
 
 			// 鎻愪氦
 			async submit() {
 				const data1 = {
 					purordercode: this.cgdh,
-					// orderstaus: this.labelCount + this.purchorderArr.find(i => i.partcode === this
-					// 	.radioValue).countarrivalquantity === this.purchorderArr.find(i => i.partcode === this
-					// 	.radioValue).quantity ? 'INARIVE' : 'BINARIVE', //鍗曟嵁鐘舵��:BINARIVE(閮ㄥ垎鍒拌揣)銆両NARIVE(宸插埌璐�)
 					username: uni.getStorageSync("username")
 				}
 				let submitData = JSON.parse(JSON.stringify(this.purchorderArr))
-				// submitData = submitData.filter(i => parseFloat(i.labelCount))
 				let data2 = []
-
-
-
-				// [{
-				// 	"Inventory": {
-				// 		"Code": "81000241"
-				// 	},
-				// 	"Unit": {
-				// 		"Name": "绠�"
-				// 	},
-				// 	"Quantity": 5,
-				// 	"OrigTaxAmount": 400,
-				// 	"OrigDiscountAmount": 400,
-				// 	"idsourcevouchertype": 27,
-				// 	"sourceVoucherCode": "PO-2021-09-0001",
-				// 	"sourceVoucherDetailId": 25
-				// }]
-
-				// let VoucherDetails = []
 
 				submitData.forEach(i => {
 					if (i.labelArr.length > 0) {
@@ -619,56 +538,10 @@
 							hischeck: i.is_incheck, //鏆傛椂鍐欐
 							children: i.labelArr
 						})
-
-						// VoucherDetails.push({
-						// 	"Inventory": {
-						// 		"Code": i.partcode
-						// 	},
-						// 	"Unit": {
-						// 		"Name": i.uomname
-						// 	},
-						// 	"Quantity": i.dhsl,
-						// 	"OrigTaxPrice": 0,
-
-						// 	"OrigTaxAmount": 0,
-						// 	"idsourcevouchertype": 27,
-						// 	"sourceVoucherCode": i.ordercode,
-						// 	"sourceVoucherDetailId": i.sbid
-						// })
 					}
 				})
 
-				// console.log('鎴戞槸鏈�鍏堟墽琛岋紒')
-				// this.isDisabledSubmitButton = true
-				// const openToken = await this.global.getTPlusToken()
-				// console.log(openToken)
-				// console.log('鎴戞槸鏈�鍚庢墽琛岋紒')
 
-				// const headers = {
-				// 	'openToken': openToken,
-				// 	'appKey': Vue.prototype.$AppKey,
-				// 	'appSecret': Vue.prototype.$AppSecret,
-				// 	'Content-Type': 'application/json'
-				// }
-
-				// let DATA = {
-				// 	"dto": {
-				// 		"Code": this.cgdh,
-				// 		"IsModifiedCode": true,
-				// 		"VoucherDate": this.global.handleDatetime(new Date().getTime()),
-				// 		"ExternalCode": this.cgdh,
-				// 		"BusinessType": {
-				// 			"Code": "01"
-				// 		},
-				// 		"Partner": {
-				// 			"Code": this.purchorderArr[0].customercode
-				// 		},
-				// 		"Warehouse": {
-				// 			"Code": "03" //浠撳簱鐩墠浼犵┖
-				// 		},
-				// 		"VoucherDetails": VoucherDetails
-				// 	}
-				// }
 				this.isDisabledSubmitButton = true
 				MesAppPurchOrderSave(this.global.formatData(
 					data1), data2).then(res => {
@@ -700,68 +573,6 @@
 					this.isDisabledSubmitButton = false
 					this.$u.toast(res.Message)
 				})
-
-
-				// console.log(headers, DATA, 18)
-
-				// await new Promise((resolve, reject) => {
-				// 	uni.request({
-				// 		url: Vue.prototype.$chanjetBaseUrl +
-				// 			'/tplus/api/v2/PurchaseArrivalOpenApi/Create',
-				// 		data: DATA,
-				// 		method: 'POST',
-				// 		header: headers,
-				// 		success: (r2) => {
-				// 			console.log(r2)
-				// 			if (r2.data.code === 0) {
-				// 				MesAppPurchOrderSave(this.global.formatData(
-				// 					data1), data2).then(res => {
-				// 					if (res.code === '200') {
-				// 						submitData.forEach(i => {
-				// 							if (i.labelArr.length > 0) {
-				// 								i.labelArr.forEach(it => {
-				// 									this.printWL(it
-				// 										.labcode, res
-				// 										.data,
-				// 										i.partcode, i
-				// 										.partname, i
-				// 										.partspec ? i
-				// 										.partspec :
-				// 										'/', it
-				// 										.labqty)
-				// 								})
-				// 							}
-				// 						})
-				// 						let prevPage = getCurrentPages()[getCurrentPages()
-				// 							.length -
-				// 							2]; // 涓婁竴椤甸潰瀹炰緥
-				// 						prevPage.$vm
-				// 							.getMesAppPurchOrderSearch() // 璋冪敤涓婁竴椤� 瀹氫箟鐨勬柟娉�
-				// 						uni.navigateBack({
-				// 							delta: 1, //杩斿洖灞傛暟锛�2鍒欎笂涓婇〉
-				// 						})
-				// 					}
-				// 					this.$u.toast(res.Message)
-				// 					this.isDisabledSubmitButton = false
-				// 				})
-
-				// 			} else {
-				// 				this.$u.toast('鎺ュ彛鎶ラ敊锛岃鑱旂郴寮�鍙戜汉鍛�!')
-				// 				this.isDisabledSubmitButton = false
-				// 			}
-				// 		},
-				// 		fail: (e) => {
-				// 			console.log(e, 7)
-				// 		}
-
-				// 	})
-				// })
-
-
-
-
-
-
 
 			},
 

--
Gitblit v1.9.3