This commit is contained in:
2025-10-17 14:27:22 +08:00
parent 1258f85322
commit 8d645fdada
29 changed files with 123 additions and 80 deletions

View File

@@ -57,7 +57,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-10">
<span class="filter_label">物料名称</span>
<span class="filter_label">物料品种</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.material_name">

View File

@@ -19,7 +19,7 @@
<thead>
<tr>
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
<th>物料名称</th>
<th>物料品种</th>
<th>物料编码</th>
<th>数量</th>
<th>批次号</th>

View File

@@ -18,7 +18,7 @@
<table>
<thead>
<tr>
<th>物料名称</th>
<th>物料品种</th>
<th>物料规格</th>
<th>物料编码</th>
</tr>

View File

@@ -23,7 +23,7 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料名称</span>
<span class="filter_label filter_input_disabled">物料品种</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
@@ -117,7 +117,7 @@
<tr>
<th>序号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>物料数量</th>
<th>单位</th>
<th>单据状态</th>

View File

@@ -22,7 +22,7 @@
</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_name" disabled>

View File

@@ -44,7 +44,7 @@
<view class="zd-col-16"><span class="filter_input">{{currentData.material_code}}</span></view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-8"><span class="filter_label">物料名称</span></view>
<view class="zd-col-8"><span class="filter_label">物料品种</span></view>
<view class="zd-col-16"><span class="filter_input">{{currentData.material_name}}</span></view>
</view>
<view class="zd-row border-bottom filter_input_disabled">

View File

@@ -29,7 +29,7 @@
<table>
<thead>
<tr>
<th>物料名称</th>
<th>物料品种</th>
<th>物料编码</th>
<th>数量</th>
<th>批次号</th>

View File

@@ -14,7 +14,7 @@
</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_name" disabled>

View File

@@ -34,7 +34,7 @@
<table>
<thead>
<tr>
<th>物料名称</th>
<th>物料品种</th>
<th>物料编码</th>
<th>数量</th>
<th>批次号</th>

View File

@@ -30,7 +30,7 @@
</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_name" disabled>

View File

@@ -25,7 +25,7 @@
</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_name" disabled>

View File

@@ -42,7 +42,7 @@
<view class="zd-col-16"><span class="filter_input">{{currentData.material_code}}</span></view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-8"><span class="filter_label">物料名称</span></view>
<view class="zd-col-8"><span class="filter_label">物料品种</span></view>
<view class="zd-col-16"><span class="filter_input">{{currentData.material_name}}</span></view>
</view>
<view class="zd-row border-bottom filter_input_disabled">

View File

@@ -43,7 +43,7 @@
<!-- <th>状态</th>
<th>点位</th>
<th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>单位</th>
<th>卷号</th> -->

View File

@@ -141,6 +141,7 @@
title: res.message,
icon: 'none'
})
this.currentData = {}
this.clearUp()
this.disabled = false
} catch (e) {

View File

@@ -39,7 +39,7 @@
<!-- <th>序号</th>
<th>卷号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>单位</th> -->
<th>{{$t('grid.number')}}</th>
@@ -161,32 +161,53 @@
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
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)
}
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)
},
fail: (err) => {
console.log('扫码失败:', err)

View File

@@ -25,7 +25,7 @@
<!-- <th>序号</th>
<th>卷号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>单位</th> -->
<th>{{$t('grid.number')}}</th>

View File

@@ -31,7 +31,7 @@
<!-- <th>序号</th>
<th>卷号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>单位</th> -->
<th>{{$t('grid.number')}}</th>
@@ -148,32 +148,53 @@
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
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)
}
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)
},
fail: (err) => {
console.log('扫码失败:', err)

View File

@@ -20,7 +20,7 @@
<thead>
<tr>
<!-- <th>物料编码</th>
<th>物料名称</th> -->
<th>物料品种</th> -->
<th>{{$t('grid.material-code')}}</th>
<th>{{$t('grid.material-name')}}</th>
</tr>

View File

@@ -29,7 +29,7 @@
<thead>
<tr>
<!-- <th>物料编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>单位</th>
<th>物料类型</th> -->
<th>{{$t('grid.material-code')}}</th>

View File

@@ -50,7 +50,7 @@
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
<th class="td_3">
<view class="td_3">
物料名称
物料品种
</view>
</th>
<th>物料编码</th>

View File

@@ -36,7 +36,7 @@
<tr>
<th>库位</th>
<th>载具编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>物料规格</th>
<th>物料编码</th>

View File

@@ -36,7 +36,7 @@
<tr>
<th>库位</th>
<th>载具编码</th>
<th>物料名称</th>
<th>物料品种</th>
<th>数量</th>
<th>物料规格</th>
<th>物料编码</th>

View File

@@ -17,7 +17,7 @@
</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_name" disabled>

View File

@@ -49,7 +49,7 @@
<thead>
<tr>
<th>选择</th>
<th class="td_3"><view class="td_3">物料名称</view></th>
<th class="td_3"><view class="td_3">物料品种</view></th>
<th>物料编码</th>
<th>物料状态</th>
<th>数量</th>

View File

@@ -17,7 +17,7 @@
</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_name" disabled>

View File

@@ -277,7 +277,7 @@
<td width="60%">${data.material_code}</td>
</tr>
<tr>
<td width="40%">物料名称</td>
<td width="40%">物料品种</td>
<td width="60%">${data.material_name}</td>
</tr>
<tr>