Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2022-01-13 16:57:26 +08:00
commit a943c10fa1
10 changed files with 623 additions and 498 deletions

View File

@ -19,19 +19,13 @@
@expand-change="handlerExpand"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column label="任务编号" width="150">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="任务编号" prop="name">
</el-table-column>
<el-table-column label="产品名称">
<template slot-scope="scope">
<div style="overflow: hidden; text-overflow:ellipsis; white-space: nowrap;">{{ scope.row.productName }}</div>
</template>
<el-table-column label="产品名称" prop="productName" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="产品型号">
<template slot-scope="scope">{{ scope.row.productNum }}</template>
<el-table-column label="产品型号" prop="productNum">
</el-table-column>
<el-table-column label="生产数量">
<template slot-scope="scope">{{ scope.row.per }}</template>
<el-table-column label="生产数量" prop="per">
</el-table-column>
</el-table>
</div>

View File

@ -1,19 +1,18 @@
<template>
<div
class="slider"
ref="slider"
class="slider"
>
<div
class="process"
:style="{ width }"
style="font-size: 12px;color: #ffffff;text-align: right"
>
<span v-if="per">{{ per }}</span>
<span v-else>{{ per }}</span>
</div>
<div class="process1"
<div
class="process1"
:style="{width:process1Width}"
style="font-size: 12px;color: #ffffff;text-align: right"
>
<span v-if="per1"> {{ per1 }}</span>
</div>
@ -122,6 +121,10 @@ export default {
top: 0;
width: 112px;
height: 20px;
font-size: 12px;
color: #ffffff;
text-align: right;
line-height: 20px;
border-radius: 3px;
background: #409eff;
}
@ -131,10 +134,16 @@ export default {
top: 0;
width: 10px;
height: 20px;
font-size: 12px;
color: #ffffff;
text-align: right;
line-height: 20px;
border-radius: 3px;
background: #11c750;
}
.slider .process span{
margin-right: 5px;
}
.slider .block i {
font-size: 25px;

View File

@ -29,10 +29,12 @@
v-else-if="item.field_type === 'int'"
:label="item.field_name"
>
<el-input
<el-input-number
style="width: 100%;"
v-model="checkForm[item.field_key]"
type="number"
step-strictly
placeholder="请输入"
:min="0"
@input="keyChange($index,item.field_key)"
/>
</el-form-item>
@ -40,9 +42,11 @@
v-else-if="item.field_type === 'float'"
:label="item.field_name"
>
<el-input
<el-input-number
style="width: 100%;"
v-model="checkForm[item.field_key]"
type="number"
:precision="2"
:step="0.1"
placeholder="请输入"
@input="keyChange($index,item.field_key)"
/>
@ -120,8 +124,8 @@
<el-row v-show="hasPicture">
<el-form-item label="图表">
<div>
<!--<img id="canvasImg" :src="img" style="width:500px;height: 300px;display: none">-->
<img id="canvasImg" src="./../../assets/glass.png" style="width:500px;height: 300px;display: none">
<img id="canvasImg" :src="img" style="width:500px;height: 300px;display: none">
<!--<img id="canvasImg" src="./../../assets/glass.png" style="width:500px;height: 300px;display: none">-->
<div style="position: relative;display: flex;flex-direction: column;
border: 1px solid #DCDFE6;">
<canvas id="canvas" width="500" height="300">
@ -229,9 +233,9 @@
let imag= this.formData.filter(item => {
return item.field_type === 'draw';
});
/* that.img = new Image();
that.img = new Image();
that.img.crossOrigin = '';
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;*/
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
setTimeout(function(){
that.canvasInit();
},500);

View File

@ -45,11 +45,12 @@
placeholder="请输入"
@input="keyChange($index,item.field_key)"
/>
<el-input
<el-input-number
class="halfWidth"
v-model="checkForm[item.field_key]"
type="number"
step-strictly
placeholder="请输入"
:min="0"
@input="keyChange($index,item.field_key)"
/>
</el-form-item>
@ -65,13 +66,21 @@
placeholder="请输入"
@input="keyChange($index,item.field_key)"
/>
<el-input
<el-input-number
class="halfWidth"
v-model="checkForm[item.field_key]"
:precision="2"
:step="0.1"
placeholder="请输入"
@input="keyChange($index,item.field_key)"
/>
<!-- <el-input
class="halfWidth"
v-model="checkForm[item.field_key]"
type="number"
placeholder="请输入"
@input="keyChange($index,item.field_key)"
/>
/>-->
</el-form-item>
<el-form-item
v-else-if="item.field_type === 'date'"
@ -300,25 +309,15 @@
obj = item;
that.judgeList.push(obj)
});
//原始表的数据
/*for(let i=0;i<this.origins.length;i++){
let key = this.origins[i].field_key;
that.originForm[key]=this.origins[i].field_key;
that.$set(that.originForm,key,this.origins[i].field_value)
}*/
debugger;
//图片地址
let imag= this.formData.filter(item => {
return item.field_type === 'draw';
});
// that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
/*let originImag= this.origins.filter(item => {
return item.field_type === 'draw';
});*/
/*that.originImg = new Image();
that.originImg.crossOrigin = '';
that.originImg = imag[0].origin_value;
*/
that.img = new Image();
that.img.crossOrigin = '';
that.img = 'http://47.95.0.242:2222'+imag[0].field_value;
that.originImg = 'http://47.95.0.242:2222'+imag[0].origin_value;
listJudge.forEach(item => {
let obj = new Object();
obj = item;

View File

@ -10,12 +10,23 @@
</div>
</template>
<script>
import tracking from '@/assets/tracking/build/tracking-min.js';
import {faceLogin} from "@/api/testModel";
import { getTickets } from "@/api/workflow";
import tracking from '@/assets/tracking/build/tracking-min.js';
import '@/assets/tracking/build/data/face-min.js';
import {createrecordform,updaterecordform} from "@/api/mtm";
export default {
props: {
dialogType: {
type:String,
default:"new"
},
recordform: {
type:Object,
default:null
}
},
data() {
return {
video: null,
@ -77,16 +88,26 @@
let imgData = {base64:img};
faceLogin(imgData).then((res) => {
if (res.code >= 200) {
debugger;
console.log(res.data);
getTickets( {token:res.data.access,page:1,page_size:10,category:'duty'}).then((resp)=>{
if(resp.code>=200){
debugger;
console.log(resp.data);
const isEdit = that.dialogType === "edit";
if (isEdit) {
updaterecordform(that.recordform.id, that.recordform).then(
(res) => {
if (res.code >= 200) {
that.$emit('func',false);
that.$message.success("成功");
}
})
that.uploadLock = false;
this.$message.success(res.data.username+'签到成功!');
}
);
} else {
createrecordform(that.recordform).then((res) => {
if (res.code >= 200) {
that.$emit('func',false);
that.$message.success("成功");
}
});
}
// this.$message.success(res.data.username+'签到成功!');
/*that.$confirm("是否提交?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",

View File

@ -20,7 +20,7 @@
<li @click="refreshSelectedTag(selectedTag)">刷新</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
<li @click="closeOthersTags">关闭其他</li>
<li @click="closeAllTags(selectedTag)">关闭</li>
<li @click="closeAllTags(selectedTag)">关闭</li>
</ul>
</div>
</template>

View File

@ -1,32 +1,30 @@
<template>
<div class="dashboard-container">
<el-card class="dashboardTopCard">
<div @click="openWord">wendanag</div>
<a href="http://www.xdocin.com/xdoc?_func=to&_format=html&_cache=1&_xdoc=http://47.95.0.242:2222/media/2021/09/07/004-%E8%AF%B7%E5%81%87%E5%8D%95_LL8uZdx.docx" target="_blank">XDOC</a>
<div class="CardTitleWrap">
<span class="verticalLine"></span><span class="dashboardCardTitle">数据统计</span>
</div>
<div class="cards">
<div class="cards" @click="toDetail('1')">
<div class="cardCurrentText">本月{{contractTotalCurrent}}</div>
<div class="cardTotalText">{{contractTotalCount}}</div>
<div>合同总数</div>
</div>
<div class="cards">
<div class="cards" @click="toDetail('2')">
<div class="cardCurrentText">本月{{orderTotalCurrent}}</div>
<div class="cardTotalText">{{orderTotalCount}}</div>
<div>生产订单总数</div>
</div>
<div class="cards">
<div class="cards" @click="toDetail('3')">
<div class="cardCurrentText">在制{{planTotalCurrent}}</div>
<div class="cardTotalText">{{planTotalCount}}</div>
<div>已排产生产任务</div>
</div>
<div class="cards">
<div class="cards" @click="toDetail('4')">
<div class="cardCurrentText">本月4</div>
<div class="cardTotalText">20</div>
<div>累计交付产品数</div>
</div>
<div class="cards">
<div class="cards" @click="toDetail('5')">
<div class="cardCurrentText">本月2</div>
<div class="cardTotalText">2</div>
<div>累计不合格产品数</div>
@ -179,19 +177,20 @@
</el-pagination>
</div>
</div>
<div :style="{height:cardTabelHeight+'px'}">
<el-tabs type="card" :style="{height:cardTabelHeight+'px'}" v-model="activeName" @tab-click="activeNameClick">
<el-tab-pane label="库存警告" name="库存警告">
<ul class="lists">
<li class="listItem">
<div class="itemText">
<span>玻璃低于安全库存</span><span>2021-12-30</span>
</div>
</li>
<li class="listItem">
<li class="listItem" v-for="item in warningList" :key="item.id">
<div class="itemText">
<span>某某批货临近交货日期</span><span>2021-12-20</span>
<span>{{item}}</span><span>2021-12-20</span>
</div>
</li>
<li class="listItem">
<!--<li class="listItem">
<div class="itemText">
<span>玻璃低于安全库存</span><span>2021-11-30</span>
</div>
@ -200,17 +199,38 @@
<div class="itemText">
<span>某某批货临近交货日期</span><span>2021-11-20</span>
</div>
</li>-->
</ul>
</el-tab-pane>
<el-tab-pane label="临近交货" name="临近交货">
<ul class="lists">
<li class="listItem">
<div class="itemText">
<span>某某批货临近交货日期</span><span>2021-12-20</span>
</div>
</li>
<li class="listItem" v-for="item in warningList" :key="item.id">
<div class="itemText">
<span>{{item}}</span><span>2021-12-20</span>
</div>
</li>
</ul>
</el-tab-pane>
<el-tab-pane label="过期提醒" name="过期提醒">
<ul class="lists">
<li class="listItem">
<div class="itemText">
<span>某某批货临近过期</span><span>2021-11-20</span>
</div>
<!--<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>-->
</li>
<li class="listItem" v-for="item in warningList" :key="item.id">
<div class="itemText">
<span>{{item}}</span><span>2021-12-20</span>
</div>
</li>
</ul>
</el-tab-pane>
</el-tabs>
</el-card>
</el-col>
</el-row>
@ -220,8 +240,10 @@
<script>
import echarts from 'echarts'
import { mapGetters } from 'vuex';
import { getMaterialList } from "@/api/mtm";
import { getInventoryList } from "@/api/inm";
import { getProductionplanList} from "@/api/pm";
import { getmaterialbatchList } from "@/api/inm";
import { getContractList , getOrderList } from "@/api/sam";
export default {
@ -247,6 +269,7 @@ export default {
planList:[],
stockList:[],
remindList:[],
warningList:[],
list:[
{id:1,name:'HIehd9',card:'3337',sco:'REF-32'},
{id:1,name:'HIehd9',card:'3337',sco:'REF-32'},
@ -260,6 +283,7 @@ export default {
"5":'加工工具',
"6":'辅助工装',
},
activeName:'库存警告',
seriesData:[80,95,96, 96, 96, 98, 99,100],
contractTotalCount:null,//合同总数
contractTotalCurrent:null,
@ -286,49 +310,56 @@ export default {
window.open("http://47.95.0.242:2222/media/2021/09/07/004-%E8%AF%B7%E5%81%87%E5%8D%95_LL8uZdx.docx");
},
getStatisticsData(){
let that = this;
let dat = new Date();
this.week = dat.getDay();
this.currentTime = dat.getTime();
this.currentYear = dat.getFullYear();
that.week = dat.getDay();
that.currentTime = dat.getTime();
that.currentYear = dat.getFullYear();
let month = dat.getMonth() + 1;
this.currentMonth = month>9?month:'0'+month ;
this.currentDay = dat.getDate();
let create_time_start = this.currentYear+'-'+this.currentMonth+'-01';
that.currentMonth = month>9?month:'0'+month ;
that.currentDay = dat.getDate();
let create_time_start = that.currentYear+'-'+that.currentMonth+'-01';
//获取合同数
getContractList({page:1,page_size:1}).then((response) => {
if (response.data) {
this.contractTotalCount = response.data.count;
that.contractTotalCount = response.data.count;
}
});
getContractList({page:1,page_size:1,create_time_start:create_time_start}).then((response) => {
if (response.data) {
this.contractTotalCurrent = response.data.count;
that.contractTotalCurrent = response.data.count;
}
});
//获取生产订单数
getOrderList({page:1,page_size:1}).then((response) => {
if (response.data) {
this.orderTotalCount = response.data.count;
that.orderTotalCount = response.data.count;
}
});
getOrderList({page:1,page_size:1,create_time_start:create_time_start}).then((response) => {
if (response.data) {
this.orderTotalCurrent = response.data.count;
that.orderTotalCurrent = response.data.count;
}
});
//获取已排产任务
getProductionplanList({page:1,page_size:1}).then((response) => {
if (response.data) {
this.planTotalCount = response.data.count;
that.planTotalCount = response.data.count;
}
});
getProductionplanList({page:1,page_size:1,tag:'working'}).then((response) => {
if (response.data) {
this.planTotalCurrent = response.data.count;
that.planTotalCurrent = response.data.count;
}
});
//获取交付产品
//获取不合格产品
getMaterialList({page:0,tag:'low_inm'}).then((response) => {
if (response.data) {
that.warningList = response.data;
}
});
},
gotoTicketPage(){
let path = this.$route.path;
@ -476,16 +507,30 @@ export default {
stockMore(){
this.$router.push({name:'warehouse',params:{}})
},
toDetail(index){
if(index==='1'){
this.$router.push({name:'contract',params:{page:1,page_size:20}})
}else if(index==='2'){
this.$router.push({name:'order',params:{page:1,page_size:20}})
}else if(index==='3'){
this.$router.push({name:'plan',params:{page:1,page_size:20}})
}else if(index==='4'){
this.$router.push({name:'product',params:{page:1,page_size:20,material__type:1}})
}else if(index==='5'){
this.$router.push({name:'product',params:{page:1,page_size:20,material__type:1}})
}
},
//便捷查询按钮
convenientClick(index,type){
let startTime = '',endTime = '',url='',activeIndex = '1',obj = new Object();
let that = this;
let startTime = '',endTime = '',activeIndex = '1';
let dat = new Date();
let week = dat.getDay();//0-6
let currentTime = dat.getTime();
let currentYear = dat.getFullYear();
let currentMonth = dat.getMonth() + 1;
let currentDay = dat.getDate();
endTime = currentYear+'-'+currentMonth+''+currentDay;
endTime = currentYear+'-'+currentMonth+'-'+currentDay;
if(type==='week'){
activeIndex = '1';
let num = week===0?6:week-1;
@ -510,11 +555,16 @@ export default {
}
startTime = yea+'-'+mon+'-01';
}
obj.startTime = startTime;
obj.endTime = endTime;
if(index==='1'){
this.tableDate = null;
this.tableIndex = activeIndex;
this.listLoadingPlan = true;
getProductionplanList({page:0,create_time_start:startTime,create_time_end:endTime}).then((response) => {
if (response.data) {
that.planList = response.data;
}
this.listLoadingPlan = false;
});
}else{
this.chartDate = null;
this.chartIndex = activeIndex;
@ -523,6 +573,7 @@ export default {
},
//选择月份
searchTimeChange(index){
let that = this;
let startDate = '',endDate = '';
let year = null,month = null,days = null;
if(index==='1'){
@ -532,16 +583,23 @@ export default {
month = this.tableDate.split("-")[1];
let d = new Date(year, month, 0);
days = d.getDate();
endDate = this.tableDate + '-'+days;
this.listLoadingPlan = true;
getProductionplanList({page:0,create_time_start:startDate,create_time_end:endDate}).then((response) => {
if (response.data) {
that.planList = response.data;
}
this.listLoadingPlan = false;
});
}else{
this.chartIndex = null;
startDate = this.chartDate+'-01';
year = this.tableDate.split("-")[0];
month = this.tableDate.split("-")[1];
year = this.chartDate.split("-")[0];
month = this.chartDate.split("-")[1];
let d = new Date(year, month, 0);
days = d.getDate();
}
endDate = this.chartDate + '-'+days;
console.log(startDate,endDate);
}
},
handleStockSizeChange(val){
this.stockPageSize = val;
@ -559,6 +617,36 @@ export default {
this.listLoading = false;
});
},
activeNameClick(tab, event) {
let that = this;
// debugger;
// console.log(tab, event);
if (tab.label === '库存警告') {
getMaterialList({page:0,tag:'low_inm'}).then((response) => {
if (response.data) {
that.warningList = response.data;
that.remindTotal = response.data.length;
}
this.listLoadingPlan = false;
});
}else if(tab.label === '临近交货') {
getmaterialbatchList({page:0,tag:'expired'}).then((response) => {
if (response.data) {
that.warningList = response.data;
that.remindTotal = response.data.length;
}
this.listLoadingPlan = false;
});
} else if(tab.label === '过期提醒'){
getmaterialbatchList({page:0,tag:'expired'}).then((response) => {
if (response.data) {
that.warningList = response.data;
that.remindTotal = response.data.length;
}
this.listLoadingPlan = false;
});
}
},
handleRemindSizeChange(val){
this.remindPageSize = val;
this.remindPage = 1;
@ -572,7 +660,7 @@ export default {
// let he = document.documentElement.clientHeight || document.body.clientHeight;
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
let heig = document.getElementsByClassName('dashboardTopCard')[0].clientHeight;
this.cardTabelHeight = ((hei-heig)/2-80);
this.cardTabelHeight = ((hei-heig-130)/2);
document.getElementById('chartColumn').style.height = this.cardTabelHeight+'px';
this.drawChart();
this.getPlanList();
@ -711,7 +799,7 @@ export default {
.listItem{
height: 40px;
line-height: 40px;
font-size: 18px;
font-size: 16px;
.itemText{
display: flex;
justify-content: space-between;

View File

@ -1,12 +1,10 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增物料</el-button
>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
新增物料
</el-button>
<el-input
v-model="listQuery.search"
placeholder="物料名称/物料编号"
@ -19,17 +17,16 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
>搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
>重置
</el-button>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
@ -51,36 +48,30 @@
height="100"
v-el-height-adaptive-table="{bottomOffset: 40}"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="物料编号">
<template slot-scope="scope">
{{ scope.row.number }}
</template>
</el-table-column>
<el-table-column label="物料类别" >
<el-table-column label="物料类别">
<template slot-scope="scope"> {{options_[scope.row.type]}}</template>
</el-table-column>
<el-table-column label="物料名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.specification }}</template>
</el-table-column>
<el-table-column label="单片玻璃数量" v-if="materialList.results[0].type==1">
<template slot-scope="scope">{{ scope.row.piece_count }}</template>
</el-table-column>
<el-table-column label="计量单位">
<template slot-scope="scope">{{ scope.row.unit }}</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
@ -91,27 +82,26 @@
v-if="checkPermission(['material_update'])&&scope.row.type!=5&&scope.row.type!=6"
type="primary"
@click="handlebind(scope)"
>检查表</el-link
>
>检查表
</el-link>
<el-link
v-if="checkPermission(['material_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
>编辑
</el-link>
<el-link
v-if="checkPermission(['material_update'])"
type="primary"
@click="handledetail(scope)"
>详情</el-link
>
>详情
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
>删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -136,13 +126,13 @@
:rules="rule1"
>
<el-form-item label="物料名称" prop="name">
<el-input v-model="material.name" placeholder="物料名称" />
<el-input v-model="material.name" placeholder="物料名称"/>
</el-form-item>
<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 label="规格型号" prop="specification">
<el-input v-model="material.specification" placeholder="规格型号" />
<el-input v-model="material.specification" placeholder="规格型号"/>
</el-form-item>
<el-form-item label="计量单位" prop="unit">
@ -158,7 +148,7 @@
<el-form-item label="物料类别" prop="type">
<el-select style="width: 100%" v-model="material.type" placeholder="请选择" >
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
@ -168,12 +158,12 @@
</el-select>
</el-form-item>
<el-form-item label="单片玻璃数量" prop="piece_count" 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 label="排序" prop="sort_str">
<el-input v-model="material.sort_str" placeholder="排序" />
<el-input v-model="material.sort_str" placeholder="排序"/>
</el-form-item>
</el-form>
@ -185,34 +175,41 @@
</div>
</template>
<script>
import { getMaterialList,getMaterial, createMaterial,updateMaterial,deleteMaterial,getProcessList } from "@/api/mtm";
import checkPermission from "@/utils/permission";
import {
getMaterialList,
getMaterial,
createMaterial,
updateMaterial,
deleteMaterial,
getProcessList
} from "@/api/mtm";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultmaterial = {
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultmaterial = {
name: "",
number: "",
processes:[],
};
export default {
components: { Pagination },
processes: [],
};
export default {
components: {Pagination},
data() {
return {
material: defaultmaterial,
materialList: {
count: 0,
},
processOptions:[],
options_:{
processOptions: [],
options_: {
"1":'成品',
"2":'半成品',
"3":'主要原料',
"4":'辅助材料',
"5":'加工工具',
"6":'辅助工装',
"1": '成品',
"2": '半成品',
"3": '主要原料',
"4": '辅助材料',
"5": '加工工具',
"6": '辅助工装',
},
options: [{
@ -234,7 +231,7 @@ export default {
value: 6,
label: '辅助工装'
}],
unitoptions:[
unitoptions: [
{
value: '',
label: ''
@ -257,14 +254,13 @@ export default {
page: 1,
page_size: 20,
},
activeName:"",
activeName: "",
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
number: [{ required: true, message: "请输入", trigger: "blur" }],
name: [{required: true, message: "请输入", trigger: "blur"}],
number: [{required: true, message: "请输入", trigger: "blur"}],
},
};
@ -290,7 +286,7 @@ export default {
//选项卡切换
handleClick(tab) {
this.listLoading = true;
this.listQuery.type=tab.name;
this.listQuery.type = tab.name;
getMaterialList(this.listQuery).then((response) => {
if (response.data) {
this.materialList = response.data;
@ -314,18 +310,17 @@ export default {
});
},
//绑定工序
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() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.activeName="";
this.activeName = "";
this.listQuery = {
page: 1,
page_size: 20,
@ -392,6 +387,6 @@ export default {
});
},
},
};
};
</script>

View File

@ -20,7 +20,6 @@
</el-button>
<!--表格列表-->
<el-table
:data="recordformList.results"
border
fit
@ -38,31 +37,26 @@
<template slot-scope="scope">
<el-tag v-if="scope.row.enabled==false"></el-tag>
<el-tag v-if="scope.row.enabled==true"></el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
@click="handleLook(scope)"
>查看
</el-link
>
</el-link>
<el-link
v-if="checkPermission(['material_update'])"
@click="handleEdit(scope)"
>编辑
</el-link
>
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除
</el-link
>
</el-link>
</template>
</el-table-column>
</el-table>
@ -86,12 +80,10 @@
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false"
>取消
</el-button>
<el-button type="primary" @click="recordformconfirm('Forms')"
>确认
<el-button type="danger" @click="dialogVisible = false">取消
</el-button>
<!--<el-button type="primary" @click="recordformconfirm('Forms')">确认</el-button>-->
<el-button type="primary" @click="recordformcon">管理员授权</el-button>
</div>
</el-dialog>
<!--表格展示-->
@ -256,8 +248,7 @@
icon="el-icon-plus"
@click="handlefieldCreate"
>新增
</el-button
>
</el-button>
<!--表格字段列表-->
<el-table
:data="fieldList.results"
@ -270,23 +261,18 @@
>
<el-table-column type="index" width="50"/>
<el-table-column label="字段名称">
<template slot-scope="scope">{{
scope.row.field_name
}}
<template slot-scope="scope">
{{scope.row.field_name}}
</template>
</el-table-column>
<el-table-column label="字段类型">
<template slot-scope="scope">{{
options_[scope.row.field_type]
}}
<template slot-scope="scope">
{{options_[scope.row.field_type]}}
</template>
</el-table-column>
<el-table-column label="字段标识">
<template slot-scope="scope">{{
scope.row.field_key
}}
<template slot-scope="scope">
{{scope.row.field_key}}
</template>
</el-table-column>
<!--
@ -317,7 +303,6 @@
<el-tag v-else></el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
@ -325,15 +310,13 @@
type="primary"
@click="handlefieldEdit(scope)"
>编辑
</el-link
>
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
type="danger"
@click="handlefieldDelete(scope)"
>删除
</el-link
>
</el-link>
</template>
</el-table-column>
</el-table>
@ -383,8 +366,7 @@
field.field_type == 'radio' ||
field.field_type == 'checkbox' ||
field.field_type == 'select' ||
field.field_type == 'selects'
"
field.field_type == 'selects'"
>
<el-button @click.prevent="addDomain" style="border: none">
<i class="el-icon-circle-plus-outline"></i>
@ -527,6 +509,17 @@
</el-col>
</el-row>
</el-card>
<el-dialog :visible.sync="limitedPhoto">
<div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;margin-bottom: 15px;">权限验证</div>
<div class="testTracking">
<faceLogin
name="faceLogin"
:dialogType="dialogType"
:recordform="recordform"
@func="getMsgFormSon"
></faceLogin>
</div>
</el-dialog>
</div>
</template>
@ -536,6 +529,7 @@
import {getEquipmentAll} from "@/api/equipment";
import vueJsonEditor from "vue-json-editor";
import {upUrl, upHeaders} from "@/api/file";
import faceLogin from '@/components/faceLogin/faceLogin.vue'
import {
getrecordformList,
createrecordform,
@ -557,11 +551,11 @@
number: "",
};
const defaultrecordform = {enabled:false};
const defaultrecordform = {enabled: false};
const defaultfield = {};
let preDrawAry = [];
export default {
components: {Pagination, vueJsonEditor, Treeselect, customForm},
components: {Pagination, vueJsonEditor, Treeselect, customForm,faceLogin},
data() {
return {
step: defaultstep,
@ -576,13 +570,15 @@
dialogVisibleForm: false,
dialogTypes: "new",
field: {
field_type: "",
field_type: null,
field_key: "",
field_name: "",
sort: "",
parent: "",
help_text: "",
draw_template: "",//图片模板
field_name: null,
sort: null,
parent: null,
help_text: null,
rule_expression: null,
display_expression: null,
draw_template: null,//图片模板
field_choice: [""],
},
field_choice: [""],
@ -699,6 +695,7 @@
imgData: '',
canvasImg: '',
judgeList: [],
limitedPhoto:false
};
},
computed: {},
@ -888,9 +885,10 @@
this.recordform = Object.assign({}, defaultrecordform);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Forms"].clearValidate();
});
this.$refs["Forms"].resetFields();
// this.$nextTick(() => {
// this.$refs["Forms"].resetFields();
// });
},
//新增字段
handlefieldCreate() {
@ -898,7 +896,18 @@
// this.field = Object.assign({}, defaultfield);
this.dialogType1 = "new";
this.dialogVisible1 = true;
// this.$refs["Form"].resetFields();
this.$nextTick(() => {
this.field.field_type= null;
this.field.field_key= null;
this.field.field_name= null;
this.field.sort= null;
this.field.parent= null;
this.field.help_text= null;
this.field.draw_template= null;
this.field.field_choice= null;
this.field.rule_expression= null;
this.field.display_expression= null;
this.$refs["Form"].clearValidate();
});
},
@ -1016,6 +1025,16 @@
}
});
},
recordformcon(){
this.recordform.material = this.material;
this.recordform.type = 2;
this.limitedPhoto = true;
},
getMsgFormSon(data){
this.limitedPhoto = data;
this.recordformLists();
this.dialogVisible = false;
},
},
};
</script>

View File

@ -3,7 +3,6 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>生产任务列表</span>
</div>
<el-input
v-model="listQuery1.search"
@ -17,15 +16,15 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
>搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
>重置
</el-button>
<el-table
:data="productionplanList.results"
border
@ -33,11 +32,8 @@
stripe
style="width: 100%"
height="300"
>
<el-table-column type="index" width="50"/>
<el-table-column label="任务编号" width="110">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -47,7 +43,6 @@
<el-table-column label="合同编号" width="110">
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.order_.contract_.number }}</template>
</el-table-column>
<el-table-column label="产品名称" width="150" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column>
@ -242,20 +237,21 @@
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaulteorderplan = {};
export default {
components: {Pagination,gantt},
components: {Pagination, gantt},
data() {
return {
orderplan: defaulteorderplan,
orderList: {
count: 0,
},
state_:{
10:'制定中',
20:'已下达',
30:'已接受',
40:'生产中',
50:'已完成',
60:'军检完成'},
state_: {
10: '制定中',
20: '已下达',
30: '已接受',
40: '生产中',
50: '已完成',
60: '军检完成'
},
listQuery: {
page: 1,
page_size: 20,
@ -277,7 +273,7 @@
number: [{required: true, message: "请输入", trigger: "blur"}],
},
proList:[],
proList: [],
};
},
computed: {},
@ -309,7 +305,7 @@
if (response.data) {
this.productionplanList = response.data;
let list = response.data.results;
let arr= [];
let arr = [];
list.forEach(item => {
if (!item.children || item.children.length < 1) {
let startTime = new Date(item.start_date).getTime();
@ -402,12 +398,12 @@
});
},
activeNameClick(tab, event){
activeNameClick(tab, event) {
debugger;
console.log(tab, event);
if(tab.label==='甘特图'){
if (tab.label === '甘特图') {
this.ganttShow = true;
}else{
} else {
this.ganttShow = false;
}
},