仓库-出库单功能优化

This commit is contained in:
赵正易
2024-03-26 12:28:01 +08:00
parent 2cf3b116d3
commit 88cca6e5a5
7 changed files with 65 additions and 51 deletions

View File

@@ -165,8 +165,8 @@ export default {
this.printData.materialList = res.data
}
})
this.loading = false;
return;
// this.loading = false;
// return;
WmOutOrderApi.generateOutorderplan({ shipment_num: getKey }).then((res) => {
if (res.code === 200) {
this.printData.planlList = res.data

View File

@@ -38,7 +38,7 @@
</el-form>
<!-- 工具区域 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="primary"
v-hasPermi="['wmsManagement:wmgoodsnowproduction:add']"
@@ -46,9 +46,9 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>手动添加</el-button
>
</el-col> -->
</el-col>
<el-col :span="1.5">
<el-button
type="success"
@@ -88,10 +88,11 @@
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="description" label="描述" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="packageCodeClient" label="批次号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="locationCode" label="库位编号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="goodsNumLogic" label="标签零件数" align="center" />
<el-table-column prop="goodsNumAction" label="盘点零件数" align="center" />
<!-- <el-table-column prop="goodsNumLogic" label="标签零件数" align="center" /> -->
<el-table-column prop="goodsNumAction" label="实际库存" align="center" />
<el-table-column prop="entryWarehouseTime" label="入库时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
@@ -151,8 +152,8 @@
</el-col>
<el-col :lg="12">
<el-form-item label="盘点零件数" prop="goodsNumAction">
<el-input v-model="form.goodsNumAction" placeholder="请输入盘点零件数" />
<el-form-item label="实际库存" prop="goodsNumAction">
<el-input v-model="form.goodsNumAction" placeholder="请输入实际库存" />
</el-form-item>
</el-col>

View File

@@ -41,7 +41,7 @@
</el-form>
<!-- 工具区域 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="primary"
v-hasPermi="['wmsManagement:wmgoodsoutproduction:add']"
@@ -49,9 +49,9 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>手动添加</el-button
>
</el-col> -->
</el-col>
<el-col :span="1.5">
<el-button
type="success"
@@ -95,7 +95,7 @@
<el-table-column prop="locationCode" label="库位编号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="goodsNumLogic" label="标签零件数" align="center" />
<el-table-column prop="goodsNumAction" label="盘点零件数" align="center" />
<el-table-column prop="goodsNumAction" label="实际库存" align="center" />
<el-table-column prop="entryWarehouseTime" label="入库时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="outTime" label="出库时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
@@ -164,8 +164,8 @@
</el-col>
<el-col :lg="12">
<el-form-item label="盘点零件数" prop="goodsNumAction">
<el-input v-model="form.goodsNumAction" placeholder="请输入盘点零件数" />
<el-form-item label="实际库存" prop="goodsNumAction">
<el-input v-model="form.goodsNumAction" placeholder="请输入实际库存" />
</el-form-item>
</el-col>

View File

@@ -22,17 +22,17 @@
<el-form-item label="年" prop="year">
<el-input v-model="queryParams.year" placeholder="请输入年" />
</el-form-item>
<el-form-item label="" prop="week">
<el-input v-model="queryParams.week" placeholder="请输入" />
<el-form-item label="" prop="week">
<el-input v-model="queryParams.week" placeholder="请输入" />
</el-form-item>
<el-form-item label="日" prop="date">
<el-input v-model="queryParams.date" placeholder="请输入日" />
</el-form-item>
<el-form-item label="出库单号" prop="shipmentNum">
<el-input v-model="queryParams.shipmentNum" placeholder="请输入" />
<el-input v-model="queryParams.shipmentNum" placeholder="请输入出库单号" />
</el-form-item>
<el-form-item label="客户代码" prop="customNo">
<el-input v-model="queryParams.customNo" placeholder="请输入" />
<el-input v-model="queryParams.customNo" placeholder="请输入客户代码" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -137,11 +137,7 @@
title="删除"
@click="handleDelete(scope.row)"
></el-button>
<el-button
size="mini"
type="warning"
@click="handlePlan(scope.row)"
>出库计划</el-button>
<el-button size="mini" type="warning" @click="handlePlan(scope.row)">出库计划</el-button>
</template>
</el-table-column>
</el-table>
@@ -165,8 +161,8 @@
</el-form-item>
</el-col>
<el-col :lg="8">
<el-form-item label="" prop="week">
<el-input v-model="form.week" placeholder="请输入" :disabled="form.type === 2" />
<el-form-item label="" prop="week">
<el-input v-model="form.week" placeholder="请输入" :disabled="form.type === 2" />
</el-form-item>
</el-col>
<el-col :lg="8">
@@ -321,10 +317,10 @@ export default {
data() {
return {
TheChouseMaterialDialogVisible: false,
TheOutboundPlanDialogVisible:false,
showPrintDialog:false,
printKey:'',
planKey:'',
TheOutboundPlanDialogVisible: false,
showPrintDialog: false,
printKey: '',
planKey: '',
labelWidth: '100px',
formLabelWidth: '100px',
// 选中shipmentNum数组
@@ -506,7 +502,10 @@ export default {
this.reset()
this.open = true
this.title = '创建出库单'
this.opertype = 1
;(this.form.year = new Date().getFullYear()),
(this.form.week = new Date().getMonth() + 1),
(this.form.date = new Date().getDate()),
(this.opertype = 1)
},
/** 删除按钮操作 */
handleDelete(row) {
@@ -570,9 +569,8 @@ export default {
const list = JSON.parse(JSON.stringify(that.form.materialList))
const len = list.length
for (let index = 0; index < len; index++) {
if (Ids.includes(list[index].id)) {
console.log(that.form.materialList,index)
console.log(that.form.materialList, index)
that.form.materialList.splice(index, 1)
}
}
@@ -588,22 +586,20 @@ export default {
// 物料已选择
handlerMaterialChoused(list) {
//TODO 需要筛选未选择的
console.log('handlerMaterialChoused', list, this.form)
const _list = JSON.parse(JSON.stringify(list))
for (let index = 0; index < _list.length; index++) {
console.log('push', _list[index], this.form)
this.form.materialList.push(_list[index])
}
},
// 打印出库单
handlePrint(row) {
this.printKey = row.shipmentNum
this.showPrintDialog = true;
this.showPrintDialog = true
},
// 配置出库计划
handlePlan(row){
handlePlan(row) {
this.planKey = row.shipmentNum
this.TheOutboundPlanDialogVisible = true;
this.TheOutboundPlanDialogVisible = true
},
// ====================================================
/** 提交按钮 */
@@ -615,15 +611,25 @@ export default {
if (this.form.shipmentNum != undefined && this.opertype === 2) {
updateWmOutOrder(this.form)
.then((res) => {
if (res.code === 200) {
this.msgSuccess('修改成功')
this.open = false
this.getList()
} else {
this.msgSuccess('修改失败')
}
})
.catch((err) => {
//TODO 错误逻辑
})
} else {
console.log('addWmOutOrder')
for (let item of this.form.materialList) {
if ((item.requireOutNum * 1) < 1) {
this.$message.error('需求量不可为0!'+item.partnumber);
return;
}
}
// const postData = {
// customNo: 'BBBB',
// customName: 'BBB',
@@ -638,9 +644,13 @@ export default {
addWmOutOrder(this.form)
.then((res) => {
console.log('addWmOutOrder', res)
if (res.code === 200) {
this.msgSuccess('新增成功')
this.open = false
this.getList()
} else {
this.msgSuccess('新增失败')
}
})
.catch((err) => {
//TODO 错误逻辑

View File

@@ -128,7 +128,10 @@ export default {
},
getList() {
this.loading = true
const data = this.queryParams
const data = {
...this.formData,
...this.queryParams
}
getMaterialList(data).then((res) => {
if (res.code === 200) {
this.dataList = res.data.item1

View File

@@ -92,8 +92,8 @@ export default {
})
},
getList() {
this.loading = false;
return;
// this.loading = false;
// return;
this.loading = true
setTimeout(() => {
this.loading = false

View File

@@ -40,8 +40,8 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: 'http://192.168.90.92:8888/', // 后端接口地址
target: 'http://192.168.0.31:8888/', // 后端接口地址
target: 'http://192.168.60.251:8888/', // 后端接口地址
// target: 'http://192.168.0.31:8888/', // 后端接口地址
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '', //需要rewrite的
@@ -49,8 +49,8 @@ module.exports = {
},
msgHub: {
// target: 'http://192.168.90.92:8888/msgHub',
target: 'http://192.168.0.31:8888/msgHub',
target: 'http://192.168.60.251:8888/msgHub',
// target: 'http://192.168.0.31:8888/msgHub',
ws: true,
changeOrigin: true,
pathRewrite: {