物料入库加功能
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
<view class="zd-col-17">
|
<view class="zd-col-17">
|
||||||
<search-box
|
<search-box
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
|
@handleChange="handleChange1"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {regionList, handheldBlanking, selectMaterial} from '@/utils/getData2.js'
|
import {regionList, getSD01GroupLog, handheldBlanking} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -111,7 +112,8 @@
|
|||||||
index1: '',
|
index1: '',
|
||||||
index2: '',
|
index2: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
dataList: []
|
dataList: [],
|
||||||
|
flag: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -121,9 +123,19 @@
|
|||||||
methods: {
|
methods: {
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
this._selectMaterial()
|
if (this.val1) {
|
||||||
|
this._getSD01GroupLog(this.val1, e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleChange1 (e) {
|
||||||
|
if (e) {
|
||||||
|
if (this.val2) {
|
||||||
|
this._getSD01GroupLog(e, this.val2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.index1 = ''
|
this.index1 = ''
|
||||||
@@ -136,9 +148,29 @@
|
|||||||
this.$set(el, 'text', el.label)
|
this.$set(el, 'text', el.label)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async _selectMaterial () {
|
async _getSD01GroupLog (v1, v2) {
|
||||||
let res = await selectMaterial(this.val2)
|
if (v1 !== 'SD01') {
|
||||||
this.dataList = [...res.content]
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let current = await getSD01GroupLog(v1, v2)
|
||||||
|
if (current && current?.material) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确定',
|
||||||
|
content: '已发现近期从SD01出库的组盘信息,是否自动填充?',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.dataList.push(...current.material)
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addRow () {
|
addRow () {
|
||||||
this.dataList.push({order_code: '', material_code: '', material_qty: 0, due_date: this.getCurrentDateTime()})
|
this.dataList.push({order_code: '', material_code: '', material_qty: 0, due_date: this.getCurrentDateTime()})
|
||||||
@@ -151,6 +183,7 @@
|
|||||||
this.index1 = ''
|
this.index1 = ''
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
|
this.flag = false
|
||||||
},
|
},
|
||||||
async _handheldBlanking () {
|
async _handheldBlanking () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
@@ -165,7 +198,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
let res = await handheldBlanking(this.index, this.val1, this.index1, this.val2, arr, this.index2)
|
let res = await handheldBlanking(this.index, this.val1, this.index1, this.val2, arr, this.index2, this.flag)
|
||||||
this.clearUp()
|
this.clearUp()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -60,9 +60,17 @@ export const handheldStorehouse = (code, type) => request({
|
|||||||
// url:'api/handheld/getRegionCode',
|
// url:'api/handheld/getRegionCode',
|
||||||
// data: {orderCode: code}
|
// data: {orderCode: code}
|
||||||
// })
|
// })
|
||||||
export const handheldBlanking = (type, code, rcode, vcode, material, reg) => request({
|
export const handheldBlanking = (type, code, rcode, vcode, material, reg, flag) => request({
|
||||||
url:'api/handheld/blanking',
|
url:'api/handheld/blanking',
|
||||||
data: {type: type, device_code: code, region_code: rcode, vehicle_code: vcode, material: material, regionCode: reg}
|
data: {
|
||||||
|
type: type,
|
||||||
|
device_code: code,
|
||||||
|
region_code: rcode,
|
||||||
|
vehicle_code: vcode,
|
||||||
|
material: material,
|
||||||
|
regionCode: reg,
|
||||||
|
reentry_flag: flag
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 修改订单工序
|
// 修改订单工序
|
||||||
export const fabOrders = (code) => request({
|
export const fabOrders = (code) => request({
|
||||||
@@ -118,10 +126,10 @@ export const generateStoreInTask = (code, pcode, scode, tcode) => request({
|
|||||||
data: {vehicle_code: code, point_code: pcode, source_vehicle_code: scode, target_vehicle_code: tcode}
|
data: {vehicle_code: code, point_code: pcode, source_vehicle_code: scode, target_vehicle_code: tcode}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 物料入库-查询组盘
|
// 物料入库-SD01出库后重入接口
|
||||||
export const selectMaterial = (code) => request({
|
export const getSD01GroupLog = (code, vcode) => request({
|
||||||
url:'api/handheld/selectMaterial',
|
url:'api/handheld/getSD01GroupLog',
|
||||||
data: {pointCode: code}
|
data: {pointCode: code, vehicle_code: vcode}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 查询托盘物料信息
|
// 查询托盘物料信息
|
||||||
|
|||||||
@@ -14,6 +14,24 @@ export const regionList = () => {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getSD01GroupLog = () => {
|
||||||
|
let res = {
|
||||||
|
"device_code": "SD01",
|
||||||
|
"regionCode": null,
|
||||||
|
"region_Code": null,
|
||||||
|
"vehicle_code": "VEH001",
|
||||||
|
"material": [
|
||||||
|
{
|
||||||
|
"order_code": "800035316873",
|
||||||
|
"material_code": "qqqq",
|
||||||
|
"material_qty": 33,
|
||||||
|
"due_date": "2025-04-17 15:01:04"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
export const fabOrders = (data) => {
|
export const fabOrders = (data) => {
|
||||||
let res = [
|
let res = [
|
||||||
{order_code: '111'}
|
{order_code: '111'}
|
||||||
|
|||||||
Reference in New Issue
Block a user