Browse Source

增加冻结按钮

master
赵宏斌 3 months ago
parent
commit
36271f28a5
  1. 1
      src/api/wms/wms.js
  2. 37
      src/views/modules/print/rePrintPoPart.vue

1
src/api/wms/wms.js

@ -8,6 +8,7 @@ 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 freezeStatusInventoryStock = data => createAPI(`wmsPrint/freezeStatusInventoryStock`,'POST',data)
// 更新库存标签属性 // 更新库存标签属性
export const updateInventoryStockAttribute = data => createAPI(`wmsPrint/updateInventoryStockAttribute`,'POST',data) export const updateInventoryStockAttribute = data => createAPI(`wmsPrint/updateInventoryStockAttribute`,'POST',data)
// 获取仓库列表 // 获取仓库列表

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

@ -62,6 +62,7 @@
<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-button @click="openAttributeChangeDialog()" type="warning">属性变动</el-button>
<el-button @click="freezeStatus()" type="primary">冻结</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -166,7 +167,13 @@
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, updateInventoryStockAttribute, getWarehouseList} from '../../../api/wms/wms'
import {
getInboundQcResultData,
getKuCunLabelData,
updateInventoryStockAttribute,
getWarehouseList,
freezeStatusInventoryStock
} from '../../../api/wms/wms'
import {kuCunLabelPrint} from '../clodopLabel/kuCunLabel' import {kuCunLabelPrint} from '../clodopLabel/kuCunLabel'
export default { export default {
@ -723,6 +730,34 @@ export default {
this.$message.error(error.msg || '属性变动失败,请重试'); this.$message.error(error.msg || '属性变动失败,请重试');
} }
}, },
freezeStatus() {
if (this.selectionDataList.length === 0) {
this.$message.warning('请先勾选要冻结的标签!')
return false
}
let flag = true
this.selectionDataList.forEach((item)=>{
if (item.status != '在库'){
flag = false
}
})
if (!flag) {
this.$message.warning("勾选的内容存在不是'在库'状态的数据")
return false
}
this.$confirm('确认冻结所选的' + this.selectionDataList.length + '条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
freezeStatusInventoryStock(this.selectionDataList).then(({data}) => {
if (data.code == 0) {
this.$message.success('操作成功')
this.getMainData()
}
}).catch()
})
}
}, },
created() { created() {

Loading…
Cancel
Save