Browse Source

标签特殊修改

master
常熟吴彦祖 3 months ago
parent
commit
5d653d23f1
  1. 196
      src/views/modules/warehouse/changeHUSpecialItem.vue

196
src/views/modules/warehouse/changeHUSpecialItem.vue

@ -17,14 +17,6 @@
<el-form-item label="仓库"> <el-form-item label="仓库">
<el-input style="width: 120px;" v-model="queryHeaderData.warehouseId" placeholder="请输入仓库" @keyup.enter.native="getDataList()"></el-input> <el-input style="width: 120px;" v-model="queryHeaderData.warehouseId" placeholder="请输入仓库" @keyup.enter.native="getDataList()"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="入库状态">
<el-select v-model="queryHeaderData.inStockFlag" placeholder="请选择" style="width: 120px;">
<el-option label="全部" value=""></el-option>
<el-option label="未入库" value="X"></el-option>
<el-option label="已出库" value="N"></el-option>
<el-option label="在库" value="Y"></el-option>
</el-select>
</el-form-item>
<el-form-item style="margin-top: 20px;"> <el-form-item style="margin-top: 20px;">
<el-button @click="getDataList()" type="primary">查询</el-button> <el-button @click="getDataList()" type="primary">查询</el-button>
<el-button @click="resetQuery()" type="default">重置</el-button> <el-button @click="resetQuery()" type="default">重置</el-button>
@ -383,7 +375,7 @@
@row-dblclick="handleAvailListDblClick" @row-dblclick="handleAvailListDblClick"
height="300" height="300"
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
prop="availabilityControlId" prop="availabilityControlId"
header-align="center" header-align="center"
@ -391,7 +383,7 @@
label="Availability Control ID" label="Availability Control ID"
min-width="180"> min-width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="availabilityControlDesc" prop="availabilityControlDesc"
header-align="center" header-align="center"
@ -453,7 +445,7 @@ export default {
batchNo: '', batchNo: '',
locationId: '', locationId: '',
warehouseId: '', warehouseId: '',
inStockFlag: ''
inStockFlag: 'Y'
}, },
// - rqrq // - rqrq
@ -493,17 +485,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "物料编号", columnLabel: "物料编号",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "partDesc",
headerAlign: "center",
align: "center",
columnLabel: "物料描述",
columnWidth: 150,
columnWidth: 100,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -513,7 +495,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "批次号", columnLabel: "批次号",
columnWidth: 120,
columnWidth: 140,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -523,7 +505,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
columnLabel: "数量", columnLabel: "数量",
columnWidth: 100,
columnWidth: 70,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -533,7 +515,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "库位", columnLabel: "库位",
columnWidth: 100,
columnWidth: 90,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -543,7 +525,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "仓库", columnLabel: "仓库",
columnWidth: 100,
columnWidth: 60,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -559,21 +541,11 @@ export default {
fixed: "" fixed: ""
}, },
{ {
columnProp: "inStockFlag",
columnProp: "availabilityControlId",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "入库状态",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "manufactureDate",
headerAlign: "center",
align: "center",
columnLabel: "生产日期",
columnWidth: 120,
columnLabel: "Availability Control Id",
columnWidth: 150,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
@ -583,141 +555,41 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "失效日期", columnLabel: "失效日期",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnWidth: 100, columnWidth: 100,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
}, },
{
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnWidth: 100,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "weightUnit",
headerAlign: "center",
align: "center",
columnLabel: "重量单位",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{ {
columnProp: "engChgLevel", columnProp: "engChgLevel",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "EngChgLevel", columnLabel: "EngChgLevel",
columnWidth: 120,
columnWidth: 90,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
}, },
{ {
columnProp: "reserveFlag",
headerAlign: "center",
align: "center",
columnLabel: "预留标志",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "reserveOrderRef1",
headerAlign: "center",
align: "center",
columnLabel: "预留订单参考1",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "reserveOrderRef2",
headerAlign: "center",
align: "center",
columnLabel: "预留订单参考2",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "reserveOrderRef3",
headerAlign: "center",
align: "center",
columnLabel: "预留订单参考3",
columnWidth: 120,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "freezeFlag",
headerAlign: "center",
align: "center",
columnLabel: "冻结标志",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "status",
headerAlign: "center",
align: "center",
columnLabel: "状态",
columnWidth: 80,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "createdDate",
headerAlign: "center",
align: "center",
columnLabel: "创建时间",
columnWidth: 150,
columnSortable: false,
showOverflowTooltip: true,
fixed: ""
},
{
columnProp: "createdBy",
columnProp: "manufactureDate",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "创建人",
columnLabel: "生产日期",
columnWidth: 100, columnWidth: 100,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
}, },
{ {
columnProp: "remark",
columnProp: "partDesc",
headerAlign: "center", headerAlign: "center",
align: "left",
columnLabel: "备注",
align: "center",
columnLabel: "物料描述",
columnWidth: 200, columnWidth: 200,
columnSortable: false, columnSortable: false,
showOverflowTooltip: true, showOverflowTooltip: true,
fixed: "" fixed: ""
}
},
] ]
} }
}, },
@ -856,7 +728,7 @@ export default {
// - rqrq // - rqrq
const selectedCount = this.dataListSelections.length const selectedCount = this.dataListSelections.length
// - rqrq // - rqrq
const inventoryKeySet = new Set() const inventoryKeySet = new Set()
this.dataListSelections.forEach(item => { this.dataListSelections.forEach(item => {
@ -947,7 +819,7 @@ export default {
// - rqrq // - rqrq
const selectedCount = this.dataListSelections.length const selectedCount = this.dataListSelections.length
// - rqrq // - rqrq
const inventoryKeySet = new Set() const inventoryKeySet = new Set()
this.dataListSelections.forEach(item => { this.dataListSelections.forEach(item => {
@ -982,7 +854,7 @@ export default {
batchChangeExpiryDate(requestData).then(({ data }) => { batchChangeExpiryDate(requestData).then(({ data }) => {
if (data && data.code == 0) { if (data && data.code == 0) {
const result = data.row const result = data.row
if (result.allSuccess) { if (result.allSuccess) {
// - rqrq // - rqrq
this.$message.success(`失效日期修改成功,共更新 ${result.successCount} 行ERP库存`) this.$message.success(`失效日期修改成功,共更新 ${result.successCount} 行ERP库存`)
@ -991,7 +863,7 @@ export default {
// - rqrq // - rqrq
let failedMsg = `成功:${result.successCount} 行,失败:${result.failCount}\n\n` let failedMsg = `成功:${result.successCount} 行,失败:${result.failCount}\n\n`
failedMsg += `以下标签更新失败:\n` failedMsg += `以下标签更新失败:\n`
for (let i = 0; i < result.failedUnitIds.length; i++) { for (let i = 0; i < result.failedUnitIds.length; i++) {
failedMsg += `- ${result.failedUnitIds[i]}` failedMsg += `- ${result.failedUnitIds[i]}`
if (result.failedReasons && result.failedReasons[i]) { if (result.failedReasons && result.failedReasons[i]) {
@ -999,7 +871,7 @@ export default {
} }
failedMsg += '\n' failedMsg += '\n'
} }
this.$alert(failedMsg, '部分更新失败', { this.$alert(failedMsg, '部分更新失败', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'warning', type: 'warning',
@ -1010,7 +882,7 @@ export default {
}) })
return return
} }
this.getDataList() this.getDataList()
} else { } else {
this.$alert(data.msg || '修改失败', '提示', { type: 'error' }) this.$alert(data.msg || '修改失败', '提示', { type: 'error' })
@ -1067,14 +939,14 @@ export default {
let list = data.rows || [] let list = data.rows || []
// - rqrq // - rqrq
if (this.availListQueryData.searchAvailabilityControlId) { if (this.availListQueryData.searchAvailabilityControlId) {
list = list.filter(item =>
item.availabilityControlId &&
list = list.filter(item =>
item.availabilityControlId &&
item.availabilityControlId.toUpperCase().includes(this.availListQueryData.searchAvailabilityControlId.toUpperCase()) item.availabilityControlId.toUpperCase().includes(this.availListQueryData.searchAvailabilityControlId.toUpperCase())
) )
} }
if (this.availListQueryData.searchAvailabilityControlDesc) { if (this.availListQueryData.searchAvailabilityControlDesc) {
list = list.filter(item =>
item.availabilityControlDesc &&
list = list.filter(item =>
item.availabilityControlDesc &&
item.availabilityControlDesc.toUpperCase().includes(this.availListQueryData.searchAvailabilityControlDesc.toUpperCase()) item.availabilityControlDesc.toUpperCase().includes(this.availListQueryData.searchAvailabilityControlDesc.toUpperCase())
) )
} }
@ -1102,7 +974,7 @@ export default {
this.availFormData.newAvailDesc = '' this.availFormData.newAvailDesc = ''
return return
} }
getDescById(this.availFormData.newAvailId).then(({ data }) => { getDescById(this.availFormData.newAvailId).then(({ data }) => {
if (data && data.code == 0) { if (data && data.code == 0) {
// rownull - rqrq // rownull - rqrq
@ -1125,7 +997,7 @@ export default {
// - rqrq // - rqrq
const selectedCount = this.dataListSelections.length const selectedCount = this.dataListSelections.length
// - rqrq // - rqrq
const inventoryKeySet = new Set() const inventoryKeySet = new Set()
this.dataListSelections.forEach(item => { this.dataListSelections.forEach(item => {
@ -1160,7 +1032,7 @@ export default {
batchChangeAvailabilityControlId(requestData).then(({ data }) => { batchChangeAvailabilityControlId(requestData).then(({ data }) => {
if (data && data.code == 0) { if (data && data.code == 0) {
const result = data.row const result = data.row
if (result.allSuccess) { if (result.allSuccess) {
// - rqrq // - rqrq
this.$message.success(`Availability Control ID修改成功,共更新 ${result.successCount} 行ERP库存`) this.$message.success(`Availability Control ID修改成功,共更新 ${result.successCount} 行ERP库存`)
@ -1169,7 +1041,7 @@ export default {
// - rqrq // - rqrq
let failedMsg = `成功:${result.successCount} 行,失败:${result.failCount}\n\n` let failedMsg = `成功:${result.successCount} 行,失败:${result.failCount}\n\n`
failedMsg += `以下标签更新失败:\n` failedMsg += `以下标签更新失败:\n`
for (let i = 0; i < result.failedUnitIds.length; i++) { for (let i = 0; i < result.failedUnitIds.length; i++) {
failedMsg += `- ${result.failedUnitIds[i]}` failedMsg += `- ${result.failedUnitIds[i]}`
if (result.failedReasons && result.failedReasons[i]) { if (result.failedReasons && result.failedReasons[i]) {
@ -1177,7 +1049,7 @@ export default {
} }
failedMsg += '\n' failedMsg += '\n'
} }
this.$alert(failedMsg, '部分更新失败', { this.$alert(failedMsg, '部分更新失败', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'warning', type: 'warning',
@ -1188,7 +1060,7 @@ export default {
}) })
return return
} }
this.getDataList() this.getDataList()
} else { } else {
this.$alert(data.msg || '修改失败', '提示', { type: 'error' }) this.$alert(data.msg || '修改失败', '提示', { type: 'error' })

Loading…
Cancel
Save