Compare commits

..

No commits in common. "aa4283012997641a2df9562a75a3a3f80dfa9643" and "ae39ff817a20b12895ca5cbb397b41276d01cafe" have entirely different histories.

10 changed files with 313 additions and 317 deletions

View File

@ -140,7 +140,7 @@ export default {
itemCode: undefined, itemCode: undefined,
itemName: undefined, itemName: undefined,
itemTypeId: 0, itemTypeId: 0,
itemOrProduct: "" itemOrProduct: "ITEM"
}, },
// //
columns: [ columns: [

View File

@ -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

View File

@ -222,23 +222,11 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-col :span="16">
<el-form-item label="物料名称" prop="itemName"> <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" maxlength="255" readonly="readonly" v-if="optType=='view'"/>
<el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/> <el-input v-model="form.itemName" placeholder="请输入物料名称" maxlength="255" v-else/>
</el-form-item> </el-form-item>
</el-col> </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-row> <el-row>
<el-col :span="24"> <el-col :span="24">

View File

@ -78,8 +78,7 @@
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
@ -90,8 +89,7 @@
: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
@ -102,8 +100,7 @@
: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>
@ -116,8 +113,7 @@
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 }} >{{scope.row.areaCode}}</el-button>
</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" />
@ -135,16 +131,14 @@
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>
@ -180,22 +174,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-col :span="16">
<el-form-item label="库位名称" prop="areaName"> <el-form-item label="库位名称" prop="areaName">
<el-input v-model="form.areaName" placeholder="请输入库位名称" /> <el-input v-model="form.areaName" placeholder="请输入库位名称" />
</el-form-item> </el-form-item>
</el-col> </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"> <el-col :span="24">
<div style="display: flex"> <div style="display: flex">
<el-form-item label="库区" prop="locationId"> <el-form-item label="库区" prop="locationId">
@ -207,18 +189,6 @@
</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">-->
@ -493,8 +463,7 @@ export default {
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => { }).catch(() => {});
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

View File

@ -139,22 +139,10 @@
<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-col :span="16">
<el-form-item label="料箱编码" prop="code"> <el-form-item label="料箱编码" prop="code">
<el-input v-model="form.code" placeholder="请输入料箱编码"/> <el-input v-model="form.code" placeholder="请输入料箱编码"/>
</el-form-item> </el-form-item>
</el-col> </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-row> <el-row>
<el-col :span="24"> <el-col :span="24">

View File

@ -24,22 +24,53 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd('CGRK')" @click="handleAdd"
>采购入库 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="primary" <!-- type="success"-->
plain <!-- plain-->
icon="el-icon-plus" <!-- icon="el-icon-edit"-->
size="mini" <!-- size="mini"-->
@click="handleAdd('GJHK')" <!-- :disabled="single"-->
>工具回库 <!-- @click="handleUpdate"-->
</el-button> <!-- 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-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>
@ -50,7 +81,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.planTypeCode) }} {{ filterInPlanType(scope.row.planTypeId) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划类型" align="center" prop="sourceType"> <el-table-column label="计划类型" align="center" prop="sourceType">
@ -114,12 +145,19 @@
/> />
<!-- 添加或修改入库计划对话框 --> <!-- 添加或修改入库计划对话框 -->
<el-dialog :title="dialogTitle" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false"> <div v-if="!isKnifeBack">
<!--状态为 1 已执行 则禁用表单--> <el-dialog :title="title" :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 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="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="relBillCode"> <el-form-item label="源头单据" prop="relBillCode">
<el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input> <el-input v-model="form.relBillCode" placeholder="请输入源头单据"></el-input>
</el-form-item> </el-form-item>
@ -140,7 +178,7 @@
<div> <div>
<el-table :data="wmsInPlanDetailsList" :row-class-name="rowWmsInPlanDetailsIndex" <el-table :data="wmsInPlanDetailsList" :row-class-name="rowWmsInPlanDetailsIndex"
@selection-change="handleWmsInPlanDetailsSelectionChange" ref="wmsInPlanDetails" @selection-change="handleWmsInPlanDetailsSelectionChange" ref="wmsInPlanDetails"
@current-change="handleWmsInPlanDetailsCurrentChange"> :highlight-current-row="isKnifeBack" @current-change="handleWmsInPlanDetailsCurrentChange">
<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="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="物品" prop="materialId" width="170"> <el-table-column label="物品" prop="materialId" width="170">
@ -160,18 +198,18 @@
<el-input v-model="scope.row.batch" plcaeholder="请输入批次"></el-input> <el-input v-model="scope.row.batch" plcaeholder="请输入批次"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="计划数量" prop="quantity" width="150">--> <el-table-column label="计划数量" prop="quantity" width="150">
<!-- <template slot-scope="scope">--> <template slot-scope="scope">
<!-- <el-input v-model="scope.row.quantity" plcaeholder="请输入计划数量" type="number" :min="0"></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="quantityIn" width="150"> <el-table-column label="入库数量" prop="quantityIn" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.quantityIn" plcaeholder="请输入入库数量" type="number" :min="0" <el-input v-model="scope.row.quantityIn" plcaeholder="请输入入库数量" type="number" :min="0"
@change="handleQuantityIn($event,scope.row)"></el-input> @change="handleQuantityIn($event,scope.row)" :disabled="isKnifeBack"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库位" prop="cellId" width="190"> <el-table-column label="库位" prop="cellId" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote <el-select v-model="scope.row.cellId" placeholder="请选择库位" filterable remote
:remote-method="getMdItemList" clearable> :remote-method="getMdItemList" clearable>
@ -203,26 +241,26 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div>
<!-- 添加或修改入库计划对话框 整刀回库 --> <!-- 添加或修改入库计划对话框 整刀回库 -->
<wms-in-plan-knife-back-form-cmps v-if="knifeBackVisible" :data-form.sync="form" :visible.sync="knifeBackVisible" <div v-if="isKnifeBack">
@confirm="getList" <wms-in-plan-knife-back-form-cmps :data-form.sync="form" :visible.sync="open" @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, syncInBound,} from "@/api/wm/PLAN"; import {listPLAN, getPLAN, delPLAN, addPLAN, updatePLAN, isDuplicatePlanCode,} 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) => {
@ -269,7 +307,7 @@ export default {
// //
areaList: [], areaList: [],
// //
dialogTitle: "", title: "",
// //
open: false, open: false,
// //
@ -322,7 +360,12 @@ export default {
} }
}; };
}, },
computed: {}, computed: {
/** 控制弹窗类型 */
isKnifeBack() {
return this.form.planTypeId == 19;
}
},
created() { created() {
this.getList(); this.getList();
}, },
@ -359,6 +402,7 @@ 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,
@ -374,6 +418,7 @@ 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,
@ -386,15 +431,15 @@ export default {
}, },
/** /**
* 过滤出入库类型 * 过滤出入库类型
* @param code 出入库类型 编码 * @param id 出入库类型ID
* @returns {*} * @returns {*}
*/ */
filterInPlanType(code) { filterInPlanType(id) {
const filter = this.inPlanTypeList.filter(item => item.code === code); const filter = this.inPlanTypeList.filter(item => item.typeId === id);
if (filter.length) { if (filter.length) {
return filter[0].name return filter[0].name
} }
return code return id
}, },
/** 入库类型选择器回调 */ /** 入库类型选择器回调 */
handlePlanTypeSelectChange(typeId) { handlePlanTypeSelectChange(typeId) {
@ -456,7 +501,6 @@ export default {
isDelete: null, isDelete: null,
planCode: null, planCode: null,
planTypeId: null, planTypeId: null,
planTypeCode: null,
wmsInPlanDetailsList: [] wmsInPlanDetailsList: []
}; };
this.wmsInPlanDetailsList = []; this.wmsInPlanDetailsList = [];
@ -478,32 +522,11 @@ 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(planTypeCode) { handleAdd() {
this.reset(); 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.open = true;
} else { this.title = "添加入库计划";
this.knifeBackVisible = true;
}
this.dialogTitle = "新增" + filter[0].name;
}, },
/** 执行按钮操作 */ /** 执行按钮操作 */
async handleIssue(row) { async handleIssue(row) {
@ -538,7 +561,6 @@ 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
@ -577,7 +599,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.dialogTitle = "修改入库计划"; this.title = "修改入库计划";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

View File

@ -14,10 +14,6 @@ export default {
planTypeId: { planTypeId: {
type: String, type: String,
require: true require: true
},
planTypeCode: {
type: String,
require: true
} }
}, },
data() { data() {
@ -65,7 +61,6 @@ 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 => {
@ -102,8 +97,8 @@ export default {
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<!--工具回库--> <!--整刀回库-->
<el-table :data="localEntityList" v-if="planTypeCode==='GJHK'" @selection-change="handleSelectionChange"> <el-table :data="localEntityList" v-if="planTypeId==19" @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">
@ -134,8 +129,8 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--采购入库--> <!--刀柄入库-->
<el-table :data="localEntityList" v-if="planTypeCode==='CGRK'" @selection-change="handleSelectionChange"> <el-table :data="localEntityList" v-if="planTypeId==7" @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>
@ -154,8 +149,35 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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" :knife-type="getKnifeType" <base-knife-select-cmps :visible.sync="baseKnifeVisible"
@change="selectBaseKnifeChange"></base-knife-select-cmps> @change="selectBaseKnifeChange"></base-knife-select-cmps>
</div> </div>
</template> </template>

View File

@ -29,6 +29,7 @@ export default {
wmsInPlanDetailEntityList: [], wmsInPlanDetailEntityList: [],
// //
rules: { rules: {
planCode: [{required: true}],
relBillCode: [{required: true}], relBillCode: [{required: true}],
}, },
localVisible: this.visible, localVisible: this.visible,
@ -39,7 +40,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return (this.localDataForm.planId ? "修改" : "新增") + this.dataForm.planTypeName return this.localDataForm.planId ? "修改入库计划" : "新增入库计划"
}, },
}, },
methods: { methods: {
@ -62,19 +63,18 @@ export default {
this.$emit("update:visible", false) this.$emit("update:visible", false)
}, },
async validateRfid() { async validateRfid() {
const rfidList = this.wmsInPlanDetailEntityList.filter(entity => entity.rfid && entity.rfid.trim().length > 0).map(entity => entity.rfid); const rfidList = this.wmsInPlanDetailEntityList.map(entity => entity.rfid);
console.log(rfidList) if (rfidList.length === 0) return
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 (Array.isArray(validateRfidResult) && validateRfidResult.length > 0) { if (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,12 +199,24 @@ 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>
@ -215,7 +227,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.planTypeCode==='CGRK'"> <el-form-item label="物品" prop="materialId" v-if="localDataForm.planTypeId==7">
<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"
@ -226,11 +238,10 @@ 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">

View File

@ -90,22 +90,29 @@
</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">
<!--下发按钮禁用逻辑状态为已执行 or 库位编码为自动分配--> <!-- <el-button-->
<!-- 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' || scope.row.cellCode==='TEMP'" :disabled="scope.row.planInStatus === '1'"
@click="handleIssue(scope.row)" @click="handleIssue(scope.row)"
>下发 >下发
</el-button> </el-button>
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
:disabled="scope.row.planInStatus === '1'" <!-- icon="el-icon-delete"-->
@click="manualIssue(scope.row)" <!-- @click="handleDelete(scope.row)"-->
>手动入库 <!-- v-hasPermi="['wm:wmsInTask:remove']"-->
</el-button> <!-- >删除-->
<!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -280,10 +287,10 @@ export default {
// //
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",
@ -298,15 +305,6 @@ 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;

View File

@ -193,7 +193,6 @@
{{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">
@ -244,7 +243,6 @@
{{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">