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