This commit is contained in:
2026-01-08 10:56:44 +08:00
parent e733b759fe
commit afc569e771
17 changed files with 569 additions and 459 deletions

View File

@@ -6,26 +6,27 @@
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具</span>
<span class="filter_label">点位/载具</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">总数量</span>
</view>
<view class="zd-col-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row">
<button class="zd-col-11 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-11 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">总数量</span>
</view>
<view class="zd-col-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -54,7 +55,7 @@
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td><input type="number" class="sin_input" v-model="e.qty" @blur="handleBlur(e)"></td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
@@ -70,9 +71,9 @@
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取物料</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取载具</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取货完成</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_takePalletMaterial">取物料</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_takeTheVehicle">取载具</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_takeFinish">取货完成</button>
</view>
</view>
</template>
@@ -80,7 +81,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
import {getPalletAssemblyOK, takePalletMaterial, takeTheVehicle, takeFinish} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -89,8 +90,6 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
dataList: [],
@@ -100,7 +99,6 @@
},
onLoad (options) {
this.title = options.title
this._queryPointInDownload()
},
methods: {
toScanAdd () {
@@ -175,26 +173,36 @@
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
try {
let res = await queryPointInDownload()
if (res) {
this.options = res.data
handleBlur (e) {
if (e.qty) {
if (e.qty < 0) {
e.qty = 0
} else {
this.options = []
e.qty = e.qty.replace(/[^0-9]/g, '')
e.qty = e.qty.replace(/^0+/, '') || '0'
if (e.qty > e.initialQty) {
e.qty = e.initialQty
}
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
}
} catch (e) {
this.options = []
} else {
// uni.showToast({
// title: '数量必填',
// icon: 'none'
// })
}
},
selectChange (e) {
this.index = e
handleChange (e) {
if (e) {
this._getPalletAssemblyOK()
}
},
async _queryPointInDtl () {
async _getPalletAssemblyOK () {
try {
let res = await queryPointInDtl(this.val1)
let res = await getPalletAssemblyOK(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
} else {
this.dataList = []
}
@@ -202,14 +210,54 @@
this.dataList = []
}
},
async _packInConfirm () {
async _takePalletMaterial () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
if (!this.val1 || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
let res = await takePalletMaterial(this.val1, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _takeTheVehicle () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
try {
let res = await takeTheVehicle(this.val1)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _takeFinish () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
try {
let res = await takeFinish()
if (res) {
uni.showToast({
title: res.message,

View File

@@ -10,7 +10,7 @@
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
v-model="val2"
/>
</view>
</view>
@@ -26,7 +26,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">总数量</span>
<span class="filter_label filter_input_disabled">总数量</span>
</view>
<view class="zd-col-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
@@ -76,8 +76,8 @@
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">呼叫agv</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">出料</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine">呼叫agv</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine">出料</button>
</view>
</view>
</template>
@@ -85,7 +85,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
import {getGroupBucketInfo, productionLine} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -95,6 +95,7 @@
return {
title: '',
val1: '',
val2: '',
num: null,
dataList: [],
// dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
@@ -113,11 +114,12 @@
selectChange (e) {
this.index = e
},
async _queryPointInDtl () {
async _getGroupBucketInfo () {
try {
let res = await queryPointInDtl(this.val1)
let res = await getGroupBucketInfo(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
} else {
this.dataList = []
}
@@ -125,14 +127,14 @@
this.dataList = []
}
},
async _packInConfirm () {
async _productionLine () {
this.disabled = true
if (!this.val1 || !this.dataList.length) {
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.dataList)
let res = await productionLine(this.val1, this.val2)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -16,7 +16,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">总数量</span>
<span class="filter_label filter_input_disabled">总数量</span>
</view>
<view class="zd-col-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
@@ -50,7 +50,7 @@
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td><input type="number" class="sin_input" v-model="e.qty" @blur="handleBlur(e)"></td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
@@ -66,7 +66,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">回库</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_leftoverMaterialBack">回库</button>
</view>
</view>
</template>
@@ -74,7 +74,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
import {getGroupInfo, leftoverMaterialBack} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -83,8 +83,6 @@
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
dataList: [],
@@ -94,7 +92,6 @@
},
onLoad (options) {
this.title = options.title
this._queryPointInDownload()
},
methods: {
toEmpty () {
@@ -102,26 +99,31 @@
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
try {
let res = await queryPointInDownload()
if (res) {
this.options = res.data
handleBlur (e) {
if (e.qty) {
if (e.qty < 0) {
e.qty = 0
} else {
this.options = []
e.qty = e.qty.replace(/[^0-9]/g, '')
e.qty = e.qty.replace(/^0+/, '') || '0'
if (e.qty > e.initialQty) {
e.qty = e.initialQty
}
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
}
} catch (e) {
this.options = []
} else {
// uni.showToast({
// title: '数量必填',
// icon: 'none'
// })
}
},
selectChange (e) {
this.index = e
},
async _queryPointInDtl () {
async _getGroupInfo () {
try {
let res = await queryPointInDtl(this.val1)
let res = await getGroupInfo(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
} else {
this.dataList = []
}
@@ -129,14 +131,14 @@
this.dataList = []
}
},
async _packInConfirm () {
async _leftoverMaterialBack () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
if (!this.val1 || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
let res = await leftoverMaterialBack(this.val1, this.dataList)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -22,7 +22,7 @@
v-model="val1"
/>
</view>
<button class="mini-btn" type="primary" @tap="_queryPointInDtl">查询</button>
<button class="mini-btn" type="primary" @tap="_getStockGroupInfo">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
@@ -30,7 +30,7 @@
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
v-model="val2"
/>
</view>
</view>
@@ -76,7 +76,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">确认叫料</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val2 || !dataList.length}" :disabled="disabled" @tap="_confirmCallMaterial">确认叫料</button>
</view>
</view>
</template>
@@ -84,7 +84,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
import {queryPointInDownload, getStockGroupInfo, confirmCallMaterial} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -97,6 +97,7 @@
num: null,
index: '',
val1: '',
val2: '',
materialData: {},
dataList: [],
dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
@@ -105,7 +106,13 @@
},
onLoad (options) {
this.title = options.title
this._queryPointInDownload()
// this._queryPointInDownload()
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.materialData = this.$store.getters.publicObj
this.$store.dispatch('setPublicObj', '')
}
},
methods: {
toJump (name) {
@@ -136,9 +143,9 @@
selectChange (e) {
this.index = e
},
async _queryPointInDtl () {
async _getStockGroupInfo () {
try {
let res = await queryPointInDtl(this.val1)
let res = await getStockGroupInfo('', this.materialData.material_code, this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
@@ -148,15 +155,14 @@
this.dataList = []
}
},
async _packInConfirm () {
async _confirmCallMaterial () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
if (!this.val2 || !this.dataList.length) {
this.disabled = false
return
}
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
try {
let res = await packInConfirm(this.val1, this.index, this.num, this.dataList)
let res = await confirmCallMaterial(this.val2, '', this.dataList)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -16,7 +16,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">总数量</span>
<span class="filter_label filter_input_disabled">总数量</span>
</view>
<view class="zd-col-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
@@ -28,7 +28,7 @@
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
v-model="val2"
/>
</view>
</view>
@@ -84,7 +84,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">出料</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_preProcessingDown">出料</button>
</view>
</view>
</template>
@@ -92,7 +92,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
import {queryPointInDownload, getGroupInfo, preProcessingDown} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -105,19 +105,22 @@
options: [{text:'原粉区', value: '1'}, {text:'批料室', value: '1'}, {text:'粉碎室1', value: 'f1'}, {text:'粉碎室2', value: 'f2'}],
index: '',
val1: '',
val2: '',
num: null,
dataList: [],
// dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._queryPointInDownload()
// this._queryPointInDownload()
},
methods: {
toEmpty () {
this.val1 = ''
this.val2 = ''
this.index = ''
this.num = ''
this.dataList = []
this.disabled = false
},
@@ -136,11 +139,12 @@
selectChange (e) {
this.index = e
},
async _queryPointInDtl () {
async _getGroupInfo () {
try {
let res = await queryPointInDtl(this.val1)
let res = await getGroupInfo(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
} else {
this.dataList = []
}
@@ -148,14 +152,14 @@
this.dataList = []
}
},
async _packInConfirm () {
async _preProcessingDown () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
let res = await preProcessingDown(this.val1, this.val2, this.index)
if (res) {
uni.showToast({
title: res.message,