|
|
|
@ -161,9 +161,8 @@ |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- 操作列 --> |
|
|
|
<!-- rqrq - 申请单明细操作列不冻结:弹窗/页签里fixed会额外叠表,表头出现空白格且操作列错位 --> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="120" |
|
|
|
@ -212,9 +211,8 @@ |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- rqrq - 材料明细指定物料:仅已下达申请单可维护标签/批次指定 --> |
|
|
|
<!-- rqrq - 材料明细指定物料:仅已下达申请单可维护标签/批次指定;不冻结,避免页签切换后操作列失真 --> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="110" |
|
|
|
@ -450,17 +448,17 @@ |
|
|
|
</el-col> |
|
|
|
<el-col span="8"> |
|
|
|
<el-form-item label="申请数量" required> |
|
|
|
<el-input |
|
|
|
v-model="editMaterialData.qtyToIssue" |
|
|
|
:min="0" |
|
|
|
<el-input |
|
|
|
v-model="editMaterialData.qtyToIssue" |
|
|
|
:min="0" |
|
|
|
style="width: 98%;" |
|
|
|
@input="value => editMaterialData.qtyToIssue = value |
|
|
|
.replace(/[^\d.]/g, '') |
|
|
|
.replace(/\.{2,}/g, '.') |
|
|
|
.replace(/^\./, '0.') |
|
|
|
.replace(/(\.\d{4}).*/, '$1') |
|
|
|
.replace(/^0+(?=\d)/, '0') |
|
|
|
.replace(/^0+(?=\.)/, '0')" |
|
|
|
.replace(/[^\d.]/g, '') |
|
|
|
.replace(/\.{2,}/g, '.') |
|
|
|
.replace(/^\./, '0.') |
|
|
|
.replace(/(\.\d{4}).*/, '$1') |
|
|
|
.replace(/^0+(?=\d)/, '0') |
|
|
|
.replace(/^0+(?=\.)/, '0')" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -469,7 +467,7 @@ |
|
|
|
<el-input v-model="editMaterialData.issueType" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
@ -542,6 +540,19 @@ |
|
|
|
<div class="matched-labels">{{ scope.row.matchedSerialNos }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="failureMessage" |
|
|
|
label="不可推送原因" |
|
|
|
min-width="240" |
|
|
|
align="left" |
|
|
|
show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 服务端返回订单级阻断原因,避免库存数量满足但按钮禁用时现场无法判断处理方向 - rqrq --> |
|
|
|
<span v-if="scope.row.failureMessage || scope.row.failureCode" class="failure-message"> |
|
|
|
{{ formatFailureMessage(scope.row.failureMessage, scope.row.failureCode) }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" class="yzzButtonAn" @click="pushToWCS" :loading="pushLoading" |
|
|
|
@ -573,6 +584,7 @@ |
|
|
|
<el-button type="primary" size="small" @click="addNoOrderAllocRow('BATCH')">新增批次指定</el-button> |
|
|
|
<span style="margin-left: 10px; color: #909399; font-size: 12px;">保存后按当前列表顺序进行指定匹配</span> |
|
|
|
</div> |
|
|
|
<div class="rq"> |
|
|
|
<el-table :data="noOrderAllocForm.allocList" border v-loading="noOrderAllocLoading" height="360px" style="width: 100%;"> |
|
|
|
<el-table-column prop="rowNo" label="序号" width="60" align="center"></el-table-column> |
|
|
|
<el-table-column prop="allocType" label="类型" width="90" align="center"> |
|
|
|
@ -609,7 +621,8 @@ |
|
|
|
<el-input v-model="scope.row.allocQty" type="number" :min="0" :disabled="scope.row.allocType === 'LABEL'"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="right" label="操作" width="200" align="center"> |
|
|
|
<!-- rqrq - 指定物料弹窗操作列不冻结:弹窗内fixed会与输入行高冲突,出现空白列和末行裁切 --> |
|
|
|
<el-table-column label="操作" width="200" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, -1)">上移</el-button> |
|
|
|
<el-button type="text" size="small" @click="moveNoOrderAllocRow(scope.$index, 1)">下移</el-button> |
|
|
|
@ -617,6 +630,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" :loading="noOrderAllocSaving" :disabled="noOrderAllocSaving" @click="saveNoOrderMaterialAlloc">保存</el-button> |
|
|
|
<el-button :disabled="noOrderAllocSaving" @click="noOrderAllocDialogVisible = false">关闭</el-button> |
|
|
|
@ -2124,18 +2138,18 @@ export default { |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 使用完整的行数据,只更新申请数量 |
|
|
|
let materialData = { |
|
|
|
...this.editMaterialData, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 确保申请数量不为空 |
|
|
|
if (materialData.qtyToIssue === '' || materialData.qtyToIssue == null) { |
|
|
|
materialData.qtyToIssue = 0 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateMaterialDetail(materialData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.editMaterialModalFlag = false |
|
|
|
@ -2485,14 +2499,21 @@ export default { |
|
|
|
if (row && row.matchStatus === 'MATCHED') classNames.push('success-row') |
|
|
|
return classNames.join(' ') |
|
|
|
}, |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 数量展示去除无意义尾零,空值统一显示0 - rqrq |
|
|
|
*/ |
|
|
|
formatPreviewQty (value) { |
|
|
|
if (value === null || value === undefined || value === '') return '0' |
|
|
|
return String(value).replace(/(\.\d*?[1-9])0+$|\.0+$/, '$1') |
|
|
|
}, |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 不可推送原因包含后端拼接的数量文本,展示时去除小数尾部无效0,避免现场误读缺料数量 - rqrq |
|
|
|
*/ |
|
|
|
formatFailureMessage (message, fallback) { |
|
|
|
const text = message || fallback || '' |
|
|
|
return String(text).replace(/(-?\d+\.\d*?[1-9])0+(?!\d)/g, '$1').replace(/(-?\d+)\.0+(?!\d)/g, '$1') |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安查看页确认推送:只提交site和notifyNo,实际订单和标签由服务端重新匹配决定 - rqrq |
|
|
|
*/ |
|
|
|
pushToWCS () { |
|
|
|
|