Compare commits
12 Commits
ae39ff817a
...
aa42830129
Author | SHA1 | Date | |
---|---|---|---|
aa42830129 | |||
d2a380ce43 | |||
d943dc5301 | |||
256334926a | |||
b831b2c7fd | |||
997b2c7bfe | |||
f9ae0cb09a | |||
4562254d3f | |||
4ae2cfa714 | |||
9d1056aae1 | |||
28f1be0f13 | |||
0c8aca192b |
@ -140,7 +140,7 @@ export default {
|
||||
itemCode: undefined,
|
||||
itemName: undefined,
|
||||
itemTypeId: 0,
|
||||
itemOrProduct: "ITEM"
|
||||
itemOrProduct: ""
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
|
@ -171,9 +171,9 @@
|
||||
<!-- 添加或修改出库计划管理对话框 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" append-to-body width="60%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="计划编号" prop="planCode">
|
||||
<el-input v-model="form.planCode" placeholder="请输入计划编号" :readonly="title == '修改出库计划管理'"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="计划编号" prop="planCode">-->
|
||||
<!-- <el-input v-model="form.planCode" placeholder="请输入计划编号" :readonly="title == '修改出库计划管理'"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="出库类型" prop="wmsBusinessTypeId">
|
||||
<el-select v-model="form.wmsBusinessTypeId" placeholder="请选择出库类型">
|
||||
<el-option
|
||||
|
@ -222,11 +222,23 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="物料名称" prop="itemName">
|
||||
<el-input v-model="form.itemName" maxlength="255" readonly="readonly" v-if="optType=='view'"/>
|
||||
<el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="form.attr3"
|
||||
active-color="#13ce66"
|
||||
active-text="大号物料"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -78,7 +78,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:area:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -89,7 +90,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:area:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -100,28 +102,30 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:area:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="areaList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="库位编码" align="center" prop="areaCode" >
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="库位编码" align="center" prop="areaCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:area:query']"
|
||||
>{{scope.row.areaCode}}</el-button>
|
||||
>{{ scope.row.areaCode }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位名称" align="center" prop="areaName" />
|
||||
<el-table-column label="所属库区" align="center" prop="locationName" />
|
||||
<el-table-column label="上级库位" align="center" prop="superiorName" />
|
||||
<el-table-column label="X" align="center" prop="positionX" />
|
||||
<el-table-column label="y" align="center" prop="positionY" />
|
||||
<el-table-column label="z" align="center" prop="positionZ" />
|
||||
<el-table-column label="库位名称" align="center" prop="areaName"/>
|
||||
<el-table-column label="所属库区" align="center" prop="locationName"/>
|
||||
<el-table-column label="上级库位" align="center" prop="superiorName"/>
|
||||
<el-table-column label="X" align="center" prop="positionX"/>
|
||||
<el-table-column label="y" align="center" prop="positionY"/>
|
||||
<el-table-column label="z" align="center" prop="positionZ"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -131,14 +135,16 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:area:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:area:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -174,21 +180,45 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="库位名称" prop="areaName">
|
||||
<el-input v-model="form.areaName" placeholder="请输入库位名称" />
|
||||
<el-input v-model="form.areaName" placeholder="请输入库位名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="form.attr3"
|
||||
active-color="#13ce66"
|
||||
active-text="大号库位"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="库区" prop="locationId">
|
||||
<div style="display: flex">
|
||||
<el-input v-model="form.locationName" placeholder="请选择库区名称" />
|
||||
<el-input v-model="form.locationName" placeholder="请选择库区名称"/>
|
||||
<el-button @click="selecocationVisible=true" icon="el-icon-search"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否禁用">
|
||||
<el-switch v-model="form.attr4"
|
||||
active-color="#13ce66"
|
||||
active-text="禁用"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <div style="display: flex">-->
|
||||
@ -206,24 +236,24 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库位位置X" prop="positionX">
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionX" placeholder="请输入库位位置X" />
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionX" placeholder="请输入库位位置X"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库位位置y" prop="positionY">
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionY" placeholder="请输入库位位置y" />
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionY" placeholder="请输入库位位置y"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库位位置z" prop="positionZ">
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionZ" placeholder="请输入库位位置z" />
|
||||
<el-input-number :min="0" :step="1" v-model="form.positionZ" placeholder="请输入库位位置z"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -255,15 +285,15 @@ import SelecAreaCmps from "@/components/wm/SelecAreaCmps.vue";
|
||||
export default {
|
||||
name: "Area",
|
||||
dicts: ['sys_yes_no'],
|
||||
components: {SelecLocationCmps, BarcodeImg,SelecAreaCmps } ,
|
||||
components: {SelecLocationCmps, BarcodeImg, SelecAreaCmps},
|
||||
data() {
|
||||
return {
|
||||
//库位选择
|
||||
selecareaVisible:false,
|
||||
selecareaVisible: false,
|
||||
//库区选择
|
||||
selecocationVisible:false,
|
||||
selecocationVisible: false,
|
||||
//自动生成编码
|
||||
autoGenFlag:false,
|
||||
autoGenFlag: false,
|
||||
optType: undefined,
|
||||
locationId: undefined,
|
||||
// 遮罩层
|
||||
@ -302,16 +332,16 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
areaCode: [
|
||||
{ required: true, message: "库位编码不能为空", trigger: "blur" }
|
||||
{required: true, message: "库位编码不能为空", trigger: "blur"}
|
||||
],
|
||||
areaName: [
|
||||
{ required: true, message: "库位名称不能为空", trigger: "blur" }
|
||||
{required: true, message: "库位名称不能为空", trigger: "blur"}
|
||||
],
|
||||
locationId: [
|
||||
{ required: true, message: "库区不能为空", trigger: "blur" }
|
||||
{required: true, message: "库区不能为空", trigger: "blur"}
|
||||
],
|
||||
attr1: [
|
||||
{ required: true, message: "上级库位名称不能为空", trigger: "blur" }
|
||||
{required: true, message: "上级库位名称不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -389,7 +419,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.areaId)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -400,7 +430,7 @@ export default {
|
||||
this.optType = "add";
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const areaId = row.areaId || this.ids
|
||||
getArea(areaId).then(response => {
|
||||
@ -445,25 +475,26 @@ export default {
|
||||
* 冻结状态变更
|
||||
* @param row
|
||||
*/
|
||||
handleFrozenChange(row){
|
||||
handleFrozenChange(row) {
|
||||
let text = row.frozenFlag === "Y" ? "冻结" : "解冻";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function() {
|
||||
return changeFrozenState(row.areaId,row.frozenFlag);
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.areaName + '"库位吗?').then(function () {
|
||||
return changeFrozenState(row.areaId, row.frozenFlag);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
}).catch(function () {
|
||||
row.frozenFlag = row.frozenFlag === "N" ? "Y" : "N";
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const areaIds = row.areaId || this.ids;
|
||||
this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除库位设置编号为"' + areaIds + '"的数据项?').then(function () {
|
||||
return delArea(areaIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -472,12 +503,12 @@ export default {
|
||||
}, `area_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag){
|
||||
if(autoGenFlag){
|
||||
genCode('AREA_CODE').then(response =>{
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('AREA_CODE').then(response => {
|
||||
this.form.areaCode = response;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.form.areaCode = null;
|
||||
}
|
||||
}
|
||||
|
@ -139,10 +139,22 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="料箱编码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入料箱编码"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="form.attr3"
|
||||
active-color="#13ce66"
|
||||
active-text="大号料箱"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
@ -24,53 +24,22 @@
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wm:PLAN:add']"
|
||||
>新增
|
||||
@click="handleAdd('CGRK')"
|
||||
>采购入库
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="knifeBackVisible=true"-->
|
||||
<!-- >整刀回库-->
|
||||
<!-- </el-button>-->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['wm:PLAN:edit']"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['wm:PLAN:remove']"-->
|
||||
<!-- >删除-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd('GJHK')"
|
||||
>工具回库
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['wm:PLAN:export']"-->
|
||||
<!-- >导出-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -81,7 +50,7 @@
|
||||
<el-table-column label="计划编码" align="center" prop="planCode"/>
|
||||
<el-table-column label="入库类型" align="center" prop="planTypeId">
|
||||
<template slot-scope="scope">
|
||||
{{ filterInPlanType(scope.row.planTypeId) }}
|
||||
{{ filterInPlanType(scope.row.planTypeCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划类型" align="center" prop="sourceType">
|
||||
@ -145,19 +114,12 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改入库计划对话框 -->
|
||||
<div v-if="!isKnifeBack">
|
||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
|
||||
<!--状态为1已执行 则禁用-->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
|
||||
<!--状态为 1 已执行 则禁用表单-->
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" inline :disabled="form.state === '1'">
|
||||
<el-form-item label="计划编码" prop="planCode">
|
||||
<el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库类型" prop="planTypeId">
|
||||
<el-select v-model="form.planTypeId" placeholder="请选择入库类型" @change="handlePlanTypeSelectChange">
|
||||
<el-option :label="item.name" :value="item.typeId" v-for="item in inPlanTypeList"
|
||||
:key="item.typeId"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="计划编码" prop="planCode">-->
|
||||
<!-- <el-input v-model="form.planCode" placeholder="请输入计划编码"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="源头单据" prop="relBillCode">
|
||||
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
|
||||
</el-form-item>
|
||||
@ -178,7 +140,7 @@
|
||||
<div>
|
||||
<el-table :data="wmsInPlanDetailsList" :row-class-name="rowWmsInPlanDetailsIndex"
|
||||
@selection-change="handleWmsInPlanDetailsSelectionChange" ref="wmsInPlanDetails"
|
||||
:highlight-current-row="isKnifeBack" @current-change="handleWmsInPlanDetailsCurrentChange">
|
||||
@current-change="handleWmsInPlanDetailsCurrentChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="物品" prop="materialId" width="170">
|
||||
@ -198,18 +160,18 @@
|
||||
<el-input v-model="scope.row.batch" plcaeholder="请输入批次"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="quantity" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.quantity" plcaeholder="请输入计划数量" type="number" :min="0"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="计划数量" prop="quantity" width="150">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.quantity" plcaeholder="请输入计划数量" type="number" :min="0"></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="入库数量" prop="quantityIn" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.quantityIn" plcaeholder="请输入入库数量" type="number" :min="0"
|
||||
@change="handleQuantityIn($event,scope.row)" :disabled="isKnifeBack"></el-input>
|
||||
@change="handleQuantityIn($event,scope.row)"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" prop="cellId" width="150">
|
||||
<el-table-column label="库位" prop="cellId" width="190">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote
|
||||
:remote-method="getMdItemList" clearable>
|
||||
@ -241,26 +203,26 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 添加或修改入库计划对话框 整刀回库 -->
|
||||
<div v-if="isKnifeBack">
|
||||
<wms-in-plan-knife-back-form-cmps :data-form.sync="form" :visible.sync="open" @confirm="getList"
|
||||
<wms-in-plan-knife-back-form-cmps v-if="knifeBackVisible" :data-form.sync="form" :visible.sync="knifeBackVisible"
|
||||
@confirm="getList"
|
||||
@planTypeSelectChange="handlePlanTypeSelectChange"
|
||||
></wms-in-plan-knife-back-form-cmps>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode,} from "@/api/wm/PLAN";
|
||||
import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode, syncInBound,} from "@/api/wm/PLAN";
|
||||
import {listTYPE} from "@/api/md/TYPE";
|
||||
import {listMdItem} from "@/api/mes/md/mdItem"
|
||||
import {listArea} from "@/api/mes/wm/area"
|
||||
import {addWmsInTask} from "@/api/mes/wm/wmsInTask"
|
||||
import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetailEntityTableCmps.vue";
|
||||
import WmsInPlanKnifeBackFormCmps from "@/views/mes/wm/inPlan/wmsInPlanKnifeBackFormCmps.vue";
|
||||
import plan from "@/views/mes/cal/plan/index.vue";
|
||||
|
||||
// 计划编码重复性验证
|
||||
const planCodeValidator = (rule, value, callback) => {
|
||||
@ -307,7 +269,7 @@ export default {
|
||||
// 库位列表
|
||||
areaList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 下发操作对话框
|
||||
@ -360,12 +322,7 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
/** 控制弹窗类型 */
|
||||
isKnifeBack() {
|
||||
return this.form.planTypeId == 19;
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
@ -402,7 +359,6 @@ export default {
|
||||
* @param itemName
|
||||
*/
|
||||
getMdItemList(itemName = "") {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
@ -418,7 +374,6 @@ export default {
|
||||
* @param areaName
|
||||
*/
|
||||
getAreaList(areaName = "") {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
@ -431,15 +386,15 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 过滤出入库类型
|
||||
* @param id 出入库类型ID
|
||||
* @param code 出入库类型 编码
|
||||
* @returns {*}
|
||||
*/
|
||||
filterInPlanType(id) {
|
||||
const filter = this.inPlanTypeList.filter(item => item.typeId === id);
|
||||
filterInPlanType(code) {
|
||||
const filter = this.inPlanTypeList.filter(item => item.code === code);
|
||||
if (filter.length) {
|
||||
return filter[0].name
|
||||
}
|
||||
return id
|
||||
return code
|
||||
},
|
||||
/** 入库类型选择器回调 */
|
||||
handlePlanTypeSelectChange(typeId) {
|
||||
@ -501,6 +456,7 @@ export default {
|
||||
isDelete: null,
|
||||
planCode: null,
|
||||
planTypeId: null,
|
||||
planTypeCode: null,
|
||||
wmsInPlanDetailsList: []
|
||||
};
|
||||
this.wmsInPlanDetailsList = [];
|
||||
@ -522,11 +478,32 @@ export default {
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleSync() {
|
||||
syncInBound().then(res => {
|
||||
this.getList();
|
||||
this.$message.success("数据同步成功");
|
||||
})
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
handleAdd(planTypeCode) {
|
||||
this.reset();
|
||||
// 填充计划类型
|
||||
const filter = this.inPlanTypeList.filter(item => item.code === planTypeCode);
|
||||
if (filter.length) {
|
||||
this.form.planTypeId = filter[0].typeId;
|
||||
this.form.planTypeCode = filter[0].code;
|
||||
this.form.planTypeName = filter[0].name;
|
||||
} else {
|
||||
this.$message.error("系统错误,请联系管理员");
|
||||
console.error("计划类型查找失败")
|
||||
return;
|
||||
}
|
||||
if (planTypeCode === "DPRK") {
|
||||
this.open = true;
|
||||
this.title = "添加入库计划";
|
||||
} else {
|
||||
this.knifeBackVisible = true;
|
||||
}
|
||||
this.dialogTitle = "新增" + filter[0].name;
|
||||
},
|
||||
/** 执行按钮操作 */
|
||||
async handleIssue(row) {
|
||||
@ -561,6 +538,7 @@ export default {
|
||||
materialId: planForm.materialId,
|
||||
materialCode: material[0].itemCode,
|
||||
planTypeId: planForm.planTypeId,
|
||||
planTypeCode: planForm.planTypeCode,
|
||||
// 状态为待执行
|
||||
planInStatus: 0,
|
||||
// 入库计划明细ID
|
||||
@ -599,7 +577,7 @@ export default {
|
||||
this.form = response.data;
|
||||
this.wmsInPlanDetailsList = response.data.wmsInPlanDetailsList;
|
||||
this.open = true;
|
||||
this.title = "修改入库计划";
|
||||
this.dialogTitle = "修改入库计划";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
@ -14,6 +14,10 @@ export default {
|
||||
planTypeId: {
|
||||
type: String,
|
||||
require: true
|
||||
},
|
||||
planTypeCode: {
|
||||
type: String,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -61,6 +65,7 @@ export default {
|
||||
selectBaseKnifeChange(e) {
|
||||
if (this.selectIndex !== -1) {
|
||||
this.localEntityList[this.selectIndex].knifeId = e.baseKnifeId
|
||||
this.localEntityList[this.selectIndex].rfid = e.rfid
|
||||
this.localEntityList[this.selectIndex].baseKnifeInfo = e
|
||||
// 获取物料信息
|
||||
listMdItem({itemCode: e.knifeCode}).then(res => {
|
||||
@ -97,8 +102,8 @@ export default {
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--整刀回库-->
|
||||
<el-table :data="localEntityList" v-if="planTypeId==19" @selection-change="handleSelectionChange">
|
||||
<!--工具回库-->
|
||||
<el-table :data="localEntityList" v-if="planTypeCode==='GJHK'" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="台账ID" align="center" prop="knifeId">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.knifeId" @change="updateEntityList">
|
||||
@ -111,11 +116,11 @@ export default {
|
||||
<el-input v-model="scope.row.source" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="消耗寿命" align="center" prop="consumeLife">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.consumeLife" type="number" min="0" @change="updateEntityList"></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="消耗寿命" align="center" prop="consumeLife">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.consumeLife" type="number" min="0" @change="updateEntityList"></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -129,8 +134,8 @@ export default {
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--刀柄入库-->
|
||||
<el-table :data="localEntityList" v-if="planTypeId==7" @selection-change="handleSelectionChange">
|
||||
<!--采购入库-->
|
||||
<el-table :data="localEntityList" v-if="planTypeCode==='CGRK'" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="RFID" align="center" prop="rfid">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rfid" @change="updateEntityList"></el-input>
|
||||
@ -149,35 +154,8 @@ export default {
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--拆刀回库-->
|
||||
<el-table :data="localEntityList" v-if="planTypeId==15" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="台账ID" align="center" prop="knifeId">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.knifeId" @change="updateEntityList">
|
||||
<el-button slot="append" icon="el-icon-search" @click="showBaseKnifeDialog(scope)"></el-button>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源" align="center" prop="source">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.source" @change="updateEntityList"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope)"
|
||||
v-hasPermi="['wm:wmsInPlanDetailsEntity:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<base-knife-select-cmps :visible.sync="baseKnifeVisible"
|
||||
<base-knife-select-cmps :visible.sync="baseKnifeVisible" :knife-type="getKnifeType"
|
||||
@change="selectBaseKnifeChange"></base-knife-select-cmps>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -29,7 +29,6 @@ export default {
|
||||
wmsInPlanDetailEntityList: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
planCode: [{required: true}],
|
||||
relBillCode: [{required: true}],
|
||||
},
|
||||
localVisible: this.visible,
|
||||
@ -40,7 +39,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.localDataForm.planId ? "修改入库计划" : "新增入库计划"
|
||||
return (this.localDataForm.planId ? "修改" : "新增") + this.dataForm.planTypeName
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@ -63,18 +62,19 @@ export default {
|
||||
this.$emit("update:visible", false)
|
||||
},
|
||||
async validateRfid() {
|
||||
const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid);
|
||||
if (rfidList.length === 0) return
|
||||
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => entity.rfid && entity.rfid.trim().length > 0).map(entity => entity.rfid);
|
||||
console.log(rfidList)
|
||||
if (!Array.isArray(rfidList) || rfidList.length === 0) return
|
||||
const res = await isDuplicateRfid(rfidList.join(","));
|
||||
return res.data
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
const validateRfidResult = await this.validateRfid();
|
||||
if (validateRfidResult.length > 0) {
|
||||
this.$modal.msgError(`RFID重复:${validateRfidResult}`);
|
||||
return;
|
||||
}
|
||||
// const validateRfidResult = await this.validateRfid();
|
||||
// if (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) {
|
||||
// this.$modal.msgError(`RFID重复:${validateRfidResult}`);
|
||||
// return;
|
||||
// }
|
||||
await this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.localDataForm.wmsInPlanDetailsList = []
|
||||
@ -199,24 +199,12 @@ export default {
|
||||
<!--状态为1已执行 则禁用-->
|
||||
<el-form ref="form" :model="localDataForm" :rules="rules" label-width="80px" inline
|
||||
:disabled="localDataForm.state === '1'">
|
||||
<el-form-item label="计划编码" prop="planCode">
|
||||
<el-input v-model="localDataForm.planCode" placeholder="请输入计划编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库类型" prop="planTypeId">
|
||||
<el-select v-model="localDataForm.planTypeId" placeholder="请选择入库类型" @change="handlePlanTypeSelectChange">
|
||||
<el-option :label="item.name" :value="item.typeId" v-for="item in inPlanTypeList"
|
||||
:key="item.typeId"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="源头单据" prop="relBillCode">
|
||||
<el-input v-model="localDataForm.relBillCode" placeholder="请输入源头单据"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="计划编码" prop="planCode">-->
|
||||
<!-- <el-input v-model="localDataForm.planCode" placeholder="请输入计划编码"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="localDataForm.remark" placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="batch">
|
||||
<el-input v-model="wmsInPlanDetailForm.batch" plcaeholder="请输入批次"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="库位" prop="cellId">
|
||||
<el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote
|
||||
:remote-method="getAreaList" clearable>
|
||||
@ -227,7 +215,7 @@ export default {
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物品" prop="materialId" v-if="localDataForm.planTypeId==7">
|
||||
<el-form-item label="物品" prop="materialId" v-if="localDataForm.planTypeCode==='CGRK'">
|
||||
<el-select v-model="wmsInPlanDetailForm.materialId" placeholder="请选择物料" filterable remote
|
||||
:remote-method="getMdItemList" clearable>
|
||||
<el-option :label="item.itemName" :value="item.itemId.toString()" v-for="item in mdItemList"
|
||||
@ -238,10 +226,11 @@ export default {
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="center">整刀实例</el-divider>
|
||||
<el-divider content-position="center">台账实例</el-divider>
|
||||
<wms-in-plan-detail-entity-table-cmps
|
||||
:entityList.sync="wmsInPlanDetailEntityList"
|
||||
:planTypeId="localDataForm.planTypeId"
|
||||
:planTypeCode="localDataForm.planTypeCode"
|
||||
></wms-in-plan-detail-entity-table-cmps>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -90,29 +90,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="openTaskDetailDialog(scope.row)"-->
|
||||
<!-- >详情-->
|
||||
<!-- </el-button>-->
|
||||
<!--下发按钮禁用逻辑:状态为已执行 or 库位编码为自动分配-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
:disabled="scope.row.planInStatus === '1'"
|
||||
:disabled="scope.row.planInStatus === '1' || scope.row.cellCode==='TEMP'"
|
||||
@click="handleIssue(scope.row)"
|
||||
>下发
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['wm:wmsInTask:remove']"-->
|
||||
<!-- >删除-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="scope.row.planInStatus === '1'"
|
||||
@click="manualIssue(scope.row)"
|
||||
>手动入库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -281,16 +274,16 @@ export default {
|
||||
taskId: task.id,
|
||||
// 库位 信息
|
||||
cellCode: task.cellCode,
|
||||
cellX:task.cellX,
|
||||
cellY:task.cellY,
|
||||
cellZ:task.cellZ,
|
||||
cellX: task.cellX,
|
||||
cellY: task.cellY,
|
||||
cellZ: task.cellZ,
|
||||
// 库房类型编码
|
||||
warehouseTypeCode:"DDJ",
|
||||
warehouseTypeCode: "DDJ",
|
||||
// 物料信息
|
||||
materialId: task.materialId,
|
||||
materialCode: task.materialCode,
|
||||
materialName: task.materialName,
|
||||
materialCount: task.actualInQuantity,
|
||||
// materialId: task.materialId,
|
||||
// materialCode: task.materialCode,
|
||||
// materialName: task.materialName,
|
||||
// materialCount: task.actualInQuantity,
|
||||
rfid: "",
|
||||
// 出库OR入库
|
||||
type: "RK",
|
||||
@ -305,6 +298,15 @@ export default {
|
||||
// this.getList();
|
||||
// });
|
||||
},
|
||||
/**
|
||||
* 手动执行入库任务
|
||||
*/
|
||||
manualIssue(task) {
|
||||
issueBatchWmsInTask([task.id.toString()]).then(response => {
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
@ -193,6 +193,7 @@
|
||||
{{scope.row.standardDosage * form.productIdQty}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前库存" prop="currentInventory" min-width="150" />
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -243,6 +244,7 @@
|
||||
{{scope.row.standardDosage * form.productIdQty}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前库存" prop="currentInventory" min-width="150" />
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
Loading…
Reference in New Issue
Block a user