Compare commits

..

No commits in common. "b663a8ef1cf91620ebcf8cc752f9c062955c59c5" and "9f980ea5e5fcf7f28927a18b1ae39ac89012d216" have entirely different histories.

5 changed files with 81 additions and 231 deletions

View File

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

View File

@ -232,23 +232,11 @@
</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">
@ -393,35 +381,6 @@
<!-- </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="最小库存量">-->
@ -710,8 +669,7 @@ export default {
minStock: 0,
maxStock: 0,
optType: undefined,
remark: undefined,
attr3: 0
remark: undefined
};
this.autoGenFlag = false;
this.resetForm("form");

View File

@ -78,8 +78,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['mes:wm:area:add']"
>新增
</el-button>
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -90,8 +89,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:wm:area:edit']"
>修改
</el-button>
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -102,8 +100,7 @@
: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>
@ -116,8 +113,7 @@
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" />
@ -135,16 +131,14 @@
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>
@ -180,22 +174,10 @@
</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">
@ -207,18 +189,6 @@
</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">-->
@ -493,8 +463,7 @@ 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="getAreaList" clearable>
:remote-method="getMdItemList" 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,10 +405,8 @@ export default {
const params = {
pageNum: 1,
pageSize: 100,
//
areaName: areaName,
// ID
locationId: 222
//
itemName: areaName
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -517,21 +515,6 @@ 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) {
@ -539,7 +522,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,11 +4,10 @@ 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, listBaseKnife} from "@/api/mes/md/baseKnife";
import {isDuplicateRfid} 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: {
@ -26,8 +25,6 @@ export default {
wmsInPlanDetailForm: {},
//
areaList: [],
BaseKnifeList: [],
total: 0,
//
wmsInPlanDetailEntityList: [],
//
@ -37,12 +34,7 @@ export default {
localVisible: this.visible,
//
inPlanTypeList: [],
mdItemList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: ""
}
mdItemList: []
}
},
computed: {
@ -51,18 +43,14 @@ export default {
},
},
methods: {
/**
* 获取库位列表
* @param areaName
*/
/** 获取库位列表 */
getAreaList(areaName = "") {
this.loading = true;
const params = {
pageNum: 1,
pageSize: 100,
//
areaName: areaName,
// ID
locationId: 222
//
itemName: areaName
}
listArea(params).then(response => {
this.areaList = response.rows;
@ -136,15 +124,6 @@ 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)
},
@ -215,17 +194,20 @@ export default {
</script>
<template>
<el-dialog :title="title" :visible="visible" width="60%" append-to-body @close="handleClose"
<el-dialog :title="title" :visible="visible" width="50%" 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" v-if="localDataForm.planTypeCode!=='ZDHK'">
<el-form-item label="库位" prop="cellId">
<el-select v-model="wmsInPlanDetailForm.cellId" placeholder="请选择库位" filterable remote
:remote-method="getAreaList" clearable @change="handleAreaSelectChange">
: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>
@ -250,48 +232,6 @@ 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>