diff --git a/pages.json b/pages.json index 6f4781a..f5feb9d 100644 --- a/pages.json +++ b/pages.json @@ -419,6 +419,13 @@ "navigationStyle": "custom" } } + ,{ + "path" : "pages/hdyy/tygn/supplier", + "style" : + { + "navigationStyle": "custom" + } + } ,{ "path" : "pages/hdyy/wrcdj/wrc-load", "style" : diff --git a/pages/hdyy/ccgl/kn-hepan.vue b/pages/hdyy/ccgl/kn-hepan.vue index a3d2a92..979c25b 100644 --- a/pages/hdyy/ccgl/kn-hepan.vue +++ b/pages/hdyy/ccgl/kn-hepan.vue @@ -201,10 +201,8 @@ }) this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0) } else { - this.dataList = [] } } catch (e) { - this.dataList = [] } }, handleChange (e) { diff --git a/pages/hdyy/ccgl/zj-instore.vue b/pages/hdyy/ccgl/zj-instore.vue index 1e79fef..3adc703 100644 --- a/pages/hdyy/ccgl/zj-instore.vue +++ b/pages/hdyy/ccgl/zj-instore.vue @@ -168,10 +168,8 @@ } this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0) } else { - this.dataList = [] } } catch (e) { - this.dataList = [] } }, async _confirmPalletAssemblyIn () { diff --git a/pages/hdyy/ccgl/zj-outstore.vue b/pages/hdyy/ccgl/zj-outstore.vue index 1a4feb5..b65a5ca 100644 --- a/pages/hdyy/ccgl/zj-outstore.vue +++ b/pages/hdyy/ccgl/zj-outstore.vue @@ -189,10 +189,8 @@ }) this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0) } else { - this.dataList = [] } } catch (e) { - this.dataList = [] } }, async _directlyOutConfirm () { diff --git a/pages/hdyy/tygn/supplier.vue b/pages/hdyy/tygn/supplier.vue new file mode 100644 index 0000000..f240c2c --- /dev/null +++ b/pages/hdyy/tygn/supplier.vue @@ -0,0 +1,94 @@ + + + \ No newline at end of file diff --git a/pages/hdyy/zpgl/mater-zudai.vue b/pages/hdyy/zpgl/mater-zudai.vue index 1ee2258..a9fe678 100644 --- a/pages/hdyy/zpgl/mater-zudai.vue +++ b/pages/hdyy/zpgl/mater-zudai.vue @@ -44,7 +44,7 @@ - + @@ -140,6 +140,11 @@ url: `/pages/hdyy/wbc/${name}` }) }, + toJump2 (name) { + uni.navigateTo({ + url: `/pages/hdyy/tygn/${name}` + }) + }, toEmpty () { this.val1 = '' this.index1 = '' diff --git a/pages/hdyy/zpgl/mater-zupan.vue b/pages/hdyy/zpgl/mater-zupan.vue index 50a3fd0..bc1525a 100644 --- a/pages/hdyy/zpgl/mater-zupan.vue +++ b/pages/hdyy/zpgl/mater-zupan.vue @@ -14,6 +14,16 @@ /> + + + 袋码 + + + + + @@ -36,7 +46,7 @@ - + {{i+1}} {{e.bag_code}} {{e.material_code}} @@ -72,6 +82,9 @@ return { title: '', val1: '', + bagCode: '', + pkId: '', + pkObj: {}, dataList: [], // dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}], disabled: false @@ -82,71 +95,32 @@ }, methods: { toScanAdd () { - uni.scanCode({ - success: (res) => { - // console.log('扫码成功:', res.result); - if (res.result.includes(';')) { - const parts = res.result.split(';') - if (parts.length !== 5) { - uni.showToast({ - title: '二维码格式不正确,请扫描符合格式的二维码', - icon: 'none' - }) - return - } - let currObj = { - mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9), - container_code: parts[0], - material_code: parts[1], - material_name: parts[2], - qty: parts[3], - measure_unit_id: parts[4], - } - // 检查是否已存在相同卷号 - const exists = this.dataList.some(item => item.container_code === currObj.container_code) - if (exists) { - uni.showToast({ - title: '已存在', - icon: 'none' - }) - return - } - this.dataList.push(currObj) - } else { - let currObj = { - mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9), - container_code: res.result, - material_code: '', - material_name: '', - qty: '', - measure_unit_id: '' - } - // 检查是否已存在相同卷号 - const exists = this.dataList.some(item => item.container_code === currObj.container_code) - if (exists) { - uni.showToast({ - title: '已存在', - icon: 'none' - }) - return - } - this.dataList.push(currObj) - } - }, - fail: (err) => { - console.log('扫码失败:', err) - // uni.showToast({ - // title: err + '扫码失败', - // icon: 'none' - // }) - } - }) + if (this.bagCode) { + this._getBagAssembly2(this.bagCode) + } + // uni.scanCode({ + // success: (res) => { + // // console.log('扫码成功:', res.result); + // this._getPalletAssembly(res.result) + // }, + // fail: (err) => { + // console.log('扫码失败:', err) + // // uni.showToast({ + // // title: err + '扫码失败', + // // icon: 'none' + // // }) + // } + // }) }, toDel () { if (!this.pkId) { return } - this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid) + this.dataList = this.dataList.filter(item => item.bag_code !== this.pkObj.bag_code) + }, + toCheck (e) { + this.pkId = this.pkId === e.bag_code ? '' : e.bag_code + this.pkObj = this.pkId === e.bag_code ? e : {} }, toEmpty () { this.val1 = '' @@ -165,6 +139,24 @@ this.dataList = [] } }, + async _getBagAssembly2 () { + try { + let res = await getBagAssembly(this.bagCode) + if (res) { + const existingItem = this.dataList.find(item => item.bag_code === res.data.bag_code) + if (existingItem) { + uni.showToast({ + title: '袋码已存在,不能重复插入', + icon: 'none' + }) + return + } + this.dataList.push(res.data) + } else { + } + } catch (e) { + } + }, async _confirmPalletAssembly () { this.disabled = true if (!this.val1 || !this.dataList.length) { diff --git a/utils/getData3.js b/utils/getData3.js index 81ce3c6..48658bc 100644 --- a/utils/getData3.js +++ b/utils/getData3.js @@ -15,7 +15,11 @@ export const queryRegionDropdown = (rcode) => request({ url:'api/pda/publicInterface/queryRegionDropdown', data: {region_code: rcode} }) - +// 查询供应商 +export const querySupp = (supcode) => request({ + url:'api/pda/publicInterface/querySupp', + data: {supp_code: supcode} +}) /** * 外包材收货(外包材管理) @@ -297,7 +301,7 @@ export const getBucketGroupInfo = (mid, pcsn) => request({ }) // 确认叫料 export const confirmCallBucketMaterial = (pcode, rows) => request({ - url:'/api/pdaProduction/confirmCallBucketMaterial', + url:'api/pdaProduction/confirmCallBucketMaterial', data: {point_code: pcode, rows: rows} }) @@ -357,12 +361,12 @@ export const forceConfirmTask = (obj) => request({ // 库存查询(通用功能)共 (2) 个 // 查询物料维护信息 export const queryMaterial = (search) => request({ - url:'/api/queryIvt/queryMaterial', + url:'api/queryIvt/queryMaterial', data: {search: search} }) // 主页面库存查询 export const queryIvt = (scode, pcode, mcode, pcsn) => request({ - url:'/api/queryIvt/queryIvt', + url:'api/queryIvt/queryIvt', data: {sect_code: scode, point_code: pcode, material_code: mcode, pcsn: pcsn} }) @@ -399,4 +403,4 @@ export const waiting = () => request({ export const back = () => request({ url:'api/notCar/back', data: {} -}) \ No newline at end of file +})