物料安全库存

This commit is contained in:
shijing 2022-01-21 10:55:07 +08:00
parent c9d3b15a5f
commit 0f8128a5d8
3 changed files with 768 additions and 754 deletions

View File

@ -295,7 +295,7 @@
ganttHeight:{
type:Number,
default: () => {
return 300
return 0
}
} ,
},
@ -374,14 +374,7 @@
};
},
mounted(){
this.ganttHeight = this.ganttHeight-45;
if(window.innerHeight){
this.windowWidth = window.innerWidth;
this.windowHeight = window.innerHeight;
}else{
this.windowHeight=document.body.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;
this.windowWidth=document.body.clientWidth?document.body.clientWidth:document.documentElement.clientWidth;
}
// this.ganttHeight = this.ganttHeight;
let currentYear = new Date().getFullYear();
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
this.list = [...this.proList];
@ -533,14 +526,14 @@
},
//修改后续高度
resetTop(zindex, reduce, isexpand) {
let num = reduce ? -40 : 40;
let num = reduce ? -34 : 34;
if (!reduce && !isexpand) {
this.list.forEach((item, index) => {
if (index > zindex) {
item.top = item.top + 40;
item.top = item.top + 35;
if (item.children && item.children.length > 0) {
item.children.forEach((k, i) => {
k.top = item.top + 40 * i + 40;
k.top = item.top + 34 * i + 35;
});
}
}
@ -820,19 +813,7 @@
parseInt(this.$refs[dom][0].style.width);
end =
Math.round(end / this.currentDaySize.value) *
this.currentDaySize.value -
this.currentDaySize.value;
let infoDomX=0,infoDomY = 0;
if(this.windowWidth-e.clientX>230){
infoDomX = e.clientX;
}else{
infoDomX = this.windowWidth-230;
}
if(this.windowHeight-e.clientY>200){
infoDomY = e.clientY;
}else{
infoDomY = this.windowHeight-200;
}
this.currentDaySize.value -this.currentDaySize.value;
this.currentProjectMsg = {
name: this.computedList[index].name,
allTime: (end - start) / this.currentDaySize.value + 1,
@ -840,15 +821,9 @@
per1: this.computedList[index].per1,
startTime: this.computedWithTime(start),
endTime: this.computedWithTime(end),
left:infoDomX ,
top: infoDomY
left:e.clientX ,
top: e.clientY
};
/*
* left:
e.clientX + 220 - this.$refs.chart.scrollLeft >= this.$refs.chart.clientWidth
? e.clientX - 220 - 400
: e.clientX ,
* */
this.isShowMsg = true;
},
//鼠标离开信息消失时间显示消失

File diff suppressed because it is too large Load Diff

View File

@ -121,7 +121,7 @@
<el-form
ref="Form"
:model="material"
label-width="80px"
label-width="100px"
label-position="right"
:rules="rule1"
>
@ -131,41 +131,42 @@
<el-form-item label="物料编号" prop="number">
<el-input v-model="material.number" placeholder="物料编号"/>
</el-form-item>
<el-form-item label="规格型号" prop="specification">
<el-form-item label="规格型号">
<el-input v-model="material.specification" placeholder="规格型号"/>
</el-form-item>
<el-form-item label="计量单位" prop="unit">
<el-form-item label="计量单位">
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
<el-option
v-for="item in unitoptions"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="物料类别" prop="type">
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
<el-form-item label="物料类别">
<el-select style="width: 100%" v-model="material.type" placeholder="请选择物料类别">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="单片玻璃数量" prop="piece_count" v-if="material.type==1">
<el-form-item label="单片玻璃数量" v-if="material.type==1">
<el-input v-model="material.piece_count" placeholder="单片玻璃数量"/>
</el-form-item>
<el-form-item label="排序" prop="sort_str">
<el-input v-model="material.sort_str" placeholder="排序"/>
<el-form-item label="安全库存数">
<el-input-number style="width: 100%;" v-model="material.count_safe" :step="1" :min="0" step-strictly placeholder="安全库存数"></el-input-number>
</el-form-item>
<el-form-item label="排序">
<el-input-number style="width: 100%;" v-model="material.sort_str" :step="1" :min="0" step-strictly placeholder="排序"></el-input-number>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -189,8 +190,14 @@
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultmaterial = {
name: "",
number: "",
name: null,
number: null,
specification: null,
unit: null,
type: null,
piece_count: null,
sort_str: null,
count_safe: 0,
processes: [],
};
export default {
@ -270,19 +277,13 @@
created() {
this.getList();
this.getProcessList();
},
methods: {
checkPermission,
//物料详情
handledetail(scope)
{
handledetail(scope){
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id,type: scope.row.type }, })
},
//选项卡切换
handleClick(tab) {
this.listLoading = true;
@ -311,10 +312,8 @@
},
//绑定工序
handlebind(scope) {
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
}
,
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
@ -324,7 +323,7 @@
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
@ -335,7 +334,6 @@
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.material = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
@ -359,7 +357,6 @@
console.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {