This commit is contained in:
2026-01-09 10:19:19 +08:00
parent e05a972dbd
commit ddf1525626
7 changed files with 248 additions and 38 deletions

View File

@@ -412,6 +412,13 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/tygn/mater-save",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/wrcdj/wrc-load",
"style" :

View File

@@ -25,18 +25,19 @@
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-13">
<search-box v-model="materialData.material_code"/>
<!-- <search-box v-model="materialData.material_code"/> -->
<input type="text" class="filter_input" v-model="materialData.material_code" disabled>
</view>
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
<button class="mini-btn" type="primary" @tap="toJump('mater-save?title=物料维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<view class="zd-col-6">
<span class="filter_label">批号</span>
</view>
<view class="zd-col-14">
<view class="zd-col-13">
<input type="text" class="filter_input" v-model="val2">
</view>
<button class="mini-btn" type="primary" @tap="_queryHistoryTask">查询</button>
<button class="mini-btn" type="primary" @tap="_queryIvt">查询</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -51,7 +52,6 @@
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
@@ -62,18 +62,17 @@
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.point_code1}}</td>
<td>{{e.point_code2}}</td>
<td>{{e.task_code}}</td>
<td>{{e.config_name}}</td>
<td>{{e.car_no}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.canuse_qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.class_name}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.insert_time}}</td>
<td>{{e.storagevehicle_code}}</td>
</tr>
</tbody>
</table>
@@ -86,7 +85,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryHistoryTask} from '@/utils/getData2.js'
import {queryIvt} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -95,9 +94,10 @@
data() {
return {
title: '',
options1: [],
options: [{text:'原粉', value: '1'}, {text:'辅料', value: '2'}, {text:'批料室', value: '3'}, {text:'中间站', value: '4'}, {text:'内包材', value: '5'}, {text:'外包材', value: '6'}],
index1: '',
// options1: [],
materialData: {},
options1: [{text:'原料', value: 'WYL01'}, {text:'辅料', value: 'WFL01'}, {text:'批料室', value: 'PZC01'}, {text:'中间站', value: 'ZZC01'}, {text:'内包材', value: 'NBC01'}, {text:'外包材', value: 'WBC01'}],
index1: 'WYL01',
val1: '',
val2: '',
dataList: []
@@ -105,7 +105,12 @@
},
onLoad (options) {
this.title = options.title
this._queryHistoryTask()
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.materialData = this.$store.getters.publicObj
this.$store.dispatch('setPublicObj', '')
}
},
methods: {
toEmpty () {
@@ -115,12 +120,12 @@
},
toJump (name) {
uni.navigateTo({
url: `/pages/hdyy/wbc/${name}`
url: `/pages/hdyy/tygn/${name}`
})
},
async _queryHistoryTask () {
async _queryIvt () {
try {
let res = await queryHistoryTask(this.val1)
let res = await queryIvt(this.index1, this.val1, this.materialData.material_code, this.val2)
if (res && res.data) {
this.dataList = [...res.data]
} else {

View File

@@ -0,0 +1,100 @@
<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-5">
<span class="filter_label">关键字</span>
</view>
<view class="zd-col-14">
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
</view>
<button class="mini-btn" type="primary" @tap="_queryMaterial">查询</button>
</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>
</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.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.class_name}}</td>
<td>{{e.unit_name}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-24 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 {queryMaterial} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
keyword: null,
dataList: [],
pkId: '',
pkObj: {}
};
},
onLoad (options) {
this.title = options.title
this._queryMaterial()
},
methods: {
handleFocus () {
this.keyword = null
},
async _queryMaterial () {
try {
let res = await queryMaterial(this.keyword)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
toCheck (e) {
this.pkId = this.pkId === e.material_code ? '' : e.material_code
this.pkObj = this.pkId === e.material_code ? e : {}
},
toSure () {
if (this.pkId) {
this.$store.dispatch('setPublicObj', this.pkObj)
uni.navigateBack()
}
}
}
}
</script>

View File

@@ -28,7 +28,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
<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.material_spec}}</td>
@@ -86,8 +86,8 @@
}
},
toCheck (e) {
this.pkId = this.pkId === e.material_id ? '' : e.material_id
this.pkObj = this.pkId === e.material_id ? e : {}
this.pkId = this.pkId === e.material_code ? '' : e.material_code
this.pkObj = this.pkId === e.material_code ? e : {}
},
toSure () {
if (this.pkId) {

View File

@@ -11,6 +11,7 @@
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
@@ -114,11 +115,17 @@
selectChange (e) {
this.index = e
},
handleChange (e) {
if (e) {
this._queryPointInDtl()
}
},
async _queryPointInDtl () {
try {
let res = await queryPointInDtl(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 = []
}

View File

@@ -50,9 +50,9 @@
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">卸货</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">等待</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_queryDrawConfirm">回库</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index2 || !checkedArr.length}" :disabled="disabled" @tap="_unload">卸货</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_waiting">等待</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !checkedArr.length}" :disabled="disabled" @tap="_back">回库</button>
</view>
</view>
</template>
@@ -60,7 +60,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryXhRegion, queryPointRegion, queryRegionPoint, queryDrawConfirm} from '@/utils/getData3.js'
import {queryXhRegion, queryEndRegion, queryRegionPoint, unload, waiting, back} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -82,6 +82,8 @@
},
onLoad (options) {
this.title = options.title
this._queryRegionPoint()
this._queryEndRegion()
},
methods: {
selectChange (e) {
@@ -102,9 +104,9 @@
}
},
/** 下拉框*/
async _queryPointRegion2 () {
async _queryEndRegion () {
try {
let res = await queryPointRegion()
let res = await queryEndRegion()
if (res && res.data) {
this.options2 = [...res.data]
} else {
@@ -143,15 +145,57 @@
this.dataList = []
}
},
async _queryDrawConfirm () {
async _unload () {
this.checkedArr = this.dataList.filter(el => el.checked === true)
this.disabled = true
if (!this.val1 || !this.checkedArr.length) {
if (!this.index2 || !this.checkedArr.length) {
this.disabled = false
return
}
try {
let res = await queryDrawConfirm(this.val1, this.num, this.checkedArr)
let res = await unload(this.index2, this.checkedArr)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _waiting () {
this.checkedArr = this.dataList.filter(el => el.checked === true)
this.disabled = true
if (!this.checkedArr.length) {
this.disabled = false
return
}
try {
let res = await waiting()
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _back () {
this.checkedArr = this.dataList.filter(el => el.checked === true)
this.disabled = true
if (!this.checkedArr.length) {
this.disabled = false
return
}
try {
let res = await back()
if (res) {
uni.showToast({
title: res.message,

View File

@@ -340,4 +340,51 @@ export const againSendTask = (obj) => request({
export const forceConfirmTask = (obj) => request({
url:'api/pdaTask/forceConfirmTask',
data: {obj}
})
// 库存查询(通用功能)共 (2) 个
// 查询物料维护信息
export const queryMaterial = (search) => request({
url:'/api/queryIvt/queryMaterial',
data: {search: search}
})
// 主页面库存查询
export const queryIvt = (scode, pcode, mcode, pcsn) => request({
url:'/api/queryIvt/queryIvt',
data: {sect_code: scode, point_code: pcode, material_code: mcode, pcsn: pcsn}
})
/**
* 无人车
*/
// 无人车卸货(无人车对接)共 (6) 个
// 查询卸货区下拉框
export const queryXhRegion = () => request({
url:'api/notCar/queryXhRegion',
data: {}
})
// 根据区域查询对应点位
export const queryRegionPoint = (rcode) => request({
url:'api/notCar/queryRegionPoint',
data: {region_code: rcode}
})
// 查询目的区域下拉框
export const queryEndRegion = () => request({
url:'api/notCar/queryEndRegion',
data: {}
})
// 卸货
export const unload = (rcode, rows) => request({
url:'api/notCar/unload',
data: {region_code: rcode, rows: rows}
})
// 等待
export const waiting = () => request({
url:'api/notCar/waiting',
data: {}
})
// 回库
export const back = () => request({
url:'api/notCar/back',
data: {}
})