1229
This commit is contained in:
parent
0ddff915b8
commit
3ce616de61
|
@ -19,7 +19,7 @@
|
|||
@expand-change="handlerExpand"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="任务编号">
|
||||
<el-table-column label="任务编号" width="150">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-row style="position: absolute;z-index: 2000;top: -38px;right: 150px;display: flex">
|
||||
<el-row class="searchWrap">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
type="monthrange"
|
||||
|
@ -36,7 +36,7 @@
|
|||
</el-dropdown>
|
||||
</div>
|
||||
</el-row>
|
||||
<div class="left" style=" width: 400px ;float: left;border-right: 1px solid #f7f7f7">
|
||||
<div class="left leftTable">
|
||||
<leftMenu
|
||||
:list="list"
|
||||
ref="leftMenu"
|
||||
|
@ -376,7 +376,7 @@
|
|||
this.windowWidth=document.body.clientWidth?document.body.clientWidth:document.documentElement.clientWidth;
|
||||
}
|
||||
let currentYear = new Date().getFullYear();
|
||||
this.timeRange = [currentYear+'-01',currentYear+'-12'];
|
||||
this.timeRange = [currentYear+'-01',(currentYear+1)+'-12'];
|
||||
this.list = [...this.proList];
|
||||
document.addEventListener("scroll", this.handleScroll);
|
||||
this.list=[...this.list];
|
||||
|
@ -385,7 +385,6 @@
|
|||
this.setStoneLine();
|
||||
},
|
||||
computed: {
|
||||
|
||||
computedList() {
|
||||
let arr = [];
|
||||
this.list.forEach(item => {
|
||||
|
@ -1019,6 +1018,11 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
proList() {
|
||||
this.list=[...this.proList];
|
||||
this.handlerCheckList(this.list);
|
||||
// this.proList = this.proList;
|
||||
},
|
||||
currentDaySize(newValue, oldValue) {
|
||||
this.list.forEach(item => {
|
||||
item.left = (item.left / oldValue.value) * newValue.value;
|
||||
|
@ -1043,7 +1047,7 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.chart {
|
||||
height: 280px;
|
||||
height: 300px;
|
||||
user-select: none;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
@ -1375,4 +1379,17 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.leftTable{
|
||||
width: 400px ;
|
||||
float: left;
|
||||
height: 300px;
|
||||
border-right: 1px solid #f7f7f7;
|
||||
}
|
||||
.searchWrap{
|
||||
position: absolute;
|
||||
z-index: 2000;
|
||||
top: -38px;
|
||||
right: 150px;
|
||||
display: flex
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
<el-radio v-model="is_testok" :label="testokTrue">检查合格</el-radio>
|
||||
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer" style="text-align: right">
|
||||
<div class="dialog-footer" style="text-align: right" v-show="!isDisabled">
|
||||
<el-button @click="recordCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="submitfield('1')">保存</el-button>
|
||||
<el-button type="warning" @click="submitfield('2')">提交</el-button>
|
||||
|
@ -182,6 +182,10 @@
|
|||
hasPicture:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
isDisabled:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -786,6 +786,7 @@
|
|||
fieldData(isSubmit){
|
||||
let that = this;
|
||||
that.field = []; //检查项目
|
||||
debugger;
|
||||
let submit = isSubmit=='1'?false:true;
|
||||
that.formData.forEach((item) => {
|
||||
let field_value = 0;
|
||||
|
@ -801,12 +802,10 @@
|
|||
is_hidden: item.is_hidden
|
||||
});
|
||||
});
|
||||
// that.testrecord.form = that.formID;//检查表
|
||||
that.testrecord.record_data = that.field;//检查项列表
|
||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||
// that.testrecord.wproduct = that.wproductId;//半成品ID
|
||||
// that.testrecord.is_submited = true;
|
||||
that.testrecord.id = that.recordId;
|
||||
debugger;
|
||||
if(submit){//提交
|
||||
this.$emit('recordSubmit',that.testrecord);
|
||||
}else {//保存
|
||||
|
|
|
@ -1,11 +1,40 @@
|
|||
<template>
|
||||
<div class="dashboard-container">
|
||||
<el-card>
|
||||
<div class="cards">
|
||||
<div class="cardFirstText">本月:2</div>
|
||||
<div class="cardSecondText">20</div>
|
||||
<div>合同总数</div>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<div class="cardFirstText">本月:20</div>
|
||||
<div class="cardSecondText">20</div>
|
||||
<div>生产订单总数</div>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<div class="cardFirstText">在制:10</div>
|
||||
<div class="cardSecondText">20</div>
|
||||
<div>已排产生产任务</div>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<div class="cardFirstText">本月:4</div>
|
||||
<div class="cardSecondText">2</div>
|
||||
<div>累计交付产品数</div>
|
||||
</div>
|
||||
<div class="cards">
|
||||
<div class="cardFirstText">本月:2</div>
|
||||
<div class="cardSecondText">2</div>
|
||||
<div>累计不合格产品数</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-badge :value="count.total_count" class="item" @click.native="gotoTicketPage">
|
||||
<el-icon class="el-icon-s-management" style="font-size: 70px;color: #d29898"></el-icon>
|
||||
</el-badge>
|
||||
<div></div>
|
||||
<div class="dashboard-text">name: {{ name }}</div>
|
||||
<div class="dashboard-text">perms: <span v-for="perm in perms" :key="perm">{{ perm }}</span></div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -37,11 +66,32 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.dashboard {
|
||||
&-container {
|
||||
margin: 30px;
|
||||
margin: 5px 6px;
|
||||
}
|
||||
&-text {
|
||||
font-size: 30px;
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
||||
.cards{
|
||||
width: 240px;
|
||||
color: #ffffff;
|
||||
background: #abccec;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
margin: 15px;
|
||||
.cardFirstText{
|
||||
text-align: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.cardSecondText{
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
.cards:hover{
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
@row-click="tableRowClick"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
@ -114,19 +115,11 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getPlanGantt} from "@/api/srm";
|
||||
import gantt from "@/components/Gantt/index";
|
||||
import { getordertoplan } from "@/api/sam";
|
||||
import {
|
||||
createProductionplan,
|
||||
getProductionplanList,
|
||||
createsubplan,
|
||||
} from "@/api/pm";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import { getProductionplanList} from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaulteorderplan = {};
|
||||
export default {
|
||||
components: { Pagination, gantt },
|
||||
data() {
|
||||
|
@ -164,17 +157,20 @@ export default {
|
|||
this.getplanList();
|
||||
},
|
||||
//生产计划列表
|
||||
|
||||
//列表
|
||||
getplanList() {
|
||||
tableRowClick(row){
|
||||
let that = this;
|
||||
this.listLoading = true;
|
||||
getProductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplanList = response.data;
|
||||
let list = response.data.results;
|
||||
let arr = [];
|
||||
list.forEach((item) => {
|
||||
getPlanGantt({}).then(res=>{
|
||||
if(res.code===200){
|
||||
let arr =[],list=[];
|
||||
let li = res.data.results;
|
||||
li.forEach((item)=>{
|
||||
if(item.id===row.id){
|
||||
list.push(item)
|
||||
}
|
||||
});
|
||||
debugger;
|
||||
console.log(list);
|
||||
list.forEach(item => {
|
||||
if (!item.children || item.children.length < 1) {
|
||||
let startTime = new Date(item.start_date).getTime();
|
||||
let endTime = new Date(item.end_date).getTime();
|
||||
|
@ -191,8 +187,84 @@ export default {
|
|||
obj.productNum = item.product_.specification;
|
||||
obj.isShow = true;
|
||||
arr.push(obj);
|
||||
} else if (item.children && item.children.length >= 1) {
|
||||
let startTime = new Date(item.start_date).getTime();
|
||||
let endTime = new Date(item.end_date).getTime();
|
||||
let temp =[];
|
||||
let parentId = item.id;
|
||||
let children = item.children;
|
||||
children.forEach(child => {
|
||||
let start = new Date(child.start_date).getTime();
|
||||
let end = new Date(child.end_date).getTime();
|
||||
let objChild = new Object();
|
||||
objChild.name = child.number;
|
||||
objChild.id = child.id;
|
||||
objChild.top=50;
|
||||
objChild.parentId=parentId;
|
||||
objChild.startTime = start;
|
||||
objChild.endTime = end;
|
||||
objChild.planTime = [start,end];
|
||||
objChild.per = child.count;
|
||||
objChild.per1 = child.count_real;
|
||||
objChild.type = 1;
|
||||
objChild.productName = child.product_.name;
|
||||
objChild.productNum = child.product_.specification;
|
||||
objChild.isShow= true;
|
||||
|
||||
temp.push(objChild);
|
||||
});
|
||||
let obj=new Object();
|
||||
obj.name=item.number;
|
||||
obj.id=item.id;
|
||||
obj.top=20;
|
||||
obj.startTime=startTime;
|
||||
obj.endTime=endTime;
|
||||
obj.planTime = [startTime,endTime];
|
||||
obj.per=item.count;
|
||||
obj.per1=item.count_real;
|
||||
obj.type=3;
|
||||
obj.productName = item.product_.name;
|
||||
obj.productNum = item.product_.specification;
|
||||
obj.children = temp;
|
||||
obj.isShow= true;
|
||||
arr.push(obj);
|
||||
}
|
||||
that.proList = arr;
|
||||
debugger;
|
||||
console.log(arr)
|
||||
});
|
||||
}else{
|
||||
that.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//列表
|
||||
getplanList() {
|
||||
let that = this;
|
||||
this.listLoading = true;
|
||||
getProductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplanList = response.data;
|
||||
let list = response.data.results;
|
||||
let arr = [];
|
||||
list.forEach((item) => {
|
||||
// if (!item.children || item.children.length < 1) {
|
||||
let startTime = new Date(item.start_date).getTime();
|
||||
let endTime = new Date(item.end_date).getTime();
|
||||
let obj = new Object();
|
||||
obj.name = item.number;
|
||||
obj.id = item.id;
|
||||
obj.top = 20;
|
||||
obj.startTime = startTime;
|
||||
obj.endTime = endTime;
|
||||
obj.planTime = [startTime, endTime];
|
||||
obj.per = item.count;
|
||||
obj.type = 1;
|
||||
obj.productName = item.product_.name;
|
||||
obj.productNum = item.product_.specification;
|
||||
obj.isShow = true;
|
||||
arr.push(obj);
|
||||
// }
|
||||
that.proList = arr;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -377,6 +377,7 @@
|
|||
:close-on-click-modal="false"
|
||||
>
|
||||
<reviewForm
|
||||
v-if="limitedReview"
|
||||
:results="fieldList"
|
||||
:originList="originList"
|
||||
:formID="recordform"
|
||||
|
@ -397,11 +398,13 @@
|
|||
@close="recordCancel"
|
||||
>
|
||||
<customForm
|
||||
v-if="recordVisible"
|
||||
:results="fieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="recordform"
|
||||
:wproduct="wproduct"
|
||||
:recordId="recordId"
|
||||
:isDisabled="isDisabled"
|
||||
@recordSubmit="recordSubmit"
|
||||
@recordSave="recordSave"
|
||||
@recordCancel="recordCancel"
|
||||
|
@ -706,6 +709,7 @@
|
|||
mutipID: [],
|
||||
wproduct: null,
|
||||
isPost: false,
|
||||
isDisabled: false,
|
||||
origin_test: null,
|
||||
hasPicture: false,
|
||||
outerVisible: false,
|
||||
|
@ -1008,6 +1012,7 @@
|
|||
}
|
||||
that.fieldList = arr;
|
||||
that.$nextTick(()=>{
|
||||
that.isDisabled = false;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
})
|
||||
|
@ -1050,7 +1055,45 @@
|
|||
},
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope){
|
||||
|
||||
let that = this;
|
||||
that.recordVisible = false;
|
||||
that.recordId = scope.row.id;
|
||||
that.recordform = scope.row.form;
|
||||
that.formName = scope.row.form_.name;
|
||||
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
|
||||
if (response.data) {
|
||||
that.hasPicture = false;
|
||||
let fieldList = response.data.results;
|
||||
that.fieldList = [...fieldList];
|
||||
let arr = fieldList.filter(item => {
|
||||
return item.field_type === 'draw'
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
that.hasPicture = true;
|
||||
}
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
let arr = [];
|
||||
let fieldList = res.data.record_data;
|
||||
for(let i=0;i<that.fieldList.length;i++){
|
||||
let obj = that.fieldList[i];
|
||||
obj.is_testok = null;
|
||||
for(let j=0;j<fieldList.length;j++){
|
||||
if(that.fieldList[i].field_key===fieldList[j].field_key){
|
||||
obj.id = fieldList[j].id;
|
||||
obj.is_testok = fieldList[j].is_testok;
|
||||
obj.field_value = fieldList[j].field_value;
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
}
|
||||
that.fieldList = arr;
|
||||
that.$nextTick(()=>{
|
||||
that.isDisabled = true;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
//半产品复检
|
||||
handleReview() {
|
||||
|
@ -1110,6 +1153,7 @@
|
|||
that.hasPicture = true;
|
||||
}
|
||||
that.$nextTick(()=>{
|
||||
that.isDisabled = false;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
})
|
||||
|
|
|
@ -32,12 +32,6 @@
|
|||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleInspection(scope)"
|
||||
>检验
|
||||
</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
|
||||
@click="handleInspection(scope)"
|
||||
|
@ -181,6 +175,7 @@
|
|||
@close="recordCancel"
|
||||
>
|
||||
<customForm
|
||||
v-if="innerVisible"
|
||||
:results="fieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="recordform"
|
||||
|
|
Loading…
Reference in New Issue