物料安全库存
This commit is contained in:
parent
c9d3b15a5f
commit
0f8128a5d8
|
@ -295,7 +295,7 @@
|
||||||
ganttHeight:{
|
ganttHeight:{
|
||||||
type:Number,
|
type:Number,
|
||||||
default: () => {
|
default: () => {
|
||||||
return 300
|
return 0
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
},
|
},
|
||||||
|
@ -374,14 +374,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.ganttHeight = this.ganttHeight-45;
|
// this.ganttHeight = this.ganttHeight;
|
||||||
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;
|
|
||||||
}
|
|
||||||
let currentYear = new Date().getFullYear();
|
let currentYear = new Date().getFullYear();
|
||||||
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
|
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
|
||||||
this.list = [...this.proList];
|
this.list = [...this.proList];
|
||||||
|
@ -533,14 +526,14 @@
|
||||||
},
|
},
|
||||||
//修改后续高度
|
//修改后续高度
|
||||||
resetTop(zindex, reduce, isexpand) {
|
resetTop(zindex, reduce, isexpand) {
|
||||||
let num = reduce ? -40 : 40;
|
let num = reduce ? -34 : 34;
|
||||||
if (!reduce && !isexpand) {
|
if (!reduce && !isexpand) {
|
||||||
this.list.forEach((item, index) => {
|
this.list.forEach((item, index) => {
|
||||||
if (index > zindex) {
|
if (index > zindex) {
|
||||||
item.top = item.top + 40;
|
item.top = item.top + 35;
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
item.children.forEach((k, i) => {
|
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);
|
parseInt(this.$refs[dom][0].style.width);
|
||||||
end =
|
end =
|
||||||
Math.round(end / this.currentDaySize.value) *
|
Math.round(end / this.currentDaySize.value) *
|
||||||
this.currentDaySize.value -
|
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.currentProjectMsg = {
|
this.currentProjectMsg = {
|
||||||
name: this.computedList[index].name,
|
name: this.computedList[index].name,
|
||||||
allTime: (end - start) / this.currentDaySize.value + 1,
|
allTime: (end - start) / this.currentDaySize.value + 1,
|
||||||
|
@ -840,15 +821,9 @@
|
||||||
per1: this.computedList[index].per1,
|
per1: this.computedList[index].per1,
|
||||||
startTime: this.computedWithTime(start),
|
startTime: this.computedWithTime(start),
|
||||||
endTime: this.computedWithTime(end),
|
endTime: this.computedWithTime(end),
|
||||||
left:infoDomX ,
|
left:e.clientX ,
|
||||||
top: infoDomY
|
top: e.clientY
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* left:
|
|
||||||
e.clientX + 220 - this.$refs.chart.scrollLeft >= this.$refs.chart.clientWidth
|
|
||||||
? e.clientX - 220 - 400
|
|
||||||
: e.clientX ,
|
|
||||||
* */
|
|
||||||
this.isShowMsg = true;
|
this.isShowMsg = true;
|
||||||
},
|
},
|
||||||
//鼠标离开信息消失,时间显示消失
|
//鼠标离开信息消失,时间显示消失
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -121,7 +121,7 @@
|
||||||
<el-form
|
<el-form
|
||||||
ref="Form"
|
ref="Form"
|
||||||
:model="material"
|
:model="material"
|
||||||
label-width="80px"
|
label-width="100px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
:rules="rule1"
|
:rules="rule1"
|
||||||
>
|
>
|
||||||
|
@ -131,41 +131,42 @@
|
||||||
<el-form-item label="物料编号" prop="number">
|
<el-form-item label="物料编号" prop="number">
|
||||||
<el-input v-model="material.number" placeholder="物料编号"/>
|
<el-input v-model="material.number" placeholder="物料编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规格型号" prop="specification">
|
<el-form-item label="规格型号">
|
||||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="计量单位" prop="unit">
|
<el-form-item label="计量单位">
|
||||||
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in unitoptions"
|
v-for="item in unitoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="物料类别" prop="type">
|
<el-form-item label="物料类别">
|
||||||
|
<el-select style="width: 100%" v-model="material.type" placeholder="请选择物料类别">
|
||||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-input v-model="material.piece_count" placeholder="单片玻璃数量"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<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 label="排序" prop="sort_str">
|
</el-form-item>
|
||||||
<el-input v-model="material.sort_str" placeholder="排序"/>
|
<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-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -189,8 +190,14 @@
|
||||||
import {genTree} from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultmaterial = {
|
const defaultmaterial = {
|
||||||
name: "",
|
name: null,
|
||||||
number: "",
|
number: null,
|
||||||
|
specification: null,
|
||||||
|
unit: null,
|
||||||
|
type: null,
|
||||||
|
piece_count: null,
|
||||||
|
sort_str: null,
|
||||||
|
count_safe: 0,
|
||||||
processes: [],
|
processes: [],
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
|
@ -270,19 +277,13 @@
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getProcessList();
|
this.getProcessList();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
//物料详情
|
//物料详情
|
||||||
handledetail(scope)
|
handledetail(scope){
|
||||||
{
|
|
||||||
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id,type: scope.row.type }, })
|
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id,type: scope.row.type }, })
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//选项卡切换
|
//选项卡切换
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
@ -311,10 +312,8 @@
|
||||||
},
|
},
|
||||||
//绑定工序
|
//绑定工序
|
||||||
handlebind(scope) {
|
handlebind(scope) {
|
||||||
|
|
||||||
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
|
this.$router.push({name: "MaterialDO", params: {id: scope.row.id},})
|
||||||
}
|
},
|
||||||
,
|
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -324,7 +323,7 @@
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
}
|
};
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleCreate() {
|
handleCreate() {
|
||||||
|
@ -335,7 +334,6 @@
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.material = Object.assign({}, scope.row); // copy obj
|
this.material = Object.assign({}, scope.row); // copy obj
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
|
@ -359,7 +357,6 @@
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
Loading…
Reference in New Issue