Compare commits

...

10 Commits

5 changed files with 231 additions and 81 deletions

View File

@ -71,8 +71,8 @@ export default {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
username: "",
password: "",
rememberMe: false,
code: "",
uuid: ""

View File

@ -232,11 +232,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">
@ -381,6 +393,35 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="长度" prop="length">
<el-input-number v-model="form.length" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.length" :min="0" :percision="0" :step="1"
placeholder="请输入长度"
v-else/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="宽度" prop="width">
<el-input-number v-model="form.width" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.width" :min="0" :percision="0" :step="1"
placeholder="请输入宽度"
v-else/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高度" prop="height">
<el-input-number v-model="form.height" :min="0" :percision="0" :step="1" disabled
v-if="optType=='view'"/>
<el-input-number v-model="form.height" :min="0" :percision="0" :step="1"
placeholder="请输入高度"
v-else/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row v-if="form.safeStockFlag == 'Y'">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="最小库存量">-->
@ -669,7 +710,8 @@ export default {
minStock: 0,
maxStock: 0,
optType: undefined,
remark: undefined
remark: undefined,
attr3: 0
};
this.autoGenFlag = false;
this.resetForm("form");

View File

@ -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,7 +102,8 @@
: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>
@ -113,7 +116,8 @@
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"/>
@ -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,10 +180,22 @@
</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-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">
@ -189,6 +207,18 @@
</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">-->
@ -463,7 +493,8 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

View File

@ -204,7 +204,7 @@
<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>
:remote-method="getAreaList" clearable>
<el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
@ -405,8 +405,10 @@ export default {
const params = {
pageNum: 1,
pageSize: 100,
//
itemName: areaName
//
areaName: areaName,
// ID
locationId: 222
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -515,6 +517,21 @@ export default {
/** 新增按钮操作 */
handleAdd(planTypeCode) {
this.reset();
//
switch (planTypeCode) {
case "DBRK":
this.form.locationCode = null;
break;
case "DPRK":
this.form.locationCode = null;
break;
case "ZDHK":
this.form.locationCode = 'L055';
break;
case "CDHK":
this.form.locationCode = null;
break;
}
//
const filter = this.inPlanTypeList.filter(item => item.code === planTypeCode);
if (filter.length) {
@ -522,7 +539,7 @@ export default {
this.form.planTypeCode = filter[0].code;
this.form.planTypeName = filter[0].name;
} else {
this.$message.error("系统错误,请联系管理员");
this.$message.error("计划类型查找失败");
console.error("计划类型查找失败")
return;
}

View File

@ -4,10 +4,11 @@ import WmsInPlanDetailEntityTableCmps from "@/views/mes/wm/inPlan/wmsInPlanDetai
import {addPLAN, updatePLAN} from "@/api/wm/PLAN";
import {listMdItem} from "@/api/mes/md/mdItem";
import {listTYPE} from "@/api/md/TYPE";
import {isDuplicateRfid} from "@/api/mes/md/baseKnife";
import {isDuplicateRfid, listBaseKnife} from "@/api/mes/md/baseKnife";
export default {
name: "wmsInPlanKnifeBackFormCmps",
dicts: ['sys_yes_no', 'mes_item_product', 'is_locked', 'knife_fine_status', 'plan_source_type', 'in_plan_state'],
components: {WmsInPlanDetailEntityTableCmps},
props: {
dataForm: {
@ -25,6 +26,8 @@ export default {
wmsInPlanDetailForm: {},
//
areaList: [],
BaseKnifeList: [],
total: 0,
//
wmsInPlanDetailEntityList: [],
//
@ -34,7 +37,12 @@ export default {
localVisible: this.visible,
//
inPlanTypeList: [],
mdItemList: []
mdItemList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: ""
}
}
},
computed: {
@ -43,14 +51,18 @@ export default {
},
},
methods: {
/** 获取库位列表 */
/**
* 获取库位列表
* @param areaName
*/
getAreaList(areaName = "") {
this.loading = true;
const params = {
pageNum: 1,
pageSize: 100,
//
itemName: areaName
//
areaName: areaName,
// ID
locationId: 222
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -124,6 +136,15 @@ export default {
this.inPlanTypeList = response.rows;
});
},
handleAreaSelectChange() {
let result = this.areaList.filter(item => item.areaId == this.wmsInPlanDetailForm.cellId)
this.queryParams.areaCode = result[0].areaCode
listBaseKnife(this.queryParams).then(response => {
this.BaseKnifeList = response.rows;
this.total = response.total;
});
},
handlePlanTypeSelectChange(typeId) {
this.$emit("planTypeSelectChange", typeId)
},
@ -194,20 +215,17 @@ export default {
</script>
<template>
<el-dialog :title="title" :visible="visible" width="50%" append-to-body @close="handleClose"
<el-dialog :title="title" :visible="visible" width="60%" append-to-body @close="handleClose"
:close-on-click-modal="false">
<!--状态为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="remark">
<el-input v-model="localDataForm.remark" placeholder="请输入备注"></el-input>
</el-form-item>
<el-form-item label="库位" prop="cellId">
<el-form-item label="库位" prop="cellId" v-if="localDataForm.planTypeCode!=='ZDHK'">
<el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote
:remote-method="getAreaList" clearable>
:remote-method="getAreaList" clearable @change="handleAreaSelectChange">
<el-option :label="item.areaName" :value="item.areaId.toString()" v-for="item in areaList"
:key="item.areaId">
<span style="float: left">{{ item.areaName }}</span>
@ -232,6 +250,48 @@ export default {
:planTypeId="localDataForm.planTypeId"
:planTypeCode="localDataForm.planTypeCode"
></wms-in-plan-detail-entity-table-cmps>
<el-divider content-position="center" v-if="localDataForm.planTypeCode!=='ZDHK'">库位包含物料</el-divider>
<el-table :data="BaseKnifeList" v-if="localDataForm.planTypeCode!=='ZDHK'">
<el-table-column label="台账ID" align="center" prop="baseKnifeId" min-width="60" :show-overflow-tooltip="true"/>
<el-table-column label="rfid" align="center" prop="rfid"/>
<el-table-column label="刀具编码" align="center" prop="knifeCode" min-width="135"
:show-overflow-tooltip="true"/>
<el-table-column label="刀具名称" align="center" prop="knifeName" min-width="135"
:show-overflow-tooltip="true"/>
<el-table-column label="物料类型" align="center" key="itemOrProduct" prop="itemOrProduct"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>
</template>
</el-table-column>
<el-table-column label="刀具寿命" align="center" prop="knifeLife" min-width="100"
:show-overflow-tooltip="true"/>
<el-table-column label="刀具状态" align="center" prop="knifeFineState" min-width="100"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.knife_fine_status" :value="scope.row.knifeFineState"/>
</template>
</el-table-column>
<el-table-column label="是否锁定" align="center" prop="isLocked" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_locked" :value="scope.row.isLocked"/>
</template>
</el-table-column>
<el-table-column label="归属计划单" align="center" prop="planSheet" min-width="120"/>
<el-table-column label="重置次数" align="center" prop="resetCount" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.itemOrProduct == 'PRODUCT'">{{ scope.row.resetCount }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="handleAreaSelectChange"
/>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>