This commit is contained in:
2025-09-08 17:48:45 +08:00
parent 40740964ab
commit 6cd801410e
6 changed files with 283 additions and 156 deletions

View File

@@ -499,6 +499,13 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/zw/wl-list",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -6,34 +6,7 @@
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">日期</span>
</view>
<view class="zd-col-24 filter_select">
<!-- <uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select> -->
<uni-datetime-picker type="date" :value="singleDate" @change="onSingleDateChange" />
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">单据</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位码</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val2"
/>
</view>
</view>
<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-17">
<search-box
@@ -97,17 +70,23 @@
<table>
<thead>
<tr>
<th>选择</th>
<th>托盘码</th>
<th>删除选择</th>
<th>点位码</th>
<th>托盘码</th>
<th>物料编码</th>
<th>重量</th>
<th>单据</th>
</tr>
</thead>
<tbody>
<!-- <tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.vid}"> -->
<!-- <tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.site_code}"> -->
<tr v-for="(e, i) in dataList" :key="i">
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
<td>{{e.vehicle_code}}</td>
<td>{{e.site_code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.qty}}</td>
<td>{{e.bill_code}}</td>
</tr>
</tbody>
</table>
@@ -116,7 +95,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @tap="toDel()">删除选中行</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !index || !dataList.length}" @tap="_zwConfirmIn">全部提交</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !dataList.length}" @tap="_zwConfirmIn">全部提交</button>
</view>
</view>
</template>
@@ -134,15 +113,19 @@
return {
singleDate: '',
title: '',
options: [],
index: '',
options2: [{text:'当天', value: '1'}, {text:'前一天', value: '2'}],
index2: '',
id: '',
code: '',
val1: '',
val2: '',
dataList: [],
pkId: '',
pkObj: {},
// dataList: [],
dataList: [
{site_code: 's01', vehicle_code: 'v01', checked: false},
{site_code: 's02', vehicle_code: 'v02', checked: false},
{site_code: 's03', vehicle_code: 'v03', checked: false},
{site_code: 's04', vehicle_code: 'v04', checked: false}
],
checkedArr: [],
pkId: '',
currentData: {},
@@ -155,13 +138,8 @@
this.id = options.id
},
created () {
this._getFormDataList()
},
methods: {
onSingleDateChange(e) {
this.singleDate = e
this._getFormDataList()
},
handleChange (e) {
if (e) {
this._inCheck()
@@ -171,58 +149,45 @@
if (!this.val1 || !this.val2) {
return
}
this.dataList.push({vehicle_code: this.val1, site_code: this.val2})
this.dataList.map(el => {
this.$set(el, 'checked', false)
})
},
async _getPlate () {
try {
let res = await getPlate(this.val1)
if (res.code === '200') {
this.flag = true
this.currentData = res.data
setTimeout(() => {
this.flag = false
},1000)
this.handleAdd()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
} catch (e) {
}
},
// async _getPlate () {
// try {
// let res = await getPlate(this.val1)
// if (res.code === '200') {
// this.flag = true
// this.currentData = res.data
// setTimeout(() => {
// this.flag = false
// },1000)
// this.handleAdd()
// } else {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// }
// } catch (e) {
// }
// },
toDel () {
this.dataList = this.dataList.filter(el => el.checked === false)
},
async _getFormDataList () {
try {
let res = await getFormDataList(this.singleDate)
if (res) {
this.options = res.data
} else {
this.options = []
}
} catch (e) {
this.options = []
}
toChek (e) {
this.pkId = this.pkId === e.site_code ? '' : e.site_code
this.pkObj = this.pkId === e.site_code ? e : {}
},
selectChange (e) {
this.index = e
},
selectChange2 (e) {
this.index2 = e
},
// toChek (e) {
// this.pkId = this.pkId === e.vid ? '' : e.vid
// this.pkObj = this.pkId === e.vid ? e : {}
// },
toCheck (e) {
e.checked = !e.checked
this.checkedArr = this.dataList.filter(el => el.checked === true)
if (this.checkedArr.length > 0) {
this.dataList.map(el => {
this.$set(el, 'checked', false)
})
e.checked = !e.checked
}
},
clearUp () {
this.dataList = []
@@ -230,8 +195,9 @@
},
async _inCheck () {
try {
let res = await inCheck(this.val2, this.val1)
let res = await inCheck(this.val1)
if (res.code === '200') {
this.dataList = res.data
this.handleAdd()
} else {
uni.showToast({
@@ -244,12 +210,12 @@
},
async _zwConfirmIn () {
this.disabled = true
if (!this.index || !this.dataList.length) {
if (!this.dataList.length) {
this.disabled = false
return
}
try {
let res = await zwConfirmIn(this.index, this.dataList)
let res = await zwConfirmIn(this.dataList)
if (res.code === '200') {
uni.showToast({
title: res.message,

View File

@@ -25,15 +25,15 @@
<span class="filter_label">料桶号</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.storagevehicle_code" @tap="toJump">
</view>
</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-17">
<input type="text" class="filter_input" v-model="currentData.material_name">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
@@ -46,20 +46,31 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料规格</span>
<span class="filter_label filter_input_disabled">库位</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.struct_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料编码</span>
<span class="filter_label filter_input_disabled">数量(kg)</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
</view>
</view>
<!-- <view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">数量(kg)</span>
</view>
<view class="zd-col-17">
<NumberInput
v-model="val3"
mode="integer"
/>
</view>
</view> -->
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">供应商编码</span>
@@ -88,7 +99,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !this.index || !this.index2 || !this.val1 || !this.currentData.material_code || !this.index4}" :disabled="disabled" @tap="_checkoutbillcallMaterial">确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !this.index || !this.val1 || !this.currentData.material_code || !this.index4}" :disabled="disabled" @tap="_checkoutbillcallMaterial">确认</button>
</view>
</view>
</template>
@@ -96,7 +107,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getPdaSect, getPdaVehicleCodeBySectCode, getMaterialSuppByVehicleCode, checkoutbillcallMaterial} from '@/utils/getData4.js'
import {getPdaCallMaterialSect, checkoutbillcallMaterial} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -108,8 +119,6 @@
title: '',
options: [],
index: '',
options2: [],
index2: '',
options4: [{text:'单独上料', value:'1'}, {text:'下空桶上满料', value: '2'}],
index4: '',
currentData: {},
@@ -120,14 +129,22 @@
this.title = options.title
},
onShow() {
if (this.$store.getters.publicObj !== '') {
this.currentData = this.$store.getters.publicObj
}
},
created () {
this._getPdaSect()
this._getPdaCallMaterialSect()
},
methods: {
async _getPdaSect () {
toJump () {
uni.navigateTo({
url: '/pages/ftdl/wl-list?title=查询物料&sectcode=' + this.index
})
},
async _getPdaCallMaterialSect () {
try {
let res = await getPdaSect()
let res = await getPdaCallMaterialSect(this.val1)
if (res) {
this.options = res.data
} else {
@@ -137,43 +154,9 @@
this.options = []
}
},
async _getPdaVehicleCodeBySectCode () {
try {
let res = await getPdaVehicleCodeBySectCode(this.index)
if (res) {
this.options2 = res.data
} else {
this.options2 = []
}
} catch (e) {
this.options2 = []
}
},
async _getMaterialSuppByVehicleCode () {
try {
let res = await getMaterialSuppByVehicleCode(this.index2)
if (res.code === '200') {
this.currentData = res.data
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
} catch (e) {
}
},
selectChange (e) {
if (e) {
this.index = e
this.index2 = ''
this._getPdaVehicleCodeBySectCode(e)
}
},
selectChange2 (e) {
this.index2 = e
if (this.index && this.index2) {
this._getMaterialSuppByVehicleCode()
}
},
selectChange4 (e) {
@@ -181,19 +164,18 @@
},
clearUp () {
this.index = ''
this.index2 = ''
this.val1 = ''
this.currentData = {}
this.disabled = false
},
async _checkoutbillcallMaterial () {
this.disabled = true
if (!this.index || !this.index2 || !this.val1 || !this.currentData.material_code || !this.index4) {
if (!this.index || !this.val1 || !this.currentData.material_code || !this.index4) {
this.disabled = false
return
}
try {
let res = await checkoutbillcallMaterial(this.val1, this.index2, this.currentData.material_code, this.index4, this.currentData.supp_code, this.currentData.supp_name)
let res = await checkoutbillcallMaterial(this.val1, this.index, this.currentData.material_code, this.index4, this.currentData.supp_code, this.currentData.supp_name)
if (res.code === '200') {
uni.showToast({
title: res.message,

View File

@@ -28,14 +28,6 @@
<uni-data-select v-model="index4" :localdata="options4" @change="selectChange4"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">供应商</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index5" :localdata="options5" @change="selectChange5"></uni-data-select>
</view>
</view>
<view v-if="index4 === '1'">
<view class="zd-row border-bottom">
<view class="zd-col-7">
@@ -45,6 +37,14 @@
<input type="text" class="filter_input" v-model="currentData.material_name" @tap="toJump">
</view>
</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-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料名称</span>
@@ -63,23 +63,38 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料编码</span>
<span class="filter_label filter_input_disabled">物料数量(kg)</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<!-- <view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料数量</span>
<span class="filter_label">物料数量(kg)</span>
</view>
<view class="zd-col-17">
<!-- <NumberInput v-model="val3" /> -->
<NumberInput
v-model="val3"
mode="integer"
/>
</view>
</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-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.supp_code" disabled>
</view>
</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-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.supp_name" disabled>
</view>
</view>
</view>
</view>
@@ -160,6 +175,7 @@
let res = await getMaterialSuppByVehicleCode(this.val2)
if (res.code === '200') {
this.currentData = res.data
this.val3 = this.currentData.qty
} else {
uni.showToast({
title: res.message,

144
pages/zw/wl-list.vue Normal file
View File

@@ -0,0 +1,144 @@
<template>
<view class="zd_container">
<!-- 查询物料 -->
<nav-bar :title="title" :inner="true"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="val1">
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>物料编码</th>
<th>物料名称</th>
<th>库位</th>
<th>料桶号</th>
<th>数量</th>
<th>供应商编码</th>
<th>供应商名称</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_code === pkId}" @tap="toCheck(e)">
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.measure_unit_id}}</td>
<td>{{e.measure_unit_id}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getStructivtByMaterialAndSectCode} from '@/utils/getData4.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
sectcode: '',
dataList: [],
// dataList: [
// {material_code: 'code1', material_name: 'name1', measure_unit_id: '千克'},
// {material_code: 'code2', material_name: 'name2', measure_unit_id: '千克'},
// {material_code: 'code3', material_name: 'name3', measure_unit_id: '千克'},
// ],
pkId: '',
pkObj: {},
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10
};
},
onLoad (options) {
this.title = options.title
this.sectcode = options.sectcode
// this.searchList()
},
methods: {
searchList () {
this.dataList = []
this.pageNum = 1
this._getStructivtByMaterialAndSectCode()
},
async _getStructivtByMaterialAndSectCode () {
let res = await getStructivtByMaterialAndSectCode(this.sectcode, this.val1)
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {
// const dataMap = res.data
// this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
// this.reload = false
// } else {
// this.dataList = []
// }
// if (this.totalCount == this.dataList.length) {
// this.reload = false
// this.status = 'noMore'
// }
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._getStructivtByMaterialAndSectCode()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
toCheck (e) {
this.pkId = this.pkId === e.material_code ? '' : e.material_code
this.pkObj = this.pkId === e.material_code ? e : {}
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.pageNum = 1
this.pkId = ''
},
toSure () {
if (this.pkId) {
this.$store.dispatch('setPublicObj', this.pkObj)
uni.navigateBack()
}
}
}
}
</script>

View File

@@ -213,9 +213,9 @@ export const getAllIntoRegionMembers = (rcode) => request({
// 来料入库
// 来料入库接口
export const zwConfirmIn = (fdcode, plist) => request({
export const zwConfirmIn = (plist) => request({
url:'api/pda/iosIn/zwConfirmIn',
data: {form_data_code: fdcode, param_list: plist}
data: {param_list: plist}
})
// 获取单据下拉清单
export const getFormDataList = (date) => request({
@@ -228,9 +228,9 @@ export const getPlate = (vcode) => request({
data: {vehicle_code: vcode}
})
// PDA来料入库校验点位和托盘码
export const inCheck = (scode, vcode) => request({
export const inCheck = (svcode) => request({
url:'api/pda/iosIn/inCheck',
data: {site_code: scode, vehicle_code: vcode}
data: {site_vehicle_code: svcode}
})
// 空载具出入库
@@ -276,11 +276,23 @@ export const getPdaVehicleCodeBySectCode = (scode) => request({
url:'api/pda/iosOut/getPdaVehicleCodeBySectCode',
data: {sect_code: scode}
})
// 根据料桶号获得物料、供应商详情
// 根据料桶号获得物料、供应商详情(退料用)
export const getMaterialSuppByVehicleCode = (vcode) => request({
url:'api/pda/iosOut/getMaterialSuppByVehicleCode',
data: {vehicle_code: vcode}
})
// 手工叫料获取库区
export const getPdaCallMaterialSect = (pcode) => request({
url:'api/pda/iosIn/getPdaCallMaterialSect',
data: {point_code: pcode}
})
// 根据库区、物料信息获取库存信息
export const getStructivtByMaterialAndSectCode = (scode, mcode) => request({
url:'api/pda/iosOut/getStructivtByMaterialAndSectCode',
data: {sect_code: scode, material_code: mcode}
})
// 点位属性设置
export const updatePointType = (code, type) => request({
url:'api/schBasePoint/updatePointType',