|
@@ -66,6 +66,7 @@
|
|
|
<uni-table border stripe empty-text="暂无更多数据">
|
|
<uni-table border stripe empty-text="暂无更多数据">
|
|
|
<!-- 表头行 -->
|
|
<!-- 表头行 -->
|
|
|
<uni-tr class="custom-table-head">
|
|
<uni-tr class="custom-table-head">
|
|
|
|
|
+ <uni-th align="center" width="180px" class="break-col">推荐库位(数量)</uni-th>
|
|
|
<uni-th align="center" width="180px">物料</uni-th>
|
|
<uni-th align="center" width="180px">物料</uni-th>
|
|
|
<uni-th align="center" width="120px">应备数</uni-th>
|
|
<uni-th align="center" width="120px">应备数</uni-th>
|
|
|
<uni-th align="center" width="120px">已备数</uni-th>
|
|
<uni-th align="center" width="120px">已备数</uni-th>
|
|
@@ -75,6 +76,7 @@
|
|
|
<uni-tr v-for="(item, key) in tableData" :key="key" @click="handleToDetails(item)">
|
|
<uni-tr v-for="(item, key) in tableData" :key="key" @click="handleToDetails(item)">
|
|
|
<!-- 不可点击行 -->
|
|
<!-- 不可点击行 -->
|
|
|
<!-- <uni-tr v-for="(item, key) in tableData" :key="key"> -->
|
|
<!-- <uni-tr v-for="(item, key) in tableData" :key="key"> -->
|
|
|
|
|
+ <uni-td align="center" class="break-cell">{{ item.recommendStockLocation }}</uni-td>
|
|
|
<uni-td align="center">{{ item.materialNo }}({{ item.materialName }})</uni-td>
|
|
<uni-td align="center">{{ item.materialNo }}({{ item.materialName }})</uni-td>
|
|
|
<uni-td align="center">{{ item.nowDeliveredQty }}</uni-td>
|
|
<uni-td align="center">{{ item.nowDeliveredQty }}</uni-td>
|
|
|
<uni-td align="center"
|
|
<uni-td align="center"
|
|
@@ -372,9 +374,10 @@ const checkFifo = (qrCode) => {
|
|
|
|
|
|
|
|
const qrCode = ret.resp_result
|
|
const qrCode = ret.resp_result
|
|
|
|
|
|
|
|
- // 2. FIFO 校验
|
|
|
|
|
- const pass = await checkFifo(qrCode)
|
|
|
|
|
- if (!pass) return // 用户点了“取消”
|
|
|
|
|
|
|
+ // 2. FIFO 校验(暂时注释)
|
|
|
|
|
+ // const pass = await checkFifo(qrCode)
|
|
|
|
|
+ // if (!pass) return // 用户点了“取消”
|
|
|
|
|
+ const pass = true // FIFO校验直接放行
|
|
|
|
|
|
|
|
// 3. 业务接口
|
|
// 3. 业务接口
|
|
|
uni.$reqGet('scanPrepareMaterial', {
|
|
uni.$reqGet('scanPrepareMaterial', {
|
|
@@ -384,9 +387,12 @@ const checkFifo = (qrCode) => {
|
|
|
.then(async ({ code, data, msg }) => {
|
|
.then(async ({ code, data, msg }) => {
|
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
|
scanBatchNumber.value = qrCode
|
|
scanBatchNumber.value = qrCode
|
|
|
- // 更新仓库和货位名称
|
|
|
|
|
|
|
+ // 更新仓库和货位名称(直接覆盖)
|
|
|
erpStockName.value = data[0]?.erpStockName || ''
|
|
erpStockName.value = data[0]?.erpStockName || ''
|
|
|
wmsStoreName.value = data[0]?.wmsStoreName || ''
|
|
wmsStoreName.value = data[0]?.wmsStoreName || ''
|
|
|
|
|
+ // 更新仓库和货位名称(非空才覆盖,保留原有值)
|
|
|
|
|
+ // erpStockName.value = data[0]?.erpStockName || erpStockName.value
|
|
|
|
|
+ // wmsStoreName.value = data[0]?.wmsStoreName || wmsStoreName.value
|
|
|
if (Object.prototype.toString.call(data) === '[object Array]') {
|
|
if (Object.prototype.toString.call(data) === '[object Array]') {
|
|
|
fdIndex.value = tableData.value.findIndex(item => item?.materialNo === data[0]?.materialNo)
|
|
fdIndex.value = tableData.value.findIndex(item => item?.materialNo === data[0]?.materialNo)
|
|
|
}
|
|
}
|
|
@@ -472,9 +478,10 @@ const checkFifo = (qrCode) => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // FIFO 校验
|
|
|
|
|
- const pass = await checkFifo(e)
|
|
|
|
|
- if (!pass && !fifoGo.value) return
|
|
|
|
|
|
|
+ // FIFO 校验(暂时关闭)
|
|
|
|
|
+ // const pass = await checkFifo(e)
|
|
|
|
|
+ // if (!pass && !fifoGo.value) return
|
|
|
|
|
+ const pass = true // FIFO校验直接放行
|
|
|
uni.$reqGet('scanPrepareMaterial', {
|
|
uni.$reqGet('scanPrepareMaterial', {
|
|
|
qrCode: e,
|
|
qrCode: e,
|
|
|
locationCode: storeName.value // 传入库位编码
|
|
locationCode: storeName.value // 传入库位编码
|
|
@@ -483,9 +490,12 @@ const checkFifo = (qrCode) => {
|
|
|
fifoGo.value = false
|
|
fifoGo.value = false
|
|
|
if (code === 0) {
|
|
if (code === 0) {
|
|
|
scanBatchNumber.value = e
|
|
scanBatchNumber.value = e
|
|
|
- // 更新仓库和货位名称
|
|
|
|
|
|
|
+ // 更新仓库和货位名称(直接覆盖)
|
|
|
erpStockName.value = data[0]?.erpStockName || ''
|
|
erpStockName.value = data[0]?.erpStockName || ''
|
|
|
wmsStoreName.value = data[0]?.wmsStoreName || ''
|
|
wmsStoreName.value = data[0]?.wmsStoreName || ''
|
|
|
|
|
+ // 更新仓库和货位名称(非空才覆盖,保留原有值)
|
|
|
|
|
+ // erpStockName.value = data[0]?.erpStockName || erpStockName.value
|
|
|
|
|
+ // wmsStoreName.value = data[0]?.wmsStoreName || wmsStoreName.value
|
|
|
if (Object.prototype.toString.call(data) === '[object Array]') {
|
|
if (Object.prototype.toString.call(data) === '[object Array]') {
|
|
|
fdIndex.value = tableData.value.findIndex(item => item?.materialNo === data[0]?.materialNo)
|
|
fdIndex.value = tableData.value.findIndex(item => item?.materialNo === data[0]?.materialNo)
|
|
|
}
|
|
}
|
|
@@ -1294,4 +1304,18 @@ const checkFifo = (qrCode) => {
|
|
|
opacity: 0.5;
|
|
opacity: 0.5;
|
|
|
pointer-events: none;
|
|
pointer-events: none;
|
|
|
}
|
|
}
|
|
|
|
|
+ // /* 表头也允许换行,保证与列宽对齐 */
|
|
|
|
|
+ // ::v-deep .break-col {
|
|
|
|
|
+ // white-space: normal !important;
|
|
|
|
|
+ // word-break: break-all !important;
|
|
|
|
|
+ // line-height: 1.2;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // /* 单元格超长自动分段 */
|
|
|
|
|
+ // ::v-deep .break-cell {
|
|
|
|
|
+ // white-space: normal !important;
|
|
|
|
|
+ // word-break: break-all !important;
|
|
|
|
|
+ // line-height: 1.2;
|
|
|
|
|
+ // padding: 4px 2px; /* 上下留一点空隙,视觉更舒服 */
|
|
|
|
|
+ // }
|
|
|
</style>
|
|
</style>
|