Browse Source

2025-10-14

库存标签补打 增加属性变动
master
fengyuan_yang 3 months ago
parent
commit
7712a7b800
  1. 2
      src/api/wms/wms.js
  2. 303
      src/views/modules/print/rePrintPoPart.vue

2
src/api/wms/wms.js

@ -8,3 +8,5 @@ export const getPoPartLabelData = data => createAPI(`wmsPrint/getPoPartLabelData
export const deletePoPartLabelData = data => createAPI(`wmsPrint/deletePoPartLabelData`,'POST',data) export const deletePoPartLabelData = data => createAPI(`wmsPrint/deletePoPartLabelData`,'POST',data)
export const getKuCunLabelData = data => createAPI(`wmsPrint/getKuCunLabelData`,'POST',data) export const getKuCunLabelData = data => createAPI(`wmsPrint/getKuCunLabelData`,'POST',data)
// 更新库存标签属性
export const updateInventoryStockAttribute = data => createAPI(`wmsPrint/updateInventoryStockAttribute`,'POST',data)

303
src/views/modules/print/rePrintPoPart.vue

@ -44,6 +44,7 @@
<el-form-item style="margin-top: 5px"> <el-form-item style="margin-top: 5px">
<el-button @click="getMainData()" type="primary">查询</el-button> <el-button @click="getMainData()" type="primary">查询</el-button>
<el-button @click="printLabelModel()" type="primary">打印</el-button> <el-button @click="printLabelModel()" type="primary">打印</el-button>
<el-button @click="openAttributeChangeDialog()" type="warning">属性变动</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
@ -57,7 +58,7 @@
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
type="selection" type="selection"
width="55"
width="50"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -119,6 +120,28 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 属性变动对话框 -->
<el-dialog title="属性变动" :close-on-click-modal="false" v-drag :visible.sync="attributeChangeDialogVisible" width="450px">
<el-form :model="attributeChangeForm" label-position="top" style="margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="合约号码">
<el-input v-model="attributeChangeForm.batchNo" placeholder="请输入合约号码"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注说明">
<el-input type="textarea" :rows="3" v-model="attributeChangeForm.remark" placeholder="请输入备注说明"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height:35px;margin-top: 55px;text-align:center">
<el-button type="success" @click="saveAttributeChange()">保存</el-button>
<el-button type="primary" @click="attributeChangeDialogVisible=false">关闭</el-button>
</el-footer>
</el-dialog>
</div> </div>
</template> </template>
@ -127,7 +150,7 @@
import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js' import {getCRollInfoList} from '@/api/crollinfo/crollinfo.js'
import {rollPrint} from '@/api/finishedProductWarehouse/rollPrint.js' import {rollPrint} from '@/api/finishedProductWarehouse/rollPrint.js'
import {getInboundQcResultData, getKuCunLabelData} from '../../../api/wms/wms'
import {getInboundQcResultData, getKuCunLabelData, updateInventoryStockAttribute} from '../../../api/wms/wms'
import {kuCunLabelPrint} from '../clodopLabel/kuCunLabel' import {kuCunLabelPrint} from '../clodopLabel/kuCunLabel'
export default { export default {
@ -160,7 +183,7 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: "BU", columnLabel: "BU",
columnWidth: '70',
columnWidth: '60',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -176,7 +199,7 @@ export default {
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "rollNo", columnProp: "rollNo",
headerAlign: "center", headerAlign: "center",
align: "center",
align: "left",
columnLabel: "标签条码", columnLabel: "标签条码",
columnWidth: '110', columnWidth: '110',
columnHidden: false, columnHidden: false,
@ -189,13 +212,31 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1WarehouseId',
serialNumber: '680Table1QtyOnHand',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "warehouseId",
columnProp: "qtyOnHand",
headerAlign: "center",
align: "right",
columnLabel: "标签数量",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1Status',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "status",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "仓库编码",
columnLabel: "标签状态",
columnWidth: '100', columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -207,13 +248,49 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1LocationId',
serialNumber: '680Table1PartNo',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "locationId",
columnProp: "partNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "库位编码",
columnLabel: "物料编码",
columnWidth: '120',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1PartDescription',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "partDescription",
headerAlign: "center",
align: "left",
columnLabel: "物料名称",
columnWidth: '250',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1Spec',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "spec",
headerAlign: "center",
align: "left",
columnLabel: "规格型号",
columnWidth: '100', columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -225,13 +302,31 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1QtyOnHand',
serialNumber: '680Table1UmName',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "qtyOnHand",
columnProp: "umName",
headerAlign: "center", headerAlign: "center",
align: "right",
columnLabel: "标签数量",
align: "left",
columnLabel: "单位",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1LabelType',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "labelType",
headerAlign: "center",
align: "left",
columnLabel: "标签类型",
columnWidth: '100', columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -261,14 +356,14 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1PartNo',
serialNumber: '680Table1ParentRollType',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "partNo",
columnProp: "parentRollType",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "物料编码",
columnWidth: '120',
columnLabel: "上级标签类型",
columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -279,14 +374,14 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1PartDescription',
serialNumber: '680Table1WarehouseName',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "partDescription",
columnProp: "warehouseName",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "物料名称",
columnWidth: '240',
columnLabel: "仓库",
columnWidth: '120',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -297,14 +392,14 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1PartDescEn',
serialNumber: '680Table1LocationName',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "partDescEn",
columnProp: "locationName",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "英文物料名称",
columnWidth: '200',
columnLabel: "库位",
columnWidth: '120',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -315,14 +410,14 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1Status',
serialNumber: '680Table1FirstInDate',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "status",
columnProp: "firstInDate",
headerAlign: "center", headerAlign: "center",
align: "left",
columnLabel: "标签状态",
columnWidth: '80',
align: "center",
columnLabel: "入库日期",
columnWidth: '130',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -333,14 +428,50 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1LabelType',
serialNumber: '680Table1ManufactureDate',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "labelType",
columnProp: "manufactureDate",
headerAlign: "center",
align: "center",
columnLabel: "生产日期",
columnWidth: '130',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1ExpiredDate',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "expiredDate",
headerAlign: "center",
align: "center",
columnLabel: "有效期",
columnWidth: '130',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1Orderref0',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "orderref0",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "标签类型",
columnWidth: '80',
columnLabel: "来源单据类型",
columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -354,10 +485,10 @@ export default {
serialNumber: '680Table1OrderRef1', serialNumber: '680Table1OrderRef1',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "orderRef1",
columnProp: "orderref1",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "关联单号",
columnLabel: "来源单据号",
columnWidth: '100', columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -372,11 +503,11 @@ export default {
serialNumber: '680Table1OrderRef2', serialNumber: '680Table1OrderRef2',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "orderRef2",
columnProp: "orderref2",
headerAlign: "center", headerAlign: "center",
align: "right", align: "right",
columnLabel: "关联单行号",
columnWidth: '80',
columnLabel: "来源单据行号",
columnWidth: '100',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -387,13 +518,13 @@ export default {
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: this.functionId, functionId: this.functionId,
serialNumber: '680Table1ManufactureDate',
serialNumber: '680Table1BatchNo',
tableId: "680Table1", tableId: "680Table1",
tableName: "库存标签表", tableName: "库存标签表",
columnProp: "manufactureDate",
columnProp: "batchNo",
headerAlign: "center", headerAlign: "center",
align: "center",
columnLabel: "生产日期",
align: "left",
columnLabel: "合约号码",
columnWidth: '120', columnWidth: '120',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -402,6 +533,42 @@ export default {
status: true, status: true,
fixed: false fixed: false
}, },
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1Wdr',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "wdr",
headerAlign: "center",
align: "center",
columnLabel: "批次号",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '680Table1Remark',
tableId: "680Table1",
tableName: "库存标签表",
columnProp: "remark",
headerAlign: "center",
align: "left",
columnLabel: "备注说明",
columnWidth: '200',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
], ],
addModelData:{ addModelData:{
type:'A', type:'A',
@ -409,6 +576,12 @@ export default {
dataList: [], dataList: [],
addModelFlag: false, addModelFlag: false,
dataListLoading: false, dataListLoading: false,
//
attributeChangeDialogVisible: false,
attributeChangeForm: {
batchNo: '',
remark: ''
},
selectionDataList:[], selectionDataList:[],
} }
}, },
@ -475,6 +648,48 @@ export default {
printLabel(){ printLabel(){
kuCunLabelPrint(this.selectionDataList,"A") kuCunLabelPrint(this.selectionDataList,"A")
}, },
//
openAttributeChangeDialog() {
if(this.selectionDataList.length === 0){
this.$message.warning('请先勾选要变动属性的标签!');
return false;
}
//
this.attributeChangeForm = {
batchNo: '',
remark: ''
};
this.attributeChangeDialogVisible = true;
},
//
async saveAttributeChange() {
//
const updateList = this.selectionDataList.map(item => {
return {
site: item.site,
buNo: item.buNo,
rollNo: item.rollNo,
batchNo: this.attributeChangeForm.batchNo,
remark: this.attributeChangeForm.remark
};
});
try {
const {data} = await updateInventoryStockAttribute(updateList);
if(data && data.code === 0){
this.$message.success('属性变动成功');
this.attributeChangeDialogVisible = false;
//
this.getMainData();
} else {
this.$message.error(data.msg || '属性变动失败');
}
} catch (error) {
this.$message.error(error.msg || '属性变动失败,请重试');
}
},
}, },
created() { created() {

Loading…
Cancel
Save