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

This commit is contained in:
caoqianming 2022-03-14 11:11:53 +08:00
commit cf83b9e8f9
45 changed files with 6405 additions and 6389 deletions

View File

@ -73,7 +73,7 @@
}
font-size: 18px;
width: 300px;
line-height: 50px;
line-height: 40px;
text-align: center;
transform: skewX(-45deg);
@ -81,8 +81,8 @@
position: absolute;
right: -25px;
top: 0;
height: 50px;
width: 50px;
height: 40px;
width: 40px;
background-color: #0f1325;
transform: skewX(45deg);
}
@ -100,8 +100,8 @@
}
font-size: 18px;
width: 300px;
height: 50px;
line-height: 50px;
height: 40px;
line-height: 40px;
text-align: center;
transform: skewX(45deg);
background-color: #0f1325;
@ -123,13 +123,14 @@
}
.body-box {
margin-top: 16px;
margin-top: 5px;
display: flex;
flex-direction: column;
//下方区域的布局
.content-box {
display: grid;
margin-bottom: 15px;
grid-template-columns: 35% 15% 15% 15% 20%;
div{
box-sizing: border-box!important;

View File

@ -231,6 +231,15 @@
left: item.left + 'px',
width: item.widthMe + 'px'
}"
@mouseleave="lineMouseleave"
@mouseenter="
lineMouseenter(
`line${item.id}`,
$event,
item.id,
item.parentId,
index
)"
>
<div class="progress" :style="{ width: item.per + '%' }"></div>
</div>
@ -254,13 +263,15 @@
<span class="title">工作周期</span>
<span>{{ currentProjectMsg.allTime }}</span>
</div>
<div class="lineMsg" v-if="currentProjectMsg.per1">
<span class="title">订单计划</span>
<span>{{ currentProjectMsg.per }}</span>
<div class="lineMsg">
<span class="title">计划数量</span>
<span v-if="currentProjectMsg.per">{{ currentProjectMsg.per }}</span>
<span v-else>0</span>
</div>
<div class="lineMsg" v-if="currentProjectMsg.per1">
<div class="lineMsg">
<span class="title">当前进度</span>
<span>{{ currentProjectMsg.per1 }}</span>
<span v-if="currentProjectMsg.per1">{{ currentProjectMsg.per1 }}</span>
<span v-else>0</span>
</div>
<div class="lineMsg">
<span class="title">开始时间</span>

View File

@ -231,6 +231,15 @@
left: item.left + 'px',
width: item.widthMe + 'px'
}"
@mouseleave="lineMouseleave"
@mouseenter="
lineMouseenter(
`line${item.id}`,
$event,
item.id,
item.parentId,
index
)"
>
<div class="progress" :style="{ width: item.per + '%' }"></div>
</div>
@ -254,13 +263,15 @@
<span class="title">工作周期</span>
<span>{{ currentProjectMsg.allTime }}</span>
</div>
<div class="lineMsg" v-if="currentProjectMsg.per1">
<span class="title">当前进度</span>
<span>{{ currentProjectMsg.per }}</span>
<div class="lineMsg">
<span class="title">计划数量</span>
<span v-if="currentProjectMsg.per">{{ currentProjectMsg.per }}</span>
<span v-else>0</span>
</div>
<div class="lineMsg" v-if="currentProjectMsg.per1">
<span class="title">合格数量</span>
<span>{{ currentProjectMsg.per1 }}</span>
<div class="lineMsg">
<span class="title">当前进度</span>
<span v-if="currentProjectMsg.per1">{{ currentProjectMsg.per1 }}</span>
<span v-else>0</span>
</div>
<div class="lineMsg">
<span class="title">开始时间</span>

View File

@ -330,7 +330,7 @@ export const asyncRoutes = [
path: 'sales',
name: 'sales',
component: () => import('@/views/sam/sales'),
meta: { title: '销售信息', icon: 'saleInfo', perms: ['sam_sales'] }
meta: { title: '销售发货', icon: 'saleInfo', perms: ['sam_sales'] }
}
,
{

View File

@ -6,7 +6,7 @@
<el-icon class="el-icon-s-data"></el-icon>
</span>
<div class="d-flex">
<span class="fs-xl text mx-2">数据统计图</span>
<span class="fs-xl text mx-2">任务完成进度</span>
</div>
</div>
<div>
@ -32,41 +32,30 @@
options: {},
cdata: {
category: [
"市区",
"万州",
"江北",
"南岸",
"北碚",
"綦南",
"长寿",
"永川",
"璧山",
"江津",
"城口",
"大足",
"垫江",
"丰都",
"奉节",
"合川",
"江津区",
"开州",
"南川",
"彭水",
"黔江",
"石柱",
"铜梁",
"潼南",
"巫山",
"巫溪",
"武隆",
"秀山",
"酉阳",
"云阳",
"忠县",
"川东",
"检修"
"JH5jhx463-1",
"JH5jhx463-2",
"JH5jhx463-3",
"JH5jhx463-4",
"JH5jhx463-5",
"JH5jhx463-6",
"JH5jhx463-7",
"JH5jhx463-8",
"JH5jhx463-9",
"JH5jhx463-10",
"JH5jhx463-11",
"JH5jhx463-12",
"JH5jhx463-13",
"JH5jhx463-14",
"JH5jhx463-15"
],
lineData: [
planData: [
18092,
20728,
24045,
28348,
32808,
36097,
39867,
18092,
20728,
24045,
@ -75,40 +64,15 @@
36097,
39867,
44715,
48444,
50415,
56061,
62677,
59521,
67560,
18092,
20728,
24045,
28348,
32808,
36097,
39867,
44715,
48444,
50415,
36097,
39867,
44715,
48444,
50415,
50061,
32677,
49521,
32808
],
barData: [
4600,
5000,
5500,
6500,
7500,
8500,
9900,
9600,
19000,
19500,
20500,
19500,
28500,
31900,
12500,
14000,
21500,
@ -116,25 +80,7 @@
24450,
25250,
33300,
4600,
5000,
5500,
6500,
7500,
8500,
9900,
22500,
14000,
21500,
8500,
9900,
12500,
14000,
21500,
23200,
24450,
25250,
7500
40715
],
rateData: []
}
@ -147,10 +93,7 @@
cdata: {
handler(newData) {
this.options = {
title: {
text: "",
},
tooltip: {
/*tooltip: {
trigger: "axis",
backgroundColor: "rgba(255,255,255,0.1)",
axisPointer: {
@ -160,9 +103,47 @@
backgroundColor: "#7B7DDC"
}
}
},*/
tooltip: {
trigger: 'axis', //触发类型轴触发axis则鼠标hover到一条柱状图显示全部数据item则鼠标hover到折线点显示相应数据
axisPointer: { //坐标轴指示器坐标轴触发有效
type: 'cross', //默认为lineline直线cross十字准星shadow阴影
crossStyle: {
color: '#fff'
}
}
},
/*tooltip: {
trigger: 'item',
formatter: function (params) {
debugger;
console.log(params);
let color = params.color;//图例颜色
let htmlStr = '<div>';
htmlStr += params.name + '<br/>';
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
htmlStr += params.seriesName + '' + params.value + '%';
htmlStr += '</div>';
return htmlStr;
}
},
tooltip: {
//shared: true,
crosshairs: true,
valueSuffix: yAxisSuffix,
useHTML: true,
formatter: function() {
return "<div style='width:300px;word-wrap:break-word;white-space:normal;'>"
+"<b>录入时间: "+tipsbean[0][this.series.data.indexOf(this.point)].medDate+"</b><br/>"
+tipsbean[1][this.series.data.indexOf(this.point)].itemName+":"+tipsbean[1][this.series.data.indexOf(this.point)].medResult+"<br/>"
+tipsbean[2][this.series.data.indexOf(this.point)].itemName+":"+tipsbean[2][this.series.data.indexOf(this.point)].medResult+"<br/>"
+tipsbean[3][this.series.data.indexOf(this.point)].itemName+":"+tipsbean[3][this.series.data.indexOf(this.point)].medResult+"<br/>"
+tipsbean[0][this.series.data.indexOf(this.point)].itemName+":"+tipsbean[0][this.series.data.indexOf(this.point)].medResult+"<br/>"
+"</div>";
}
},*/
legend: {
data: ["已贯通", "计划贯通", "贯通率"],
data: ["完成", "计划完成"],
textStyle: {
color: "#B4B4B4"
},
@ -184,21 +165,10 @@
show: false
}
},
yAxis: [
{
splitLine: {show: false},
axisLine: {
lineStyle: {
color: "#B4B4B4"
}
yAxis:{
splitLine: {
show: false
},
axisLabel: {
formatter: "{value} "
}
},
{
splitLine: {show: false},
axisLine: {
lineStyle: {
color: "#B4B4B4"
@ -207,26 +177,10 @@
axisLabel: {
formatter: "{value} "
}
}
],
},
series: [
{
name: "贯通率",
type: "line",
smooth: true,
showAllSymbol: true,
symbol: "emptyCircle",
symbolSize: 8,
yAxisIndex: 1,
itemStyle: {
normal: {
color: "#F02FC2"
}
},
data: newData.rateData
},
{
name: "已贯通",
name: "已完成",
type: "bar",
barWidth: 10,
itemStyle: {
@ -241,7 +195,7 @@
data: newData.barData
},
{
name: "计划贯通",
name: "计划完成",
type: "bar",
barGap: "-100%",
barWidth: 10,
@ -256,7 +210,7 @@
}
},
z: -12,
data: newData.lineData
data: newData.planData
}
]
}
@ -269,7 +223,7 @@
// 根据自己的业务情况修改
setData() {
for (let i = 0; i < this.cdata.barData.length - 1; i++) {
let rate = this.cdata.barData[i] / this.cdata.lineData[i];
let rate = this.cdata.barData[i] / this.cdata.planData[i];
this.cdata.rateData.push(rate.toFixed(2));
}
},

View File

@ -6,367 +6,81 @@
<el-icon class="el-icon-s-marketing"></el-icon>
</span>
<div class="d-flex">
<span class="fs-xl text mx-2">工单修复以及满意度统计图</span>
<span class="fs-xl text mx-2">企业咨询</span>
<div class="decoration2">
<dv-decoration-2 :reverse="true" style="width:5px;height:6rem;" />
</div>
</div>
</div>
<div>
<Echart
:options="options"
id="centreLeft1Chart"
height="480px"
width="100%"
></Echart>
<div class="d-flex jc-center body-box">
<dv-scroll-board class="dv-scr-board" :config="config" />
</div>
</div>
</div>
</div>
</template>
<script>
import Echart from '@/components/echart'
export default {
data () {
return {
drawTiming: null,
cdata: {
year: null,
weekCategory: [],
radarData: [],
radarDataAvg: [],
maxData: 12000,
weekMaxData: [],
weekLineData: []
},
options: {},
// 定义颜色
colorList: {
linearYtoG: {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [
{
offset: 0,
color: "#f5b44d"
},
{
offset: 1,
color: "#28f8de"
}
]
},
linearGtoB: {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{
offset: 0,
color: "#43dfa2"
},
{
offset: 1,
color: "#28f8de"
}
]
},
linearBtoG: {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{
offset: 0,
color: "#1c98e8"
},
{
offset: 1,
color: "#28f8de"
}
]
},
areaBtoG: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(35,184,210,.2)"
},
{
offset: 1,
color: "rgba(35,184,210,0)"
}
]
cdata:{},
config: {
header: ['消息', '发布时间'],
data: [
['张思', '2022-03-05'],
['李森', '2022-03-05'],
['王师', '2022-03-05'],
['赵迪', '2022-03-05'],
['孟津', '2022-03-05'],
['张思', '2022-03-05'],
['李森', '2022-03-05'],
['王师', '2022-03-05'],
['赵迪', '2022-03-05'],
['孟津', '2022-03-05'],
['孙东课', '2022-03-05'],
['周神秘', '2022-03-05'],
['吴老弟', '2022-03-05'],
['郑成功', '2022-03-05'],
['冯宝宝', '2022-03-05']
],
rowNum: 15, //表格行数
headerHeight: 40,
headerBGC: '#0f1325', //表头
oddRowBGC: '#0f1325', //奇数行
evenRowBGC: '#171c33', //偶数行
index: false,
// columnWidth: [50],
align: ['center']
}
}
}
},
components: {
Echart
},
watch: {
cdata: {
handler (newData) {
this.options = {
title: {
text: "",
textStyle: {
color: "#D3D6DD",
fontSize: 24,
fontWeight: "normal"
},
subtext: newData.year + "/" + newData.weekCategory[6],
subtextStyle: {
color: "#fff",
fontSize: 16
},
top: 50,
left: 80
},
legend: {
top: 120,
left: 80,
orient: "vertical",
itemGap: 15,
itemWidth: 12,
itemHeight: 12,
data: ["平均指标", "我的指标"],
textStyle: {
color: "#fff",
fontSize: 14
}
},
tooltip: {
trigger: "item"
},
radar: {
center: ["68%", "27%"],
radius: "40%",
name: {
color: "#fff"
},
splitNumber: 8,
axisLine: {
lineStyle: {
color: this.colorList.linearYtoG,
opacity: 0.6
}
},
splitLine: {
lineStyle: {
color: this.colorList.linearYtoG,
opacity: 0.6
}
},
splitArea: {
areaStyle: {
color: "#fff",
opacity: 0.1,
shadowBlur: 25,
shadowColor: "#000",
shadowOffsetX: 0,
shadowOffsetY: 5
}
},
indicator: [
{
name: "服务态度",
max: newData.maxData
},
{
name: "产品质量",
max: 10
},
{
name: "任务效率",
max: 12
},
{
name: "售后保障",
max: 3.5
}
]
},
grid: {
left: 90,
right: 80,
bottom: 40,
top: "60%"
},
xAxis: {
type: "category",
position: "bottom",
axisLine: true,
axisLabel: {
color: "rgba(255,255,255,.8)",
fontSize: 12
},
data: newData.weekCategory
},
// 下方Y轴
yAxis: {
name: "工单",
nameLocation: "end",
nameGap: 24,
nameTextStyle: {
color: "rgba(255,255,255,.5)",
fontSize: 14
},
max: newData.maxData,
splitNumber: 4,
axisLine: {
lineStyle: {
opacity: 0
}
},
splitLine: {
show: true,
lineStyle: {
color: "#fff",
opacity: 0.1
}
},
axisLabel: {
color: "rgba(255,255,255,.8)",
fontSize: 12
}
},
series: [
{
name: "",
type: "radar",
symbolSize: 0,
handler () {
this.config = {
header: ['消息', '发布时间'],
data: [
{
value: newData.radarDataAvg[6],
name: "平均指标",
itemStyle: {
normal: {
color: "#f8d351"
}
},
lineStyle: {
normal: {
opacity: 0
}
},
areaStyle: {
normal: {
color: "#f8d351",
shadowBlur: 25,
shadowColor: "rgba(248,211,81,.3)",
shadowOffsetX: 0,
shadowOffsetY: -10,
opacity: 1
}
}
},
{
value: newData.radarData[6],
name: "我的指标",
itemStyle: {
normal: {
color: "#43dfa2"
}
},
lineStyle: {
normal: {
opacity: 0
}
},
areaStyle: {
normal: {
color: this.colorList.linearGtoB,
shadowBlur: 15,
shadowColor: "rgba(0,0,0,.2)",
shadowOffsetX: 0,
shadowOffsetY: 5,
opacity: 0.8
}
}
}
]
},
{
name: "",
type: "line",
smooth: true,
symbol: "emptyCircle",
symbolSize: 8,
itemStyle: {
normal: {
color: "#fff"
}
},
lineStyle: {
normal: {
color: this.colorList.linearBtoG,
width: 3
}
},
areaStyle: {
normal: {
color: this.colorList.areaBtoG
}
},
data: newData.weekLineData,
lineSmooth: true,
markLine: {
silent: true,
data: [
{
type: "average",
name: "平均值"
}
['张思', '2022-03-05'],
['李森', '2022-03-05'],
['王师', '2022-03-05'],
['赵迪', '2022-03-05'],
['孟津', '2022-03-05'],
['孙东课', '2022-03-05'],
['周神秘', '2022-03-05'],
['吴老弟', '2022-03-05'],
['郑成功', '2022-03-05'],
['冯宝宝', '2022-03-05']
],
precision: 0,
label: {
normal: {
formatter: "平均值: \n {c}"
}
},
lineStyle: {
normal: {
color: "rgba(248,211,81,.7)"
}
}
},
tooltip: {
position: "top",
formatter: "{c} m",
backgroundColor: "rgba(28,152,232,.2)",
padding: 6
}
},
{
name: "占位背景",
type: "bar",
itemStyle: {
normal: {
show: true,
color: "#000",
opacity: 0
}
},
silent: true,
barWidth: "50%",
data: newData.weekMaxData,
animation: false
}
]
rowNum: 15, //表格行数
headerHeight: 40,
headerBGC: '#0f1325', //表头
oddRowBGC: '#0f1325', //奇数行
evenRowBGC: '#171c33', //偶数行
index: false,
// columnWidth: [50],
align: ['center']
}
},
immediate: true,
@ -384,51 +98,42 @@ export default {
this.setData();
this.drawTiming = setInterval(() => {
this.setData();
}, 6000);
}, 3600000);
},
setData () {
// 清空轮询数据
this.cdata.weekCategory = [];
this.cdata.weekMaxData = [];
this.cdata.weekLineData = [];
this.cdata.radarData = [];
this.cdata.radarDataAvg = [];
let dateBase = new Date();
this.cdata.year = dateBase.getFullYear();
// 周数据
for (let i = 0; i < 7; i++) {
// 日期
let date = new Date();
this.cdata.weekCategory.unshift([date.getMonth() + 1, date.getDate()-i].join("/"));
// 折线图数据
this.cdata.weekMaxData.push(this.cdata.maxData);
let distance = Math.round(Math.random() * 11000 + 500);
this.cdata.weekLineData.push(distance);
// 雷达图数据
// 我的指标
let averageSpeed = +(Math.random() * 5 + 3).toFixed(3);
let maxSpeed = averageSpeed + +(Math.random() * 3).toFixed(2);
let hour = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayData = [distance, averageSpeed, maxSpeed, hour];
this.cdata.radarData.unshift(radarDayData);
// 平均指标
let distanceAvg = Math.round(Math.random() * 8000 + 4000);
let averageSpeedAvg = +(Math.random() * 4 + 4).toFixed(3);
let maxSpeedAvg = averageSpeedAvg + +(Math.random() * 2).toFixed(2);
let hourAvg = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayDataAvg = [
distanceAvg,
averageSpeedAvg,
maxSpeedAvg,
hourAvg
];
this.cdata.radarDataAvg.unshift(radarDayDataAvg);
this.config = {
header: ['消息', '发布时间'],
data: [
['张思', '2022-03-05'],
['李森', '2022-03-05'],
['王师', '2022-03-05'],
['赵迪', '2022-03-05'],
['孟津', '2022-03-05'],
['张思', '2022-03-05'],
['李森', '2022-03-05'],
['王师', '2022-03-05'],
['赵迪', '2022-03-05'],
['孟津', '2022-03-05'],
['孙东课', '2022-03-05'],
['周神秘', '2022-03-05'],
['吴老弟', '2022-03-05'],
['郑成功', '2022-03-05'],
['冯宝宝', '2022-03-05'],
['孙东课', '2022-03-05'],
['周神秘', '2022-03-05'],
['吴老弟', '2022-03-05'],
['郑成功', '2022-03-05'],
['冯宝宝', '2022-03-05']
],
rowNum: 15, //表格行数
headerHeight: 35,
headerBGC: '#0f1325', //表头
oddRowBGC: '#0f1325', //奇数行
evenRowBGC: '#171c33', //偶数行
index: false,
// columnWidth: [50],
align: ['center']
}
}
}
};
@ -438,17 +143,29 @@ export default {
$box-height: 520px;
$box-width: 100%;
#bottomRight {
padding: 14px 16px;
padding: 25px;
height: $box-height;
width: $box-width;
border-radius: 5px;
.bg-color-black {
height: $box-height - 30px;
height: $box-height - 50px;
border-radius: 10px;
}
.text {
color: #c3cbde;
}
.body-box {
border-radius: 10px;
overflow: hidden;
.dv-scr-board {
width: 100%;
height: 440px;
}
}
//下滑线动态
.decoration2 {
position: absolute;
@ -456,8 +173,12 @@ $box-width: 100%;
}
.chart-box {
margin-top: 16px;
width: 170px;
height: 170px;
/*width: 170px;*/
/*height: 170px;*/
.dv-scr-board {
width: 100%;
height: 340px;
}
.active-ring-name {
padding-top: 10px;
}

View File

@ -20,12 +20,12 @@
<span>
<el-icon class="el-icon-pie-chart"></el-icon>
</span>
<span class="fs-xl text mx-2 mb-1 pl-3">年度负责人组件达标榜</span>
<span class="fs-xl text mx-2 mb-1 pl-3">任务完成进度</span>
<dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" />
</div>
<div class="percent">
<div class="item bg-color-black">
<span>今日任务通过</span>
<span>本月产品合格</span>
<CenterChart
:id="rate[0].id"
:tips="rate[0].tips"
@ -33,7 +33,7 @@
/>
</div>
<div class="item bg-color-black">
<span>今日任务达标</span>
<span>本月任务完成</span>
<CenterChart
:id="rate[1].id"
:tips="rate[1].tips"
@ -56,7 +56,7 @@ export default {
return {
titleItem: [
{
title: '今年累计合同数',
title: '本月合同数',
number: {
number: [12],//数字数值
toFixed: 0,//小数位数
@ -68,7 +68,7 @@ export default {
}
},
{
title: '本月累计订单数',
title: '本月生产订单数',
number: {
number: [12],
toFixed: 0,
@ -80,7 +80,7 @@ export default {
}
},
{
title: '今日在制任务数',
title: '本月在制任务数',
number: {
number: [2],
toFixed: 0,
@ -92,10 +92,10 @@ export default {
}
},
{
title: '本月累计交付产品数',
title: '本月交付产品数',
number: {
number: [8],
toFixed: 1,
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
@ -104,9 +104,21 @@ export default {
}
},
{
title: '今年成品合格率',
title: '本月不合格产品数',
number: {
number: [96],
number: [2],
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 26
}
}
},
{
title: '本月军检合格率',
number: {
number: [99],
toFixed: 1,
textAlign: 'left',
content: '{nt}%',
@ -115,18 +127,6 @@ export default {
}
}
},
{
title: '今年累计不合格产品数',
number: {
number: [2],
toFixed: 0,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 26
}
}
}
],
ranking: {
data: [
@ -172,7 +172,7 @@ export default {
rate: [
{
id: 'centerRate1',
tips: 60,
tips: 98,
colorData: {
textStyle: '#3fc0fb',
series: {
@ -186,7 +186,7 @@ export default {
},
{
id: 'centerRate2',
tips: 40,
tips: 99,
colorData: {
textStyle: '#67e0e3',
series: {

View File

@ -6,7 +6,7 @@
<el-icon class="el-icon-s-help"></el-icon>
</span>
<div class="d-flex">
<span class="fs-xl text mx-2">任务通过率</span>
<span class="fs-xl text mx-2">一车间</span>
<dv-decoration-3 class="dv-dec-3"/>
</div>
</div>
@ -56,7 +56,7 @@
fontSize: 24
}
},
text: '今日构建总'
text: '今日'
},
{
number: {
@ -68,7 +68,7 @@
fontSize: 24
}
},
text: '总共完成数'
text: '年累计完成'
},
{
number: {
@ -80,11 +80,11 @@
fontSize: 24
}
},
text: '正在编译数量'
text: '在制品数量'
},
{
number: {
number: [157],
number: [361],
toFixed: 1,
textAlign: 'left',
content: '{nt}',
@ -92,18 +92,16 @@
fontSize: 24
}
},
text: '未通过数量'
}
text: '不合格数量'
},
],
cdata: {
xData: ["data1", "data2", "data3", "data4", "data5", "data6"],
xData: ["冷加工", "热弯", "化学钢化"],
seriesData: [
{value: 10, name: "data1"},
{value: 5, name: "data2"},
{value: 15, name: "data3"},
{value: 25, name: "data4"},
{value: 20, name: "data5"},
{value: 35, name: "data6"}
{value: 25, name: "冷加工"},
{value: 20, name: "热弯"},
{value: 35, name: "化学钢化"}
]
}
}
@ -119,12 +117,11 @@
handler(newData) {
this.options = {
color: [
"#37a2da",
"#32c5e9",
"#9fe6b8",
"#ffdb5c",
"#ff9f7f",
"#fb7293",
"#ffdb5c",
"#9fe6b8",
"#ff9f7f",
"#32c5e9",
"#e7bcf3",
"#8378ea"
],

View File

@ -0,0 +1,237 @@
<template>
<div id="centerLeft1">
<div class="bg-color-black">
<div class="d-flex pt-2 pl-2">
<span>
<el-icon class="el-icon-s-help"></el-icon>
</span>
<div class="d-flex">
<span class="fs-xl text mx-2">二车间</span>
<dv-decoration-3 class="dv-dec-3"/>
</div>
</div>
<div class="d-flex jc-center">
<Echart
:options="options"
id="centreLeft1Chart"
height="220px"
width="260px"
></Echart>
</div>
<!-- 4个主要的数据 -->
<div class="bottom-data">
<div
class="item-box mt-2"
v-for="(item, index) in numberData"
:key="index"
>
<div class="d-flex">
<!--<span class="coin"></span>-->
<dv-digital-flop class="dv-digital-flop" :config="item.number"/>
</div>
<p class="text" style="text-align: center;">
{{ item.text }}
<span class="colorYellow">()</span>
</p>
</div>
</div>
</div>
</div>
</template>
<script>
import Echart from '@/components/echart'
export default {
data() {
return {
options: {},
numberData: [
{
number: {
number: [15],
toFixed: 1,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 24
}
},
text: '今日产量'
},
{
number: {
number: [1144],
toFixed: 1,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 24
}
},
text: '年累计完成量'
},
{
number: {
number: [361],
toFixed: 1,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 24
}
},
text: '在制品数量'
},
{
number: {
number: [361],
toFixed: 1,
textAlign: 'left',
content: '{nt}',
style: {
fontSize: 24
}
},
text: '不合格数量'
},
],
cdata: {
xData: ["镀膜", "夹层", "包边", "装框"],
seriesData: [
{value: 10, name: "镀膜"},
{value: 5, name: "夹层"},
{value: 15, name: "包边"},
{value: 25, name: "装框"}
]
}
}
},
components: {
Echart
},
mounted() {
this.changeTiming()
},
watch: {
cdata: {
handler(newData) {
this.options = {
color: [
"#fb7293",
"#ffdb5c",
"#9fe6b8",
"#ff9f7f",
"#32c5e9",
],
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
toolbox: {
show: true
},
calculable: true,
legend: {
orient: "horizontal",
icon: "circle",
bottom: 0,
x: "center",
data: newData.xData,
textStyle: {
color: "#fff"
}
},
series: [
{
name: "通过率统计",
type: "pie",
radius: [10, 50],
roseType: "area",
center: ["50%", "40%"],
data: newData.seriesData
}
]
}
},
immediate: true,
deep: true
}
},
methods: {
changeTiming() {
setInterval(() => {
this.changeNumber()
}, 3000)
},
changeNumber() {
this.numberData.forEach((item, index) => {
item.number.number[0] += ++index
item.number = {...item.number}
})
}
}
}
</script>
<style lang="scss" scoped>
$box-width: 300px;
$box-height: 410px;
#centerLeft1 {
padding: 16px;
height: $box-height;
width: 100%;
border-radius: 10px;
.bg-color-black {
height: $box-height - 30px;
border-radius: 10px;
}
.text {
color: #c3cbde;
}
.dv-dec-3 {
position: relative;
width: 100px;
height: 20px;
top: -3px;
}
.bottom-data {
.item-box {
& > div {
padding-right: 5px;
}
font-size: 14px;
float: right;
position: relative;
width: 50%;
color: #d3d6dd;
.dv-digital-flop {
width: 120px;
height: 30px;
}
// 金币
.coin {
position: relative;
top: 6px;
font-size: 20px;
color: #ffc107;
}
.colorYellow {
color: yellowgreen;
}
p {
text-align: center;
}
}
}
}
</style>

View File

@ -20,26 +20,26 @@ export default {
data() {
return {
config: {
header: ['姓名', '部门', '到岗'],
header: ['姓名', '部门', '到岗情况'],
data: [
['组件1', 'dev-1', "<span class='colorGrass'>已到岗</span>"],
['组件2', 'dev-2', "<span class='colorRed'>未到岗</span>"],
['组件3', 'dev-3', "<span class='colorGrass'>已到岗</span>"],
['组件4', 'rea-1', "<span class='colorGrass'>已到岗</span>"],
['组件5', 'rea-2', "<span class='colorGrass'>已到岗</span>"],
['组件6', 'fix-2', "<span class='colorGrass'>已到岗</span>"],
['组件7', 'fix-4', "<span class='colorGrass'>已到岗</span>"],
['组件8', 'fix-7', "<span class='colorRed'>未到岗</span>"],
['组件9', 'dev-2', "<span class='colorRed'>未到岗</span>"],
['组件10', 'dev-9', "<span class='colorGrass'>已到岗</span>"]
['张思', '一车间', "<span class='colorGrass'>已到岗</span>"],
['李森', '一车间', "<span class='colorGrass'>已到岗</span>"],
['王师', '一车间', "<span class='colorRed'>未到岗</span>"],
['赵迪', '一车间', "<span class='colorGrass'>已到岗</span>"],
['孟津', '一车间', "<span class='colorGrass'>已到岗</span>"],
['孙东课', '一车间', "<span class='colorGrass'>已到岗</span>"],
['周神秘', '二车间', "<span class='colorGrass'>已到岗</span>"],
['吴老弟', '二车间', "<span class='colorRed'>未到岗</span>"],
['郑成功', '二车间', "<span class='colorGrass'>已到岗</span>"],
['冯宝宝', '二车间', "<span class='colorGrass'>已到岗</span>"]
],
rowNum: 7, //表格行数
headerHeight: 35,
headerBGC: '#0f1325', //表头
oddRowBGC: '#0f1325', //奇数行
evenRowBGC: '#171c33', //偶数行
index: true,
columnWidth: [50],
index: false,
// columnWidth: [50],
align: ['center']
}
}

View File

@ -5,7 +5,7 @@
<span>
<el-icon class="el-icon-menu"></el-icon>
</span>
<span class="fs-xl text mx-2">产品销售渠道分析</span>
<span class="fs-xl text mx-2">工序成品率</span>
</div>
<div class="d-flex ai-center flex-column body-box heightCover">
<dv-capsule-chart class="dv-cap-chart" :config="config" />

View File

@ -30,44 +30,43 @@
<div class="d-flex aside-width">
<div class="react-left ml-4 react-l-s">
<span class="react-before"></span>
<span class="text">数据分析1</span>
<span class="text">数据统计</span>
</div>
<div class="react-right ml-3">
<span class="text">数据分析2</span>
<!--<span class="text">数据分析2</span>-->
</div>
</div>
<div class="d-flex aside-width">
<div class="react-right bg-color-blue mr-3">
<span class="text fw-b">车间详情展示</span>
<span class="text fw-b">车间详情</span>
</div>
<div class="react-right mr-4 react-l-s">
<span class="react-after"></span>
<span class="text"
>{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span
>
<span class="text">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
</div>
</div>
</div>
<div class="body-box">
<!-- 第三行数据 -->
<div id="centerWrap" class="content-box">
<!-- 中间 -->
<!-- 数据统计 -->
<div>
<center />
</div>
<div>
<dv-border-box-1>
<centerLeft1 />
</dv-border-box-1>
</div>
<div>
<dv-border-box-1>
<centerLeft1 />
</dv-border-box-1>
</div>
<div>
<centerRight2 />
</div>
<div>
<dv-border-box-1>
<centerLeft1 />
</dv-border-box-1>
</div>
<div>
<dv-border-box-1>
<centerLeft2 />
</dv-border-box-1>
</div>
<div>
<dv-border-box-13>
<centerRight1 />
@ -93,6 +92,7 @@
import drawMixin from "../../utils/drawMixin";
import { formatTimeBigScreen } from '../../utils/index.js'
import centerLeft1 from './centerLeft1'
import centerLeft2 from './centerLeft2'
import centerRight1 from './centerRight1'
import centerRight2 from './centerRight2'
import center from './center'
@ -115,6 +115,7 @@
},
components: {
centerLeft1,
centerLeft2,
centerRight1,
centerRight2,
center,
@ -122,8 +123,8 @@
bottomRight
},
created(){
window.open('http://49.232.14.174:2222/#/index');
this.$router.go(-1)
// window.open('http://49.232.14.174:2222/#/index');
// this.$router.go(-1)
},
mounted() {
this.timeFn();

View File

@ -2,7 +2,8 @@
<div class="dashboard-container">
<div class="dashboardTopCard">
<div class="CardTitleWrap">
<span class="verticalLine"></span><span class="dashboardCardTitle">数据统计</span>
<span class="verticalLine"></span>
<span class="dashboardCardTitle">数据统计</span>
</div>
<div style="padding: 20px;overflow: hidden;">
<div class="cardsWrap" @click="toDetail('1')">
@ -38,7 +39,6 @@
<div class="cardsWrap" @click="toDetail('3')">
<div class="svgIconWrap">
<el-icon class="el-icon-s-operation svgIcon"></el-icon>
<!--<svg-icon class="svgIcon" icon-class="productionTask" :className="'svgIcon'"/>-->
</div>
<div class="totalCountWrap">
<span class="totalCountText">本月在制任务</span>
@ -51,7 +51,6 @@
<div class="cardsWrap" @click="toDetail('4')">
<div class="svgIconWrap">
<el-icon class="el-icon-s-claim svgIcon"></el-icon>
<!--<svg-icon icon-class="product" class="svgIcon" :className="'svgIcon'"/>-->
</div>
<div class="totalCountWrap">
<span class="totalCountText">本月交付产品</span>
@ -64,7 +63,6 @@
<div class="cardsWrap" @click="toDetail('5')">
<div class="svgIconWrap">
<el-icon class="el-icon-error svgIcon"></el-icon>
<!--<svg-icon icon-class="unqualified" class="svgIcon" :className="'svgIcon'"/>-->
</div>
<div class="totalCountWrap">
<span class="totalCountText">本月不合格产品</span>
@ -137,10 +135,11 @@
</div>
<div class="dashboardCardPadding">
<el-table
small
v-loading="listLoadingEm"
small
:data="equipmentList"
fit stripe
fit
stripe
size="mini"
:height="cardTabelHeight"
pager-count="3"
@ -179,14 +178,6 @@
</div>
</template>
</el-table-column>
<!-- <el-table-column label="下次校准日期" prop="model">
<template slot-scope="scope">
<el-tag v-if="scope.row.next_check_date" :type="setClass(scope.row.next_check_date)">
{{scope.row.next_check_date}}
</el-tag>
<div v-else></div>
</template>
</el-table-column>-->
</el-table>
</div>
</div>
@ -221,7 +212,8 @@
<el-table
v-loading="listLoadingUser"
:data="userList"
fit stripe
fit
stripe
size="mini"
:height="cardTabelHeight"
style="border-top: 1px solid #f5f5f5;"
@ -298,7 +290,7 @@
@mouseleave="Up()">
<li class="listItem" v-for="(item,$index) in warningList" :key="$index">
<div class="itemText">
<span>{{item.name}}({{item.number}})</span><span>{{item.delivery_date}}到期</span>
<span>{{item.name}}({{item.unit}})</span><span>{{item.expiration_date}}到期</span>
</div>
</li>
</ul>
@ -322,7 +314,7 @@
<li class="listItem" v-for="(item,$index) in warningList" :key="$index"
:class="{nearStatus:item.warningType===1,outStatus:item.warningType===2}">
<div class="itemText">
<span>{{item.name}}({{item.number}})</span>
<span>{{item.name}}{{item.number}}</span>
<span v-if="item.warningType===1">接近计划日期</span>
<span v-else>已过计划日期</span>
</div>
@ -339,7 +331,6 @@
<script>
import echarts from 'echarts'
import {mapGetters} from 'vuex';
// import {getUserList} from "@/api/user";
import {getEmployee} from "@/api/hrm";
import {getMaterialList} from "@/api/mtm";
import {getProductionplanList} from "@/api/pm";
@ -360,6 +351,7 @@
animateUser: false,
chartColumn: null,
week: null,
nowHour: null,//当前时间的小时数
currentTime: null,
currentYear: null,
currentMonth: null,
@ -459,9 +451,11 @@
}
return obj;
},
getNoticeData() {
this.ScrollUp();
},
ScrollUp() {
let that = this;
that.intNum = setInterval(() => {
@ -475,13 +469,16 @@
}
}, 3000);
},
//鼠标移上去停止
Stop() {
clearInterval(this.intNum);
},
Up() {
this.ScrollUp();
},
getStatisticsData() {
let that = this;
let dat = new Date();
@ -558,6 +555,7 @@
}
});
},
//设备列表
getEquipmentList() {
let that = this;
@ -571,6 +569,7 @@
that.listLoadingEm = false;
});
},
//设备分页跳转
handleEquipmentCurrentChange(val) {
let that = this;
@ -584,6 +583,7 @@
that.listLoadingEm = false;
});
},
//用户列表
getUserList() {
let that = this;
@ -598,12 +598,17 @@
that.listLoadingUser = false;
});
},
//用户分页跳转
handleUserCurrentChange(val) {
let that = this;
that.listLoadingUser = true;
that.userPage = val;
getEmployee({page: val, page_size: that.userPageSize, fields: 'id,name,dept_name,is_atwork'}).then((response) => {
getEmployee({
page: val,
page_size: that.userPageSize,
fields: 'id,name,dept_name,is_atwork'
}).then((response) => {
if (response.data) {
that.userList = response.data.results;
that.userTotal = response.data.count;
@ -612,6 +617,7 @@
that.listLoadingUser = false;
});
},
userScroll() {
let that = this;
that.intNumUser = setInterval(() => {
@ -623,13 +629,16 @@
}, 3000)
}, 3000);
},
//鼠标移上去停止
stopScroll() {
clearInterval(this.intNumUser);
},
toScroll() {
this.userScroll();
},
//去往工作流页面
gotoTicketPage() {
let path = this.$route.path;
@ -639,6 +648,7 @@
this.$router.push({name: 'ticket', params: {}})
}
},
//图标渲染
drawChart() {
let that = this;
@ -720,34 +730,6 @@
offset: 1,
color: '#409EFF'
}]),
/*color: function(params) {
let colorList = [
['#5fcdc2','#ffffff'],
['#FFA783','#ffffff'],
['#D099FF','#ffffff'],
['#83FFC0','#ffffff'],
['#FF83D8','#ffffff'],
['#FFE899','#ffffff'],
['#83FFE9','#ffffff'],
];
let colorItem = colorList[params.dataIndex];
return new echarts.graphic.LinearGradient(0,1,0,0,[
{
color: colorItem[0]
},
{
color: colorItem[1]
}
]);
},*/
/*color: function(params) {
let colorList = [
'#5fcdc2','#a378e4','#fea94c','#f27197',
'#409eff','#5fcdc2','#a378e4','#fea94c'
];
return colorList[params.dataIndex]
},*/
}
},
}]
@ -762,11 +744,12 @@
} else if (index === '3') {
this.$router.push({name: 'management', params: {page: 1, page_size: 20}})
} else if (index === '4') {
this.$router.push({name: 'product'})
this.$router.push({name: 'sales'})
} else if (index === '5') {
this.$router.push({name: 'unproduct'})
}
},
//选择月份
searchTimeChange(index) {
let that = this;
@ -796,6 +779,7 @@
});
}
},
//提示
activeNameClick() {
let that = this;
@ -818,7 +802,17 @@
} else if (that.activeName === '过期提醒') {
getmaterialbatchList({page: 1, page_size: that.warningPageSize, tag: 'expired'}).then((response) => {
if (response.data) {
that.warningList = response.data.results;
let warningList = response.data.results;
let arr = [];
warningList.forEach(item => {
let obj = new Object();
obj.name = item.material_.name;
obj.unit = item.material_.unit;
obj.id = item.id;
obj.expiration_date = item.expiration_date;
arr.push(obj)
});
that.warningList = arr;
that.warningTotal = response.data.count;
}
});
@ -886,10 +880,12 @@
});
}
},
handleWarningSizeChange(val) {
this.warningPageSize = val;
this.warningPage = 1;
},
handleWarningCurrentChange(val) {
let that = this;
that.warningPage = val;
@ -916,6 +912,7 @@
});
}
},
getGanttData() {
let that = this;
getPlanGantt({}).then(res => {
@ -934,6 +931,7 @@
obj.endTime = endTime;
obj.planTime = [startTime, endTime];
obj.per = item.count;
obj.per1 = item.count_ok;
obj.type = 1;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
@ -957,7 +955,7 @@
objChild.endTime = end;
objChild.planTime = [start, end];
objChild.per = child.count;
objChild.per1 = child.count_real;
objChild.per1 = child.count_ok;
objChild.type = 1;
objChild.productName = child.product_.name;
objChild.productNum = child.product_.specification;
@ -973,7 +971,7 @@
obj.endTime = endTime;
obj.planTime = [startTime, endTime];
obj.per = item.count;
obj.per1 = item.count_real;
obj.per1 = item.count_ok;
obj.type = 3;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
@ -988,6 +986,7 @@
}
})
},
refreshBottomTabel(index) {
if (index === '1') {//生产设备
this.getEquipmentList();//设备列表
@ -996,29 +995,37 @@
} else {//提醒
this.activeNameClick();
}
},
refreshDataFrequently() {
let that = this;
let hasToken = getToken();
if (hasToken) {
this.timer = window.setInterval(() => {
setTimeout(() => {
if (hasToken) {
if (that.nowHour > 7 && that.nowHour < 10) {
that.getUserList();//用户列表
that.getEquipmentList();//设备列表
that.getGanttData();//甘特图数据
that.getStatisticsData();//统计数据
that.getNoticeData();//提醒列表
} else {
that.refreshDataSlowly();
}
}, 0)
}, 120000)//2分钟
}
},
refreshDataSlowly() {
let that = this;
let hasToken = getToken();
if (hasToken) {
this.timer = window.setInterval(() => {
setTimeout(() => {
if (hasToken) {
if (that.nowHour > 7 && that.nowHour < 10) {
that.refreshDataFrequently();
} else {
that.getUserList();//用户列表
that.getEquipmentList();//设备列表
that.getGanttData();//甘特图数据
@ -1027,6 +1034,7 @@
}
}, 0)
}, 3600000)//1小时1000*10*60
}
},
},
mounted() {
@ -1041,9 +1049,9 @@
this.getGanttData();//甘特图数据
this.getStatisticsData();//统计数据
this.getNoticeData();//提醒列表
// this.refreshCountData();
let nowDate = new Date();
let nowHour = nowDate.getHours();
this.nowHour = nowHour;
if (nowHour > 7 && nowHour < 10) {
this.refreshDataFrequently();
} else {
@ -1060,9 +1068,11 @@
.el-card.is-always-shadow {
height: auto !important;
}
.dashboard-container {
margin: 5px 6px;
}
.dashboardTopCard, .dashboardMiddle, .dashboardBottomRow {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
@ -1072,13 +1082,16 @@
overflow: hidden;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
}
.dashboardBottomRow {
margin-bottom: 0;
}
.dashboardCardPadding {
overflow: hidden;
padding: 5px 20px 20px 20px;
}
/**/
.cardsWrap {
display: flex;
@ -1087,70 +1100,86 @@
float: left;
font-size: 14px;
}
.svgIconWrap {
margin-right: 20px;
width: 50px;
height: 50px;
border-radius: 15px;
text-align: center;
.svgIcon {
font-size: 24px;
margin-top: 13px
}
}
.cardsWrap:nth-child(1) {
.svgIconWrap {
background: #e9f3ff;
.svgIcon {
color: #409EFF;
fill: #409EFF;
}
}
}
.cardsWrap:nth-child(2) {
.svgIconWrap {
background: #fff1de;
.svgIcon {
color: #ffb23f;
}
}
}
.cardsWrap:nth-child(3) {
.svgIconWrap {
background: #d9f6d8;
.svgIcon {
color: #54cb48;
}
}
}
.cardsWrap:nth-child(4) {
.svgIconWrap {
background: #f0e8fd;
.svgIcon {
color: #a378e4;
}
}
}
.cardsWrap:nth-child(5) {
.svgIconWrap {
background: #f7e5ea;
.svgIcon {
color: #f27197;
}
}
}
.totalCountText {
height: 20px;
line-height: 20px
}
.totalCountNum {
height: 30px;
}
.totalCount {
font-size: 25px;
font-weight: bold;
color: #626262;
}
/**/
.CardTitleWrap {
display: flex;
@ -1167,6 +1196,7 @@
margin-right: 7px;
margin-top: 8px;
}
.dashboardCardTitle {
height: 34px;
line-height: 34px;
@ -1176,6 +1206,7 @@
vertical-align: middle;
margin-right: 7px;
}
.stockMore {
font-size: 12px;
font-weight: normal;
@ -1183,14 +1214,17 @@
cursor: pointer;
}
}
/*成品率筛选条件*/
.dashboardCardHand {
display: flex;
padding-left: 1%;
justify-content: space-between;
border-bottom: 1px solid #f5f5f5;
.dashboardCardFilter {
display: flex;
.convenientWrap {
display: flex;
border: 1px solid #DCDFE6;
@ -1199,19 +1233,23 @@
line-height: 30px;
margin-left: 10px;
font-size: 12px;
.convenientBtn {
cursor: pointer;
width: 50px;
text-align: center;
border-right: 1px solid #DCDFE6;
}
.convenientBtn:last-child {
border-right: 0;
border-radius: 0 6px 6px 0;
}
.convenientBtn:first-child {
border-radius: 6px 0 0 6px;
}
.activeIndex {
color: #ffffff;
background: #409EFF;
@ -1219,16 +1257,19 @@
}
}
}
.refreshIcon {
color: #409EFF;
font-weight: bold;
font-size: 18px;
cursor: pointer;
}
.anim {
transition: all 0.5s;
margin-top: -35px; //高度等于行高
}
.lists {
height: 100%;
line-height: 35px;
@ -1236,28 +1277,35 @@
overflow-y: scroll;
padding-right: 40px;
margin: 0 !important;
.listItem {
height: 40px;
line-height: 40px;
font-size: 12px;
.itemText {
display: flex;
justify-content: space-between;
}
}
}
.nearStatus {
color: #e6a23c;
}
.outStatus {
color: #f56c6c;
}
#chartColumn > div {
height: 100% !important;
canvas {
height: 100% !important;
}
}
#dashboardMiddle .el-range-editor--medium.el-input__inner,
#dashboardMiddle .el-range-editor.el-input__inner {
height: 30px !important;

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
<el-button
v-if="checkPermission(['equipment_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增设备
</el-button>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
@ -17,17 +22,18 @@
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>
<el-table
@ -41,27 +47,19 @@
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="设备名称" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="设备名称" prop="name" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="设备编号" width="120">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="设备编号" prop="number" width="120">
</el-table-column>
<el-table-column label="型号规格" width="120">
<template slot-scope="scope">{{ scope.row.model }}</template>
<el-table-column label="型号规格" prop="model" width="120">
</el-table-column>
<el-table-column label="生产厂及国别" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.factory }}</template>
<el-table-column label="生产厂及国别" prop="factory" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="生产日期" width="120">
<template slot-scope="scope">{{ scope.row.production_date }}</template>
<el-table-column label="生产日期" prop="production_date" width="120">
</el-table-column>
<el-table-column label="购置日期" width="120">
<template slot-scope="scope">{{ scope.row.buy_date }}</template>
<el-table-column label="购置日期" prop="buy_date" width="120">
</el-table-column>
<el-table-column label="数量" width="120">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="数量" prop="count" width="120">
</el-table-column>
<el-table-column label="状态" width="120">
<template slot-scope="scope">
@ -93,16 +91,13 @@
<el-tag v-for="item in scope.row.step_"
:key="item.number"
:label="item.name"
:value="item.number">{{item.name}}</el-tag>
:value="item.number">{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
@ -110,19 +105,20 @@
fixed="right"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -200,7 +196,6 @@
</el-col>
</el-row>
<el-form-item label="状态" prop="state">
<el-select style="width: 100%" v-model="equipment.state" placeholder="请选择">
<el-option
v-for="item in options"
@ -211,7 +206,6 @@
</el-select>
</el-form-item>
<el-form-item label="技术指标" prop="parameter">
<el-input
type="textarea"
:rows="4"
@ -225,13 +219,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="所属部门" prop="belong_dept">
<el-cascader :options="depOptions" :props="{ checkStrictly: true,emitPath:false }" ref="demoCascader" style="width:100%" v-model="equipment.belong_dept"></el-cascader>
<el-cascader :options="depOptions" :props="{ checkStrictly: true,emitPath:false }" ref="demoCascader"
style="width:100%" v-model="equipment.belong_dept"></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保管人" prop="keeper">
<el-select
v-model="equipment.keeper"
filterable
@ -246,8 +239,6 @@
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -259,15 +250,6 @@
placeholder="设备备注"
/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -344,6 +326,7 @@ export default {
},
methods: {
checkPermission,
//设备列表
getList() {
this.listLoading = true;
@ -355,12 +338,14 @@ export default {
this.listLoading = false;
});
},
//组员列表
getUserList() {
getUserList({pageoff: true}).then((res) => {
this.keeperOptions = genTree(res.data);
});
},
//部门列表
getOrgList() {
getOrgList({pageoff: true}).then((res) => {
@ -368,11 +353,11 @@ export default {
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
@ -380,6 +365,7 @@ export default {
}
this.getList();
},
handleCreate() {
this.equipment = Object.assign({}, defaultequipment);
this.dialogType = "new";
@ -397,6 +383,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -409,7 +396,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
<el-button
v-if="checkPermission(['equipment_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增设备
</el-button>
<el-input
v-model="listQuery.search"
placeholder="检测设备名称/检测设备编号/备注"
@ -17,22 +22,23 @@
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>
<el-table
v-loading="listLoading"
:data="equipmentList.results"
border
fit
stripe
@ -43,11 +49,10 @@
<el-table-column label="设备编号" width="100">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="管理类别">
<template slot-scope="scope">{{
mgmtype_[scope.row.mgmtype]
}}</template>
<template slot-scope="scope">
{{mgmtype_[scope.row.mgmtype]}}
</template>
</el-table-column>
<el-table-column label="校/检方式" width="100">
<template slot-scope="scope">{{ waytype_[scope.row.way] }}</template>
@ -66,10 +71,9 @@
<el-tag v-if="scope.row.next_check_date" :type="setClass(scope.row.next_check_date)">
{{scope.row.next_check_date}}
</el-tag>
<div v-else></div></template
>
<div v-else></div>
</template>
</el-table-column>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
@ -88,18 +92,15 @@
<el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="保管人">
<template slot-scope="scope" v-if="scope.row.keeper_">{{
scope.row.keeper_.username
}}</template>
<template slot-scope="scope" v-if="scope.row.keeper_">
{{scope.row.keeper_.username}}
</template>
</el-table-column>
<el-table-column label="存放位置" width="100">
<template slot-scope="scope">{{ scope.row.place }}</template>
@ -111,28 +112,30 @@
:key="item.number"
:label="item.name"
:value="item.number"
>{{ item.name }}</el-tag
>
{{ item.name }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="120px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -183,7 +186,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="校/检状态" prop="state">
@ -298,11 +300,9 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="生产厂家" prop="factory">
<el-input v-model="equipment.factory" placeholder="生产厂商及国别"/>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input
type="textarea"
@ -393,8 +393,8 @@ export default {
],
state_: {
10: "合格",
40: "禁用",
50: "报废",
},
options: [
{
@ -404,6 +404,11 @@ export default {
{
value: 40,
label: "禁用",
}
,
{
value: 50,
label: "报废",
},
],
listQuery: {

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增校准或检定</el-button
<el-button
v-if="checkPermission(['echeckrecord_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增校准或检定
</el-button>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
@ -17,17 +22,18 @@
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>
<el-table
@ -40,7 +46,6 @@
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.equipment_.name }}</template>
@ -56,12 +61,10 @@
<el-tag v-if="scope.row.equipment_.state===10" type="success">
{{ state_[scope.row.equipment_.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.equipment_.state] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="校准检查日期">
<template slot-scope="scope">{{ scope.row.check_date }}</template>
@ -69,26 +72,26 @@
<el-table-column label="备注">
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="120px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
v-if="checkPermission(['echeckrecord_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
v-if="checkPermission(['echeckrecord_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -112,19 +115,17 @@
label-position="right"
:rules="rule1"
>
<el-form-item label="校准检定设备" prop="equipment">
<el-select style="width: 100%" v-model="equipmentrecord.equipment" placeholder="请选择">
<el-option
v-for="item in equipmentoptions"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="校准检查日期" prop="check_date">
<el-date-picker
v-model="equipmentrecord.check_date"
@ -134,20 +135,15 @@
style="width: 100%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input
v-model="equipmentrecord.description"
type="textarea"
:rows="4"
v-model="equipmentrecord.description"
placeholder="备注"
/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -157,17 +153,18 @@
</div>
</template>
<script>
import { getpEquipmentList,
getEquipmentrecordList, createEquipmentrecord,updateEquipmentrecord,deleteEquipmentrecord } from "@/api/equipment";
import { getUserList } from "@/api/user";
import { getOrgList } from "@/api/org";
import {
getpEquipmentList,
getEquipmentrecordList, createEquipmentrecord, updateEquipmentrecord, deleteEquipmentrecord
} from "@/api/equipment";
// import {getUserList} from "@/api/user";
// import {getOrgList} from "@/api/org";
import checkPermission from "@/utils/permission";
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
};
const defaultequipment = {};
export default {
components: {Pagination},
data() {
@ -176,7 +173,6 @@ export default {
equipmentrecordList: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
@ -184,35 +180,32 @@ export default {
equipmentoptions: [],
state_: {
10: '合格',
40: '禁用',
},
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
equipment: [{required: true, message: "请输入", trigger: "blur"}],
},
};
},
computed: {},
watch: {},
created() {
this.getequipmentList();
this.getList();
},
methods: {
checkPermission,
//设备
getequipmentList() {
getpEquipmentList({pageoff: true, type: 2}).then((res) => {
this.equipmentoptions = genTree(res.data);
});
},
getList() {
this.listLoading = true;
getEquipmentrecordList(this.listQuery).then((response) => {
@ -223,18 +216,19 @@ export default {
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
this.equipmentrecord = Object.assign({}, defaultequipment);
this.dialogType = "new";
@ -252,6 +246,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -264,7 +259,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -2,12 +2,22 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handlecgCreate"
>新增采购入库</el-button
<el-button
v-if="checkPermission(['fifo_in_pur'])"
type="primary"
icon="el-icon-plus"
@click="handlecgCreate"
>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增其他入库</el-button
新增采购入库
</el-button>
<el-button
v-if="checkPermission(['fifo_in_other'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增其他入库
</el-button>
<el-input
v-model="listQuery.search"
placeholder="仓库名称/仓库编号"
@ -20,15 +30,17 @@
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>
@ -43,17 +55,14 @@
v-el-height-adaptive-table="{ bottomOffset: 42 }"
>
<el-table-column type="index" width="50"/>
<el-table-column label="记录编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="记录编号" prop="number">
</el-table-column>
<el-table-column label="操作人员">
<template slot-scope="scope" v-if="scope.row.create_by">{{
scope.row.create_by_.name
}}</template>
<template slot-scope="scope" v-if="scope.row.create_by">
{{scope.row.create_by_.name}}
</template>
</el-table-column>
<el-table-column label="出/入库时间">
<template slot-scope="scope">{{ scope.row.inout_date }}</template>
<el-table-column label="出/入库时间" prop="inout_date">
</el-table-column>
<el-table-column label="出/入库类型">
<template slot-scope="scope">{{ types_[scope.row.type] }}</template>
@ -64,35 +73,38 @@
<el-tag v-else>已审核</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="scope.row.type==2"
v-if="checkPermission(['fifo_pack'])&&scope.row.type==2"
type="primary"
@click="handlePack(scope)"
>装箱</el-link
>
装箱
</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['fifo_pack'])"
type="primary"
@click="handleDetail(scope)"
>查看</el-link
>
查看
</el-link>
<el-link
v-if="scope.row.is_audited == false"
v-if="checkPermission(['fifo_hear'])&&scope.row.is_audited == false"
type="primary"
@click="handleAudit(scope)"
>审核</el-link
>
审核
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['fifo_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -129,12 +141,18 @@
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisibles = false"
>取消</el-button
<el-button
type="danger"
@click="dialogVisibles = false"
>
<el-button type="primary" @click="confirminpur('Form1')"
>确认</el-button
取消
</el-button>
<el-button
type="primary"
@click="confirminpur('Form1')"
>
确认
</el-button>
</div>
</el-dialog>
<el-dialog
@ -180,7 +198,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5" style="margin-right: 10px">
<el-form-item
class="material"
@ -198,7 +215,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5" style="margin-right: 10px">
<el-form-item
class="count"
@ -234,10 +250,8 @@
style="width:100%"
>
</el-date-picker>
</el-form-item>
</el-col>
<!-- 删除按钮 -->
<el-col :span="1">
<el-tooltip
@ -519,8 +533,7 @@ export default {
});
},
//装箱
handlePack(scope)
{
handlePack(scope) {
this.$router.push({name: "salesdetail", params: {id: scope.row.sale},})
}
},

View File

@ -47,10 +47,15 @@
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="有效期">
<template slot-scope="scope">{{ scope.row.expiration_date }}</template>
</el-table-column>
<el-table-column label="有效期" >
<template slot-scope="scope">
<el-tag v-if="scope.row.expiration_date" :type="setClass(scope.row.expiration_date)">
{{scope.row.expiration_date}}
</el-tag>
<div v-else></div></template
>
</el-table-column>
<el-table-column label="物料编号">
<template slot-scope="scope">{{
scope.row.material_.number
@ -130,7 +135,23 @@ export default {
this.listLoading = false;
});
},
//校准时间提醒
setClass:function(check_date) {
let obj = {};
if(check_date!=null){
let dat = new Date();
let time = dat.getTime();
let check = new Date(check_date).getTime();
let timeDiffer = (check-time)/1000/60/60/24;
if (timeDiffer<0) {
obj = "danger";
}
}
return obj;
},
handleFilter() {
this.listQuery.page = 1;
this.getList();

View File

@ -1,13 +1,18 @@
<template>
<div class="app-container">
<el-card>
<el-button type="primary" icon="el-icon-plus" @click="handleorder"
>选择订单
<el-button
v-if="checkPermission(['wp_to_order'])"
type="primary"
icon="el-icon-plus"
@click="handleorder"
>
选择订单
</el-button>
<el-table
ref="multipleTable"
v-loading="listLoading"
:data="iproductData.results"
ref="multipleTable"
border
fit
stripe
@ -17,12 +22,9 @@
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" width="50"/>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="成品编号" prop="number">
</el-table-column>
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column label="成品批次" prop="batch">
</el-table-column>
<el-table-column label="成品名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
@ -30,13 +32,10 @@
<el-table-column label="所在仓库">
<template slot-scope="scope">{{scope.row.warehouse_.name}}</template>
</el-table-column>
<el-table-column label="订单">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{scope.row.to_order_.number}}</span>
<el-tag
v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true"
>
<el-tag v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true">
需要确定订单
</el-tag>
<span v-else></span>
@ -45,9 +44,7 @@
<el-table-column label="合同">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{scope.row.to_order_.contract_.name}}</span>
<span
v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true"
>
<span v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true">
</span>
<span v-else></span>
</template>
@ -55,9 +52,7 @@
<el-table-column label="客户">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{scope.row.to_order_.customer_.name}}</span>
<span
v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true"
>
<span v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true">
</span>
<span v-else></span>
</template>
@ -69,13 +64,9 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="销售状态">
<template slot-scope="scope">{{state_[scope.row.state]}}</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
@ -150,7 +141,8 @@
<el-link
v-if="checkPermission(['warehouse_update'])"
@click="toorders(scope)"
>确认
>
确认
</el-link>
</template>
</el-table-column>
@ -167,7 +159,7 @@
import checkPermission from "@/utils/permission";
import {getOrderList} from "@/api/sam";
import {mtest, toorder} from "@/api/wpm";
import {genTree} from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
@ -225,10 +217,12 @@
this.listLoading = false;
});
},
handleMtest(scope) {
this.saleproduct = scope.row.id;
this.dialogVisible = true;
},
submtest() {
mtest(this.saleproduct, this.mtestform).then((res) => {
if (res.code >= 200) {
@ -237,6 +231,7 @@
}
});
},
//批量选择成品发给谋订单
handleorder() {
this.dialogFormVisibleorder = true;
@ -261,6 +256,7 @@
}
);
},
//提交批量产品选择的订单
toorders(scope) {
toorder({

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增仓库</el-button
<el-button
v-if="checkPermission(['warehouse_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增仓库
</el-button>
<el-input
v-model="listQuery.search"
placeholder="仓库名称/仓库编号"
@ -17,17 +22,18 @@
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>
<el-table
@ -37,24 +43,17 @@
fit
stripe
highlight-current-row
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="仓库名称">
<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">{{ scope.row.number }}</template>
<el-table-column label="仓库编号" prop="number">
</el-table-column>
<el-table-column label="具体地点">
<template slot-scope="scope">{{ scope.row.place }}</template>
<el-table-column label="具体地点" prop="place">
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
@ -62,20 +61,23 @@
v-if="checkPermission(['warehouse_update'])"
type="primary"
@click="handleMaterial(scope)"
>查看物料</el-link
>
查看物料
</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -125,7 +127,7 @@ import {
} from "@/api/inm";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultewarehouse = {};
export default {
@ -183,14 +185,17 @@ export default {
this.listLoading = false;
});
},
//跳转到该仓库的物料表
handleMaterial(scope) {
this.$router.push({name: "inventory", params: {id: scope.row.id}});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
@ -198,6 +203,7 @@ export default {
};
this.getList();
},
handleCreate() {
this.warehouse = Object.assign({}, defaultewarehouse);
this.dialogType = "new";
@ -215,6 +221,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -227,7 +234,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
<el-button v-if="checkPermission(['material_create'])" type="primary" icon="el-icon-plus" @click="handleCreate">
新增物料
</el-button>
<el-input
@ -85,7 +85,7 @@
>检查表
</el-link>
<el-link
v-if="checkPermission(['material_update'])"
subproduction_delete
type="primary"
@click="handleEdit(scope)"
>编辑

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
<el-button v-if="checkPermission(['process_create'])" type="primary" icon="el-icon-plus" @click="handleCreate">
新增工序
</el-button>
</div>
@ -46,6 +46,7 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['process_update'])"
type="primary"
@click="handleAdd(scope)"
>

View File

@ -47,9 +47,12 @@
">工艺流程</span>
</div>
<el-steps :active="values" spac="400px" align-center="" style="padding-top: 20px;height:80px">
<el-step :title="item.name" v-for="(item,index) in processoptions " :key="index"
@click.native=stepclick(item.id)>
<el-step
v-for="(item,index) in processoptions "
:key="index"
:title="item.name"
@click.native=stepclick(item.id)
>
</el-step>
</el-steps>
</el-card>
@ -59,8 +62,8 @@
font-weight: 700;
">流程分解</span>
</div>
<el-button type="primary" icon="el-icon-plus" @click="handlesubproducationCreate"
>新增
<el-button v-if="checkPermission(['subproduction_create'])" type="primary" icon="el-icon-plus" @click="handlesubproducationCreate">
新增
</el-button>
<el-table
height="190px"
@ -87,33 +90,29 @@
<el-table-column label="排序">
<template slot-scope="scope">{{ scope.row.sort }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handlesubproducationEdit(scope)"
>编辑
</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
v-if="checkPermission(['subproduction_delete'])"
type="danger"
@click="handlesubproducationDelete(scope)"
>删除
</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
<el-dialog
:visible.sync="dialogVisiblesp"
:title="dialogTypesp === 'edit' ? '编辑流程分解' : '新增流程分解'"
@ -124,7 +123,6 @@
label-width="80px"
label-position="right"
>
<el-form-item label="名称" prop="name">
<el-input v-model="subproducation.name"/>
</el-form-item>
@ -137,7 +135,6 @@
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否质检" prop="need_combtest">
<el-switch v-model="subproducation.need_combtest"></el-switch>
@ -149,8 +146,6 @@
:max="2147483647"
></el-input-number>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisiblesp = false">取消</el-button>
@ -160,8 +155,13 @@
</el-card>
<el-tabs type="border-card" style="height:310px">
<el-tab-pane label="输入物料">
<el-button type="primary" icon="el-icon-plus" @click="handleinputCreate"
>新增
<el-button
v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleinputCreate"
>
新增
</el-button>
<el-table
:data="inputtableData"
@ -190,16 +190,18 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handleinputEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
v-if="checkPermission(['subproduction_update'])"
type="danger"
@click="handleinputDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -244,8 +246,13 @@
</el-dialog>
</el-tab-pane>
<el-tab-pane label="输出物料">
<el-button type="primary" icon="el-icon-plus" @click="handleoutputCreate"
>新增
<el-button
v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleoutputCreate"
>
新增
</el-button>
<el-table
:data="outputtableData"
@ -279,16 +286,18 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handleoutputEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
v-if="checkPermission(['subproduction_update'])"
type="danger"
@click="handleoutputDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -336,8 +345,13 @@
</el-dialog>
</el-tab-pane>
<el-tab-pane label="工具工装">
<el-button type="primary" icon="el-icon-plus" @click="handleotherCreate"
>新增
<el-button
v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleotherCreate"
>
新增
</el-button>
<el-table
:data="othertableData"
@ -362,16 +376,18 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handleotherEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
v-if="checkPermission(['subproduction_update'])"
type="danger"
@click="handleotherDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -418,8 +434,13 @@
</el-dialog>
</el-tab-pane>
<el-tab-pane label="子工序列表">
<el-button type="primary" icon="el-icon-plus" @click="handleusedstepCreate"
>新增
<el-button
v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handleusedstepCreate"
>
新增
</el-button>
<el-table
:data="usedsteptableData"
@ -433,7 +454,6 @@
</el-table-column>
<el-table-column label="工序内检验">
<template slot-scope="scope">
<!--{{ scope.row.need_test }}-->
<span v-if=" scope.row.need_test">检验</span>
<span v-else>不检验</span>
</template>
@ -447,20 +467,24 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
type="primary"
@click="handlesearch(scope)"
>查看
>
查看
</el-link>
<el-link
v-if="checkPermission(['material_delete'])"
v-if="checkPermission(['subproduction_update'])"
type="danger"
@click="handleusedstepDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -503,8 +527,13 @@
</el-dialog>
</el-tab-pane>
<el-tab-pane label="技术文件">
<el-button type="primary" icon="el-icon-plus" @click="handletechdocCreate"
>新增
<el-button
v-if="checkPermission(['subproduction_update'])"
type="primary"
icon="el-icon-plus"
@click="handletechdocCreate"
>
新增
</el-button>
<el-table
:data="techdoctableData"
@ -535,16 +564,18 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['process_update'])"
v-if="checkPermission(['subproduction_update'])"
type="primary"
@click="handletechdocEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
v-if="checkPermission(['process_delete'])"
v-if="checkPermission(['subproduction_update'])"
type="danger"
@click="handletechdocDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -831,11 +862,11 @@
})
.then(async () => {
await deletesubproducation(scope.row.id);
this.getsubproducationList()
this.getsubproducationList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -847,7 +878,7 @@
this.subproducation.product = this.product;
updatesubproducation(this.subproducation.id, this.subproducation).then((res) => {
if (res.code >= 200) {
this.getsubproducationList()
this.getsubproducationList();
this.dialogVisiblesp = false;
this.$message.success("成功");
}
@ -856,7 +887,7 @@
this.subproducation.product = this.product;
createsubproducation(this.subproducation).then((res) => {
if (res.code >= 200) {
this.getsubproducationList()
this.getsubproducationList();
this.dialogVisiblesp = false;
this.$message.success("成功");
}
@ -906,11 +937,11 @@
})
.then(async () => {
await deleteInputmaterial(scope.row.id);
this.getInputmaterialLists()
this.getInputmaterialLists();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -922,7 +953,7 @@
this.inputmaterial.subproduction = this.subproduction;
updateInputmaterial(this.inputmaterial.id, this.inputmaterial).then((res) => {
if (res.code >= 200) {
this.getInputmaterialLists()
this.getInputmaterialLists();
this.dialogVisible = false;
this.$message.success("成功");
}
@ -931,7 +962,7 @@
this.inputmaterial.subproduction = this.subproduction;
createInputmaterial(this.inputmaterial).then((res) => {
if (res.code >= 200) {
this.getInputmaterialLists()
this.getInputmaterialLists();
this.dialogVisible = false;
this.$message.success("成功");
}
@ -980,11 +1011,11 @@
})
.then(async () => {
await deleteOutputmaterial(scope.row.id);
this.getOutputmaterialLists()
this.getOutputmaterialLists();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
async outputconfirm(form) {
@ -995,7 +1026,7 @@
this.outputmaterial.subproduction = this.subproduction;
updateOutputmaterial(this.outputmaterial.id, this.outputmaterial).then((res) => {
if (res.code >= 200) {
this.getOutputmaterialLists()
this.getOutputmaterialLists();
this.dialogVisible1 = false;
this.$message.success("成功");
}
@ -1004,7 +1035,7 @@
this.outputmaterial.subproduction = this.subproduction;
createOutputmaterial(this.outputmaterial).then((res) => {
if (res.code >= 200) {
this.getOutputmaterialLists()
this.getOutputmaterialLists();
this.dialogVisible1 = false;
this.$message.success("成功");
}
@ -1056,7 +1087,7 @@
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -1068,7 +1099,7 @@
this.othermaterial.subproduction = this.subproduction;
updateOthermaterial(this.othermaterial.id, this.othermaterial).then((res) => {
if (res.code >= 200) {
this.getOthermaterialLists()
this.getOthermaterialLists();
this.dialogVisibleother = false;
this.$message.success("成功");
}
@ -1077,7 +1108,7 @@
this.othermaterial.subproduction = this.subproduction;
createOthermaterial(this.othermaterial).then((res) => {
if (res.code >= 200) {
this.getOthermaterialLists()
this.getOthermaterialLists();
this.dialogVisibleother = false;
this.$message.success("成功");
}
@ -1141,11 +1172,11 @@
})
.then(async () => {
await deleteUsedstep(scope.row.id);
this.getUsedstepLists()
this.getUsedstepLists();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -1208,11 +1239,11 @@
handleUpSuccess(res, file, filelist) {
this.techdoc.file = res.data.id;
console.log(res.data);
// console.log(res.data);
this.techdoc.name = res.data.name;
},
handleRemove(file, filelist) {
handleRemove() {
this.techdoc.file = null;
},
@ -1245,7 +1276,7 @@
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -14,45 +14,37 @@
v-el-height-adaptive-table="{ bottomOffset: 41 }"
>
<el-table-column type="index" width="50" label="序号"/>
<el-table-column align="center" label="工号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column align="center" prop="number" label="工号">
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column align="center" prop="name" label="姓名">
</el-table-column>
<el-table-column align="center" label="到岗情况">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.is_atwork">在岗</el-tag>
<el-tag type="danger" v-else>离岗</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="离岗备注">
<template slot-scope="scope">{{
scope.row.not_work_remark
}}</template>
<el-table-column align="center" prop="not_work_remark" label="离岗备注">
</el-table-column>
<el-table-column align="center" label="打卡时间">
<template slot-scope="scope">{{ scope.row.last_check_time }}</template>
<el-table-column align="center" prop="last_check_time" label="打卡时间">
</el-table-column>
<el-table-column align="header-center" label="部门">
<template v-if="scope.row.dept_" slot-scope="scope">{{
scope.row.dept_.name
}}</template>
<template v-if="scope.row.dept_" slot-scope="scope">
{{scope.row.dept_.name}}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['employee_notworkremark'])&&scope.row.is_atwork == false"
type="primary"
v-if="scope.row.is_atwork == false"
@click="handlestopwork(scope)"
>离岗说明
>
离岗说明
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="userList.count > 0"
:total="userList.count"
@ -60,7 +52,6 @@
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
<el-dialog
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@ -74,17 +65,25 @@
>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="stopwork.not_work_remark"
type="textarea"
placeholder="备注"
/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
<el-button
type="danger"
@click="dialogVisible = false"
>
<el-button type="primary" @click="smtconfirm()">确认</el-button>
取消
</el-button>
<el-button
type="primary"
@click="smtconfirm()"
>
确认
</el-button>
</div>
</el-dialog>
</el-tab-pane>
@ -99,7 +98,12 @@
placeholder="选择年月"
>
</el-date-picker>
<el-button type="primary" @click="submit">查询</el-button>
<el-button
type="primary"
@click="submit"
>
查询
</el-button>
</div>
<el-table
:data="atworkList"
@ -113,25 +117,15 @@
v-el-height-adaptive-table="{ bottomOffset: 41 }"
>
<el-table-column type="index" width="50" label="序号"/>
<el-table-column align="center" label="工号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column align="center" prop="number" label="工号">
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column align="center" prop="name" label="姓名">
</el-table-column>
<el-table-column align="header-center" label="部门">
<template slot-scope="scope">{{
scope.row.dept_name
}}</template>
<el-table-column align="header-center" prop="dept_name" label="部门">
</el-table-column>
<el-table-column align="center" label="出勤天数">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column align="center" prop="count" label="出勤天数">
</el-table-column>
<el-table-column align="center" label="应到天数">
<template slot-scope="scope">{{
scope.row.count_workday
}}</template>
<el-table-column align="center" prop="count_workday" label="应到天数">
</el-table-column>
</el-table>
</el-col>
@ -159,9 +153,11 @@
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
@ -170,6 +166,7 @@
line-height: 100px;
text-align: center;
}
.avatar {
width: 100px;
height: 100px;

View File

@ -1,10 +1,7 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-input
v-model="listQuery.name"
placeholder="姓名"
@ -16,18 +13,21 @@
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
size="small"
>搜索</el-button>
@click="handleFilter"
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
size="small"
>重置</el-button>
@click="resetFilter"
>
重置
</el-button>
</div>
<el-table
v-loading="listLoading"
:data="userList.results"
@ -40,11 +40,9 @@
v-el-height-adaptive-table="{bottomOffset: 41}"
>
<el-table-column type="index" width="50"/>
<el-table-column align="center" label="工号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column align="center" label="工号" prop="number">
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column align="center" label="姓名" prop="name">
</el-table-column>
<el-table-column align="header-center" label="照片">
<template slot-scope="scope"><img :src="scope.row.photo" min-width="70" height="70"/></template>
@ -56,31 +54,33 @@
<template
v-if="scope.row.dept_"
slot-scope="scope"
>{{ scope.row.dept_.name }}</template>
>
{{ scope.row.dept_.name }}
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="!scope.row.is_superuser"
:disabled="!checkPermission(['user_update'])"
:disabled="!checkPermission(['employee_update'])"
type="primary"
size="small"
@click="handleEdit(scope)"
>编辑</el-link>
>
编辑
</el-link>
<el-link
v-if="!scope.row.is_superuser"
:disabled="!checkPermission(['user_delete'])"
type="danger"
size="small"
@click="handleDelete(scope)"
>删除</el-link>
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="userList.count>0"
:total="userList.count"
@ -89,8 +89,6 @@
@pagination="getList"
/>
</el-card>
</div>
</template>
<style>
@ -101,9 +99,11 @@
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
@ -112,6 +112,7 @@
line-height: 100px;
text-align: center;
}
.avatar {
width: 100px;
height: 100px;
@ -119,17 +120,13 @@
}
</style>
<script>
import { getUserList, createUser, deleteUser, updateUser } from "@/api/user";
import { deleteUser} from "@/api/user";
import {getEmployeeList,} from "@/api/employee";
import { getOrgAll } from "@/api/org"
import { getRoleAll } from "@/api/role"
import { genTree } from "@/utils"
import checkPermission from "@/utils/permission"
import {upUrl, upHeaders} from "@/api/file"
import Pagination from "@/components/Pagination" // secondary package based on el-pagination
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
const defaultUser = {
id: "",
name: "",
@ -138,7 +135,7 @@ const defaultUser = {
avatar: "/media/default/avatar.png"
};
export default {
components: { Pagination, Treeselect },
components: {Pagination},
data() {
return {
user: defaultUser,
@ -160,9 +157,6 @@ export default {
rule1: {
name: [{required: true, message: "请输入姓名", trigger: "blur"}],
username: [{required: true, message: "请输入账号", trigger: "change"}]
// password: [
// { required: true, message: '请输入密码', trigger: 'change' }
// ],
},
filterOrgText: "",
treeLoding: false,
@ -181,9 +175,10 @@ export default {
},
methods: {
checkPermission,
handleAvatarSuccess(res, file) {
handleAvatarSuccess(res) {
this.user.avatar = res.data.path
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 0.5;
if (!isLt2M) {
@ -191,15 +186,18 @@ export default {
}
return isLt2M;
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
handleOrgClick(obj, node, vue) {
handleOrgClick(obj) {
this.listQuery.page = 1;
this.listQuery.dept = obj.id;
this.getList();
},
getList() {
this.listLoading = true;
getEmployeeList(this.listQuery).then(response => {
@ -217,6 +215,7 @@ export default {
};
this.getList();
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
@ -225,6 +224,7 @@ export default {
handleEdit(scope) {
this.$router.push({name: "userupdate", params: {id: scope.row.id}})
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -240,7 +240,7 @@ export default {
});
})
.catch(err => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -3,7 +3,6 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>生产任务列表</span>
<el-input
v-model="listQuery.search"
placeholder="任务编号/订单编号/合同编号/产品名称"
@ -16,18 +15,18 @@
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-table
:data="productionplanList.results"
border
@ -38,60 +37,53 @@
@row-click="tableRowClick"
>
<el-table-column type="index" width="50"/>
<el-table-column label="任务编号" width="110">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="任务编号" prop="number" width="110">
</el-table-column>
<el-table-column label="订单编号" width="110">
<template slot-scope="scope">{{ scope.row.order_.number }}</template>
</el-table-column>
<el-table-column label="合同编号" width="110">
<template slot-scope="scope" v-if="scope.row.order_">{{
scope.row.order_.contract_.number
}}</template>
<template slot-scope="scope" v-if="scope.row.order_">
<span v-if="scope.row.order_.contract_">{{scope.row.order_.contract_.number}}</span>
</template>
</el-table-column>
<el-table-column label="产品名称" width="250">
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column>
<el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
<template slot-scope="scope">
{{scope.row.product_.specification}}
</template>
</el-table-column>
<el-table-column label="产品单位" width="110">
<template slot-scope="scope">{{ scope.row.product_.unit }}</template>
</el-table-column>
<el-table-column label="生产数量" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="生产数量" prop="count" width="110">
</el-table-column>
<el-table-column label="状态" width="110">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="计划开工时间" width="110">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
<el-table-column label="计划开工时间" prop="start_date" width="110">
</el-table-column>
<el-table-column label="计划完工时间" width="110">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
<el-table-column label="计划完工时间" prop="end_date" width="110">
</el-table-column>
<el-table-column label="交付截止时间" width="110">
<template slot-scope="scope">{{
scope.row.order_.delivery_date
}}</template>
<template slot-scope="scope">
{{scope.row.order_.delivery_date}}
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
fixed="right"
>
<template slot-scope="scope">
<el-link
v-if="scope.row.is_planed&&checkPermission(['testitem_detail'])"
type="primary"
v-if="scope.row.is_planed"
@click="handleselectplan(scope)"
>详情
>
详情
</el-link>
</template>
</el-table-column>
@ -107,9 +99,9 @@
<el-card class="box-card">
<div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div>
<gantt
style="position: relative"
v-if="proList.length>0"
:proList="proList"
style="position: relative"
></gantt>
</el-card>
</div>
@ -139,7 +131,8 @@ export default {
50: "已完成",
60: "军检完成",
70: "暂停",
80: "终止"},
80: "终止"
},
listLoading: true,
proList: [],
@ -176,8 +169,8 @@ export default {
list.push(item)
}
});
debugger;
console.log(list);
// debugger;
// console.log(list);
list.forEach(item => {
if (!item.children || item.children.length < 1) {
let startTime = new Date(item.start_date).getTime();
@ -190,6 +183,7 @@ export default {
obj.endTime = endTime;
obj.planTime = [startTime, endTime];
obj.per = item.count;
obj.per1 = item.count_ok;
obj.type = 1;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
@ -213,7 +207,7 @@ export default {
objChild.endTime = end;
objChild.planTime = [start, end];
objChild.per = child.count;
objChild.per1 = child.count_real;
objChild.per1 = child.count_ok;
objChild.type = 1;
objChild.productName = child.product_.name;
objChild.productNum = child.product_.specification;
@ -229,7 +223,7 @@ export default {
obj.endTime = endTime;
obj.planTime = [startTime, endTime];
obj.per = item.count;
obj.per1=item.count_real;
obj.per1 = item.count_ok;
obj.type = 3;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
@ -238,8 +232,8 @@ export default {
arr.push(obj);
}
that.proList = arr;
debugger;
console.log(arr)
// debugger;
// console.log(arr)
});
} else {
that.$message.error(res.msg);
@ -255,6 +249,7 @@ export default {
this.productionplanList = response.data;
let list = response.data.results;
let arr = [];
debugger;
list.forEach((item) => {
// if (!item.children || item.children.length < 1) {
let startTime = new Date(item.start_date).getTime();

View File

@ -16,14 +16,16 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置
>
重置
</el-button>
<el-table
:data="productionplanList.results"
@ -34,54 +36,48 @@
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 label="任务编号" prop="number" width="110">
</el-table-column>
<el-table-column label="订单编号" width="110">
<template slot-scope="scope">{{ scope.row.order_.number }}</template>
</el-table-column>
<el-table-column label="合同编号" width="110">
<template slot-scope="scope" v-if="scope.row.contract">{{
scope.row.order_.contract_.number
}}</template>
<template slot-scope="scope" v-if="scope.row.order_.contract_">
<span v-if="scope.row.order_.contract_">{{scope.row.order_.contract_.number }}</span>
</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>
<el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
<template slot-scope="scope">
{{scope.row.product_.specification}}
</template>
</el-table-column>
<el-table-column label="产品单位" width="110">
<template slot-scope="scope">{{ scope.row.product_.unit }}</template>
</el-table-column>
<el-table-column label="生产数量" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="生产数量" prop="count" width="110">
</el-table-column>
<el-table-column label="状态" width="110">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="计划开工时间" width="110">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
<el-table-column label="计划开工时间" prop="start_date" width="110">
</el-table-column>
<el-table-column label="计划完工时间" width="110">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
<el-table-column label="计划完工时间" prop="end_date" width="110">
</el-table-column>
<el-table-column label="交货日期" width="110">
<template slot-scope="scope">{{
scope.row.order_.delivery_date
}}</template>
<template slot-scope="scope">
{{scope.row.order_.delivery_date}}
</template>
</el-table-column>
<el-table-column label="是否生成子计划" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_planed == false"></el-tag>
<el-tag v-if="scope.row.is_planed == true"></el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time" width="160">
</el-table-column>
<el-table-column
align="center"
@ -90,31 +86,40 @@
width="150px"
>
<template slot-scope="scope">
<el-link type="warning"
v-if="scope.row.state != 70"
<el-link
v-if="checkPermission(['plan_toggle'])&&scope.row.state !== 70"
type="warning"
@click="handlestatesuspended(scope)"
>暂停
>
暂停
</el-link>
<el-link
v-if="checkPermission(['plan_toggle'])&&scope.row.state === 70"
type="primary"
v-if="scope.row.state == 70"
@click="handlestate(scope)"
>启用
>
启用
</el-link>
<el-link
v-if="checkPermission(['plan_stop'])&&scope.row.state === 70"
type="danger"
v-if="scope.row.state == 70"
@click="handlestatestop(scope)"
>终止
>
终止
</el-link>
<el-link
v-if="checkPermission(['plan_subcreate'])&&scope.row.is_planed"
type="primary"
v-if="scope.row.is_planed"
@click="handleselectplan(scope)"
>查看子计划
>
查看子计划
</el-link>
<el-link type="primary" v-else @click="handleWork(scope)"
>生成子计划
<el-link
v-if="checkPermission(['plan_subcreate'])&&!scope.row.is_planed"
type="primary"
@click="handleWork(scope)"
>
生成子计划
</el-link>
</template>
</el-table-column>
@ -161,7 +166,8 @@
<el-table-column label="产品型号" width="110">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
@ -182,10 +188,12 @@
width="80px"
>
<template slot-scope="scope">
<el-link type="primary"
v-if="checkPermission(['warehouse_update'])"
<el-link
v-if="checkPermission(['plan_create'])"
type="primary"
@click="handleclick(scope)"
>排产
>
排产
</el-link>
</template>
</el-table-column>
@ -229,10 +237,18 @@
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
<el-button
type="danger"
@click="dialogVisible = false"
>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
取消
</el-button>
<el-button
type="primary"
@click="confirm('Form')"
>
确认
</el-button>
</div>
</el-dialog>
</el-tab-pane>

View File

@ -6,10 +6,16 @@
<div slot="header" class="clearfix">
<span>合同订单列表</span>
</div>
<el-button type="primary" @click="handlecount">计算物料</el-button>
<el-button
v-if="checkPermission(['resource_cal'])"
type="primary"
@click="handlecount"
>
计算物料
</el-button>
<el-table
:data="orderList.results"
ref="multipleTable"
:data="orderList.results"
border
fit
stripe
@ -26,7 +32,8 @@
<el-table-column label="所需产品" show-overflow-tooltip width="150">
<template slot-scope="scope">{{
scope.row.product_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品数量">
@ -35,38 +42,45 @@
<el-table-column label="已派数量">
<template slot-scope="scope">{{
scope.row.planed_count
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品型号">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="客户名称" show-overflow-tooltip width="150">
<template slot-scope="scope">{{
scope.row.customer_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="合同编号" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.number
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="合同名称" show-overflow-tooltip width="150">
<template slot-scope="scope" v-if=" scope.row.contract_">{{
scope.row.contract_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="交货日期" width="110">
<template slot-scope="scope">{{
scope.row.delivery_date
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="创建时间" width="110">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="计划生产数" width="150px" fixed="right">
<template slot-scope="scope">
@ -99,12 +113,13 @@
<div slot="header" class="clearfix">
<span>物料配置</span>
<el-button
v-if="butshow&&checkPermission(['resource_cal'])"
type="primary"
style="float: right; "
@click="handlebcpcount"
type="primary"
v-if="butshow"
>半成品折合</el-button
>
半成品折合
</el-button>
</div>
<el-table
:data="materialpzTable"
@ -123,8 +138,8 @@
</el-table-column>
<el-table-column label="物料类型">
<template slot-scope="scope">
{{ options_[scope.row.type] }}</template
>
{{ options_[scope.row.type] }}
</template>
</el-table-column>
<el-table-column label="物料编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -142,30 +157,26 @@
</el-form-item>
</el-form>
</div>
<div v-else>{{ scope.row.count }}</div></template
>
<div v-else>{{ scope.row.count }}</div>
</template>
</el-table-column>
<el-table-column label="剩余量">
<template slot-scope="scope">
<el-tag
v-if="
scope.row.count_safe != null &&
scope.row.count_safe >
scope.row.inv_count - scope.row.count
"
v-if="scope.row.count_safe != null &&scope.row.count_safe >scope.row.inv_count - scope.row.count"
type="danger"
>
{{ scope.row.inv_count - scope.row.count }}</el-tag
>
{{ scope.row.inv_count - scope.row.count }}
</el-tag>
<el-tag v-else>
{{ scope.row.inv_count - scope.row.count }}</el-tag
>
{{ scope.row.inv_count - scope.row.count }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="安全库存">
<template slot-scope="scope">{{
scope.row.count_safe
}}</template>
<template slot-scope="scope">
{{scope.row.count_safe }}
</template>
</el-table-column>
</el-table>
</el-card>
@ -218,8 +229,8 @@
</el-table-column>
<el-table-column label="设备编号">
<template slot-scope="scope">
{{ scope.row.number }}</template
>
{{ scope.row.number }}
</template>
</el-table-column>
<el-table-column label="设备型号">
<template slot-scope="scope"> {{ scope.row.model }}</template>

View File

@ -2,10 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增采购订单</el-button
<el-button
v-if="checkPermission(['puorder_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增采购订单
</el-button>
<el-input
v-model="listQuery.search"
placeholder="采购订单编号、供应商名称"
@ -18,15 +22,17 @@
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">
@ -42,13 +48,12 @@
v-el-height-adaptive-table="{ bottomOffset: 43 }"
>
<el-table-column type="index" width="50"/>
<el-table-column label="采购订单编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="采购订单编号" prop="number">
</el-table-column>
<el-table-column label="供应商">
<template slot-scope="scope" v-if="scope.row.vendor_">{{
scope.row.vendor_.name
}}</template>
<template slot-scope="scope" v-if="scope.row.vendor_">
{{scope.row.vendor_.name}}
</template>
</el-table-column>
<el-table-column label="审核情况" width="150">
<template slot-scope="scope">
@ -56,38 +61,38 @@
<el-tag v-else-if="scope.row.is_audited == true">已审核</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['vendor_update'])"
v-if="checkPermission(['puorder_update'])"
type="primary"
@click="handlePuOrderItem(scope)"
>订单项</el-link
>
订单项
</el-link>
<el-link
v-if="
checkPermission(['vendor_update']) &&
scope.row.is_audited == false
"
v-if="checkPermission(['puorder_hear']) &&scope.row.is_audited == false"
type="primary"
@click="handleAudit(scope)"
>审核</el-link
>
审核
</el-link>
<el-link
v-if="checkPermission(['vendor_update'])"
v-if="checkPermission(['puorder_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['vendor_delete'])"
v-if="checkPermission(['puorder_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -116,8 +121,8 @@
<el-form-item label="供应商" prop="vendor">
<el-select
style="width: 100%"
v-model="puorder.vendor"
style="width: 100%"
placeholder="请选择"
>
<el-option

View File

@ -2,7 +2,12 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
<el-button
v-if="checkPermission(['vendor_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增供应商
</el-button>
<el-input
@ -43,27 +48,19 @@
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="供应商名">
<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">{{ scope.row.contact }}</template>
<el-table-column label="联系人" prop="contact">
</el-table-column>
<el-table-column label="联系电话">
<template slot-scope="scope">{{ scope.row.contact_phone }}</template>
<el-table-column label="联系电话" prop="contact_phone">
</el-table-column>
<el-table-column label="地址" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.address }}</template>
<el-table-column label="地址" prop="address" min-width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="供应物料">
<template slot-scope="scope">{{ scope.row.material }}</template>
<el-table-column label="供应物料" prop="material">
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">{{ scope.row.description }}</template>
<el-table-column label="备注" prop="description">
</el-table-column>
<el-table-column label="创建时间" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time" width="160">
</el-table-column>
<el-table-column
align="center"
@ -98,7 +95,7 @@
</el-card>
<el-dialog
:visible.sync="dialogVisible"
:title="dialogType === 'edit' ? '编辑设备' : '新增设备'"
:title="dialogType === 'edit' ? '编辑供应商' : '新增供应商'"
>
<el-form
ref="Form"
@ -124,9 +121,9 @@
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input
v-model="vendor.description"
type="textarea"
:rows="4"
v-model="vendor.description"
placeholder="备注"
/>
</el-form-item>
@ -140,10 +137,9 @@
</template>
<script>
import {getpVendorList, createVendor, updateVendor, deleteVendor} from "@/api/vendor";
import {getUserList} from "@/api/user";
// import {getUserList} from "@/api/user";
import checkPermission from "@/utils/permission";
import {genTree} from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultvendor = {
name: "",
@ -205,13 +201,15 @@
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
this.vendor = Object.assign({}, defaultvendor);
this.dialogType = "new";
@ -229,6 +227,7 @@
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -241,7 +240,7 @@
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -1,16 +1,19 @@
<template>
<div class="app-container">
<el-card>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="待军检" name="first">
<el-button type="primary" icon="el-icon-plus" @click="handleorder"
>申请
<el-button
v-if="checkPermission(['wp_need_to_order'])"
type="primary"
icon="el-icon-plus"
@click="handleorder"
>
申请
</el-button>
<el-table
:data="iproductData.results"
ref="multipleTable"
:data="iproductData.results"
border
fit
stripe
@ -21,24 +24,16 @@
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" width="50"/>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="成品编号" prop="number">
</el-table-column>
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column label="成品批次" prop="batch">
</el-table-column>
<el-table-column label="成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="所在仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
</el-table-column>
</el-table>
<pagination
v-show="iproductData.count > 0"
@ -50,7 +45,6 @@
</el-tab-pane>
<el-tab-pane label="军检列表" name="second">
<el-table
:data="iproductData2.results"
border
fit
@ -61,31 +55,20 @@
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="成品编号" prop="number">
</el-table-column>
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column label="成品批次" prop="batch">
</el-table-column>
<el-table-column label="成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="所在仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
</el-table-column>
<el-table-column label="订单">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{
scope.row.to_order_.number
}}</span>
<el-tag
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
<span v-if="scope.row.to_order_">{{scope.row.to_order_.number}}</span>
<el-tag v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true">
需要确定订单
</el-tag>
<span v-else></span>
@ -93,40 +76,24 @@
</el-table-column>
<el-table-column label="合同">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{
scope.row.to_order_.contract_.name
}}</span>
<span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</span>
<span v-if="scope.row.to_order_">{{scope.row.to_order_.contract_.name}}</span>
<span v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="客户">
<template slot-scope="scope">
<span v-if="scope.row.to_order_">{{
scope.row.to_order_.customer_.name
}}</span>
<span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</span>
<span v-if="scope.row.to_order_">{{scope.row.to_order_.customer_.name}}</span>
<span v-else-if="scope.row.to_order_ == null && scope.row.need_to_order == true"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="军检">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag>
<span v-else></span></template>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
align="center"
@ -134,13 +101,12 @@
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="scope.row.is_mtestok==null"
v-if="checkPermission(['wp_mtest'])&&scope.row.is_mtestok==null"
@click="handleMtest(scope)"
>军检</el-link
>
军检
</el-link>
</template>
</el-table-column>
</el-table>
@ -152,9 +118,7 @@
@pagination="getList2"
/>
</el-tab-pane>
</el-tabs>
<el-dialog
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@ -165,10 +129,8 @@
:model="mtest"
label-width="150px"
label-position="right"
>
<el-form-item label="军检是否合格">
<el-radio v-model="mtest.is_mtestok" label=True>合格</el-radio>
<el-radio v-model="mtest.is_mtestok" label=False>不合格</el-radio>
@ -176,7 +138,6 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="mtest.remark_mtest" placeholder="备注"/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -184,21 +145,19 @@
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import { getiproductList,saleMtest} from "@/api/inm";
import {getiproductList} from "@/api/inm";
import checkPermission from "@/utils/permission";
import {mtest, needtoorder,} from "@/api/wpm";
import { genTree } from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
components: {Pagination},
data() {
return {
iproductData: {
count: 0,
},
@ -221,33 +180,29 @@ export default {
mutipID1: [],
};
},
computed: {},
watch: {},
created() {
this.getList();
this.getList2();
},
methods: {
checkPermission,
getList() {
this.listQuery.material__type = 1;
this.listQuery.need_to_order = false;
getiproductList(this.listQuery).then((response) => {
if (response.data) {
this.iproductData = response.data;
}
});
},
getList2(){
getList2() {
this.listQuery2.material__type = 1;
getiproductList(this.listQuery2).then((response) => {
if (response.data) {
this.iproductData2 = response.data;
}
});
},
@ -255,25 +210,23 @@ export default {
this.saleproduct = scope.row.wproduct;
this.dialogVisible = true;
},
smtconfirm() {
mtest(this.saleproduct, this.mtest).then((res) => {
if (res.code >= 200) {
this.getList2();
this.dialogVisible = false;
this.$message.success("成功");
}
});
},
//批量申请
handleorder() {
let _this = this;
_this.mutipID1 = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID1.push(item.wproduct);
});
needtoorder({
wproducts: this.mutipID1,

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增合同</el-button
<el-button
v-if="checkPermission(['contract_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增合同
</el-button>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -17,17 +22,18 @@
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>
<el-table
@ -41,31 +47,22 @@
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="合同名称" width="160" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="合同名称" prop="name" width="160" show-overflow-tooltip>
</el-table-column>
<el-table-column label="合同编号" width="160" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="合同编号" prop="number" width="160" show-overflow-tooltip>
</el-table-column>
<el-table-column label="合同金额(元)" width="120">
<template slot-scope="scope">{{ scope.row.amount }}</template>
<el-table-column label="合同金额(元)" prop="amount" width="120">
</el-table-column>
<el-table-column label="开票金额(元)" width="120" >
<template slot-scope="scope">{{ scope.row.invoice }}</template>
<el-table-column label="开票金额(元)" prop="invoice" width="120">
</el-table-column>
<el-table-column label="客户名称" width="130" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
</el-table-column>
<el-table-column label="签订日期" width="120" >
<template slot-scope="scope">{{ scope.row.sign_date }}</template>
<el-table-column label="签订日期" prop="sign_date" width="120">
</el-table-column>
<el-table-column label="描述" width="130" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.description }}</template>
<el-table-column label="描述" prop="description" width="130" show-overflow-tooltip>
</el-table-column>
<el-table-column label="创建时间" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time" width="160">
</el-table-column>
<el-table-column
align="center"
@ -74,27 +71,27 @@
fixed="right"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['contract_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['contract_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['contract_update'])"
type="primary"
@click="handleDetail(scope)"
>详情</el-link
>
详情
</el-link>
</template>
</el-table-column>
</el-table>
@ -152,7 +149,6 @@
<el-form-item label="描述" prop="description">
<el-input v-model="contract.description" placeholder="描述"/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -168,8 +164,7 @@ import checkPermission from "@/utils/permission";
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultecontract = {
};
const defaultecontract = {};
export default {
components: {Pagination},
data() {
@ -191,12 +186,12 @@ export default {
},
};
},
computed: {},
watch: {},
created() {
this.getLists();
this.getList();
},
methods: {
checkPermission,
@ -211,11 +206,8 @@ export default {
},
getLists() {
getCustomerList({pageoff: true}).then((response) => {
this.options = genTree(response.data);
});
},
@ -223,13 +215,15 @@ export default {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
this.contract = Object.assign({}, defaultecontract);
this.dialogType = "new";
@ -247,6 +241,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -259,7 +254,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -289,6 +284,7 @@ export default {
}
});
},
//合同详情
handleDetail(scope) {
this.$router.push({name: "contractdetail", params: {id: scope.row.id},})

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button
<el-button
v-if="checkPermission(['customer_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增客户
</el-button>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -17,17 +22,18 @@
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>
<el-table
@ -41,44 +47,37 @@
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="客户名称" width="200" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="客户名称" prop="name" width="200" show-overflow-tooltip>
</el-table-column>
<el-table-column label="详细地址" width="200" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.address }}</template>
<el-table-column label="详细地址" prop="address" width="200" show-overflow-tooltip>
</el-table-column>
<el-table-column label="联系人" width="130" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.contact }}</template>
<el-table-column label="联系人" prop="contact" width="130" show-overflow-tooltip>
</el-table-column>
<el-table-column label="联系电话" width="130" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.contact_phone }}</template>
<el-table-column label="联系电话" prop="contact_phone" width="130" show-overflow-tooltip>
</el-table-column>
<el-table-column label="描述" width="200" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.description }}</template>
<el-table-column label="描述" prop="description" width="200" show-overflow-tooltip>
</el-table-column>
<el-table-column label="创建时间" width="160" >
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column label="创建时间" prop="create_time" width="160">
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
@click="handleEdit(scope)"
v-if="checkPermission(['customer_update'])"
type="primary"
>编辑</el-link
@click="handleEdit(scope)"
>
编辑
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['customer_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -129,12 +128,10 @@
<script>
import {getCustomerList, createCustomer, updateCustomer, deleteCustomer} from "@/api/sam";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultecustomer = {
};
const defaultecustomer = {};
export default {
components: {Pagination},
data() {
@ -155,13 +152,14 @@ export default {
},
};
},
computed: {},
watch: {},
created() {
this.getList();
},
methods: {
checkPermission,
//设备列表
getList() {
this.listLoading = true;
@ -173,18 +171,19 @@ export default {
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
this.customer = Object.assign({}, defaultecustomer);
this.dialogType = "new";
@ -202,6 +201,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -214,7 +214,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增订单</el-button
<el-button
v-if="checkPermission(['order_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增订单
</el-button>
<el-input
v-model="listQuery.search"
placeholder="订单名称"
@ -17,17 +22,18 @@
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>
<el-table
@ -41,9 +47,7 @@
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="订单编号" width="160" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="订单编号" prop="number" width="160" show-overflow-tooltip>
</el-table-column>
<el-table-column label="客户" width="200" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
@ -57,19 +61,17 @@
<el-table-column label="产品型号" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
</el-table-column>
<el-table-column label="产品数量" width="90" >
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="产品数量" prop="count" width="90">
</el-table-column>
<el-table-column label="交货日期" width="150" >
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
<el-table-column label="交货日期" prop="delivery_date" width="150">
</el-table-column>
<el-table-column label="已交货数量" width="150" >
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
<el-table-column label="已交货数量" prop="delivered_count" width="150">
</el-table-column>
<el-table-column label="是否需要军检" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.need_mtest == false"></el-tag>
<el-tag v-else-if="scope.row.need_mtest == true"></el-tag></template>
<el-tag v-if="scope.row.need_mtest === false"></el-tag>
<el-tag v-else-if="scope.row.need_mtest === true"></el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
@ -81,25 +83,27 @@
width="130"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['order_update'])"
@click="handleEdit(scope)"
type="primary"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['order_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['order_update'])"
type="primary"
@click="handleDetail(scope)"
>详情</el-link
>
详情
</el-link>
</template>
</el-table-column>
</el-table>
@ -123,7 +127,6 @@
label-position="right"
:rules="rule1"
>
<el-form-item label="订单编号" prop="number">
<el-input v-model="order.number" placeholder="订单编号自动生成" disabled="true"/>
</el-form-item>
@ -137,7 +140,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所需数量" prop="count">
<el-input-number type="number" v-model="order.count" :min="0"></el-input-number>
</el-form-item>
@ -165,17 +167,16 @@
<el-select style="width: 100%" v-model="order.contract" @change="selectcontract" placeholder="请选择">
<el-option
v-for="item in contractoptions"
:key="item.id"
:label="item.name+'____'+item.number"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否军检">
<el-switch v-model="order.need_mtest"></el-switch>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -185,7 +186,15 @@
</div>
</template>
<script>
import { getOrderList, createOrder,updateOrder,deleteOrder,getContractList,getCustomerList,getContract } from "@/api/sam";
import {
getOrderList,
createOrder,
updateOrder,
deleteOrder,
getContractList,
getCustomerList,
getContract
} from "@/api/sam";
import {getMaterialList} from "@/api/mtm";
import checkPermission from "@/utils/permission";
@ -215,15 +224,12 @@ export default {
dialogVisible: false,
dialogType: "new",
rule1: {
product: [{required: true, message: "请输入", trigger: "blur"}],
delivery_date: [{required: true, message: "请输入", trigger: "blur"}],
},
};
},
computed: {},
watch: {},
created() {
this.getListm();
this.getListc();
@ -244,50 +250,45 @@ export default {
},
getListm() {
getMaterialList({pageoff: true, type: 1}).then((response) => {
this.productoptions = genTree(response.data);
});
},
getListc() {
getContractList({pageoff: true}).then((response) => {
this.contractoptions = response.data;
});
},
getListcm() {
getCustomerList({pageoff: true}).then((response) => {
this.customeroptions = genTree(response.data);
});
},
selectcontract(selval)
{
selectcontract(selval) {
getContract(selval).then((response) => {
if (response.data) {
console.log(response.data);
// console.log(response.data);
this.order.customer = response.data.customer_.name;
}
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
};
this.getList();
},
handleCreate() {
this.order = Object.assign({}, defaulteorder);
this.dialogType = "new";
@ -305,6 +306,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -317,7 +319,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -347,6 +349,7 @@ export default {
}
});
},
//订单详情
handleDetail(scope) {
this.$router.push({name: "orderdetail", params: {id: scope.row.id},})

View File

@ -49,6 +49,9 @@
</el-table-column>
<el-table-column label="生产数量" >
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column>
<el-table-column label="状态" width="110">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column>
<el-table-column label="计划开工时间" >
<template slot-scope="scope">{{ scope.row.start_date }}</template>
@ -88,6 +91,16 @@ export default {
productionplan:"",
orderdetail:"",
state_: {
10: "制定中",
20: "已下达",
30: "已接受",
40: "生产中",
50: "已完成",
60: "军检完成",
70: "暂停",
80: "终止",
},
};
},

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增销售发货</el-button
<el-button
v-if="checkPermission(['sale_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增销售发货
</el-button>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -17,15 +22,17 @@
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>
@ -40,80 +47,71 @@
>
<el-table-column type="index" width="50"/>
<el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.product">{{
scope.row.product_.name
}}</template>
<template slot-scope="scope" v-if="scope.row.product">
{{scope.row.product_.name}}
</template>
</el-table-column>
<el-table-column label="产品型号" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.product">{{
scope.row.product_.specification
}}</template>
<template slot-scope="scope" v-if="scope.row.product">
{{scope.row.product_.specification}}
</template>
</el-table-column>
<el-table-column label="客户名称" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.customer">{{
scope.row.customer_.name
}}</template>
<template slot-scope="scope" v-if="scope.row.customer">
{{scope.row.customer_.name}}
</template>
</el-table-column>
<el-table-column label="订单编号" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.order">{{
scope.row.order_.number
}}</template>
<template slot-scope="scope" v-if="scope.row.order">
{{scope.row.order_.number }}
</template>
</el-table-column>
<el-table-column label="合同名称" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.order_">{{
scope.row.order_.contract_.name
}}</template>
<template slot-scope="scope" v-if="scope.row.order_">
{{scope.row.order_.contract_.name}}
</template>
</el-table-column>
<el-table-column label="预计发货时间">
<template slot-scope="scope">{{ scope.row.edelivery_date }}</template>
<el-table-column label="预计发货时间" prop="edelivery_date">
</el-table-column>
<el-table-column label="预计发货数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="预计发货数量" prop="count">
</el-table-column>
<el-table-column label="实际发货数量">
<template slot-scope="scope">{{ scope.row.count_real }}</template>
<el-table-column label="实际发货数量" prop="count_real">
</el-table-column>
<el-table-column label="是否审核">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_audited == false"></el-tag>
<el-tag v-else></el-tag></template
>
<el-tag v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="收货人">
<template slot-scope="scope">{{ scope.row.receiver }}</template>
<el-table-column label="收货人" prop="receiver">
</el-table-column>
<el-table-column label="收货人电话">
<template slot-scope="scope">{{ scope.row.receiver_phone }}</template>
<el-table-column label="收货人电话" prop="receiver_phone">
</el-table-column>
<el-table-column label="收货人地址" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.receiver_address
}}</template>
<el-table-column label="收货人地址" prop="receiver_address" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_delete'])"
v-if="checkPermission(['sale_create'])"
type="primary"
@click="handleDetail(scope)"
>详情</el-link
>
详情
</el-link>
<el-link
v-if="scope.row.is_audited == false"
v-if="checkPermission(['sale_hear'])&&scope.row.is_audited == false"
type="primary"
@click="handleAudit(scope)"
>审核</el-link
>
审核
</el-link>
<el-link
v-if="scope.row.is_audited == false"
v-if="checkPermission(['sale_delete'])&&scope.row.is_audited == false"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -139,10 +137,10 @@
>
<el-form-item label="关联订单" prop="name">
<el-select
style="width: 100%"
v-model="sale.order"
@change="selectorder"
style="width: 100%"
placeholder="请选择"
@change="selectorder"
>
<el-option
v-for="item in orderoptions"
@ -155,12 +153,11 @@
</el-form-item>
<el-form-item label="关联客户" prop="customer">
<el-select
style="width: 100%"
v-model="sale.customer"
@change="selectcustomer"
style="width: 100%"
placeholder="请选择"
:disabled="show"
@change="selectcustomer"
>
<el-option
v-for="item in customeroptions"
@ -174,15 +171,14 @@
<el-form-item label="关联合同" prop="contract">
<el-input v-model="sale.contract" placeholder="关联合同" :disabled="edit"/>
</el-form-item>
<el-form-item label="所需产品" prop="product">
<el-select
ref="btn"
v-model="sale.product"
:disabled="show"
style="width: 100%"
v-model="sale.product"
@change="selectproduct"
placeholder="请选择"
ref="btn"
@change="selectproduct"
>
<el-option
v-for="item in materialoptions"
@ -193,46 +189,41 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="选择产品" prop="iproducts">
<el-table
ref="multipleTable"
:data="iproductoptions"
border
fit
stripe
highlight-current-row
ref="multipleTable"
height="200"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" width="50"/>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="成品编号" prop="number">
</el-table-column>
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column label="成品批次" prop="batch">
</el-table-column>
<el-table-column label="成品名称">
<template slot-scope="scope">{{
scope.row.material_.name
}}</template>
<template slot-scope="scope">
{{scope.row.material_.name}}
</template>
</el-table-column>
<el-table-column label="所在仓库">
<template slot-scope="scope">{{
scope.row.warehouse_.name
}}</template>
<template slot-scope="scope">
{{scope.row.warehouse_.name}}
</template>
</el-table-column>
<el-table-column label="是否已军检">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
<el-tag v-else>已军检</el-tag></template
>
<el-tag v-else>已军检</el-tag>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="预计发货时间" prop="edelivery_date">
<el-date-picker
v-model="sale.edelivery_date"
@ -295,12 +286,13 @@ import {
deleteSale,
getSale,
saleAudit,
getCustomer
getCustomer,
updateContract
} from "@/api/sam";
import checkPermission from "@/utils/permission";
import {getMaterialList} from "@/api/mtm";
import {getiproductList} from "@/api/inm";
import { genTree } from "@/utils";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaulteSale = {
order: null,
@ -386,13 +378,11 @@ export default {
if (response.data) {
this.show = true;
this.sale.customer = response.data.customer;
this.sale.product = response.data.product;
this.sale.contract = response.data.contract_.name;
this.sale.receiver = response.data.customer_.contact;
this.sale.receiver_phone = response.data.customer_.contact_phone;
this.sale.receiver_address = response.data.customer_.address;
getiproductList({
page: 0,
to_order: response.data.id,
@ -405,18 +395,17 @@ export default {
}
});
},
selectcustomer(selval)
{
selectcustomer(selval) {
getCustomer(selval).then((response) => {
if (response.data) {
this.sale.receiver = response.data.contact;
this.sale.receiver_phone = response.data.contact_phone;
this.sale.receiver_address = response.data.address;
}
});
},
getList() {
getSaleList(this.listQuery).then((response) => {
if (response.data) {
@ -424,13 +413,14 @@ export default {
}
});
},
//关联客户
getCustomerLists() {
getCustomerList({page: 0}).then((response) => {
this.customeroptions = response.data;
});
},
//选择产品
getMaterialList() {
getMaterialList({type: 1, page: 0}).then((response) => {
@ -467,6 +457,7 @@ export default {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
@ -474,6 +465,7 @@ export default {
};
this.getList();
},
handleCreate() {
this.sale = Object.assign({}, defaulteSale);
this.dialogType = "new";
@ -487,13 +479,14 @@ export default {
handleEdit(scope) {
this.sale = Object.assign({}, scope.row); // copy obj
console.log(this.sale);
// console.log(this.sale);
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].resetFields();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -506,7 +499,7 @@ export default {
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
@ -526,7 +519,6 @@ export default {
this.$refs.multipleTable.selection.forEach((item) => {
this.iproducts.push(item.id);
});
this.sale.iproducts = this.iproducts;
createSale(this.sale).then((res) => {
if (res.code >= 200) {
@ -549,7 +541,6 @@ export default {
//审核
handleAudit(scope) {
this.$confirm("确认审核?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
@ -561,13 +552,9 @@ export default {
this.$message.success("审核成功!");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
},
};
</script>
@ -575,6 +562,7 @@ export default {
.trdiv >>> .el-transfer-panel {
width: 350px;
}
.trdiv >>> .el-transfer__buttons {
width: 110px;
}

View File

@ -26,7 +26,7 @@
{{ salesdetail.order_.number }}
</el-descriptions-item>
<el-descriptions-item label="物流详情" v-if="ship_pic!=''">
<el-link :href="salesdetail.ship_pic">物流单</el-link></el-descriptions-item>
<el-link type="primary" :href="salesdetail.ship_pic">物流单</el-link></el-descriptions-item>
</el-descriptions>
<el-button type="primary" style="margin-top:10px" @click="upload">上传物流信息</el-button>
</el-card>
@ -76,7 +76,7 @@
<el-table-column label="装箱单号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.packnum }}</template>
</el-table-column>
<el-table-column label="未装箱说明" show-overflow-tooltip>
<el-table-column label="备注" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.remark }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
@ -295,6 +295,7 @@ export default {
},
handleUpSuccess(res, file, filelist) {
this.ship.path = res.data.path;
this.salesdetail.ship_pic=res.data.path;
console.log(this.ship.path)
},
handleRemove(file, filelist){

View File

@ -2,6 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button
v-if="checkPermission(['workflow_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增
</el-button>
<el-input
v-model="listQuery.search"
placeholder="名称"
@ -14,18 +22,17 @@
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
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
重置
</el-button>
</div>
</el-card>
<el-card style="margin-top: 2px">
@ -39,19 +46,16 @@
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="名称">
<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">{{ scope.row.description }}</template>
<el-table-column label="描述" prop="description">
</el-table-column>
<el-table-column label="工单查看权限校验">
<template slot-scope="scope">
{{ !!(scope.row.view_permission_check)?'':'' }}
</template>
</el-table-column>
<el-table-column width="180" label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
<el-table-column width="180" prop="create_time" label="创建时间">
</el-table-column>
<el-table-column
align="center"
@ -62,24 +66,36 @@
<el-link
v-if="checkPermission(['workflow_update'])"
@click="handlecfgt(scope)"
>配置</el-link>
>
配置
</el-link>
<el-link
v-if="checkPermission(['workflow_update'])"
@click="handleEdit(scope)"
>编辑</el-link>
>
编辑
</el-link>
<el-link
v-if="checkPermission(['workflow_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
>
删除
</el-link>
<el-link
v-if="checkPermission(['workflow_update'])"
type="primary"
@click="handleTicket(scope)"
>查看工单</el-link>
>
查看工单
</el-link>
<el-link
v-if="checkPermission(['workflow_update'])"
type="primary"
@click="handleWatch(scope)"
>查看流程图</el-link>
>
查看流程图
</el-link>
</template>
</el-table-column>
</el-table>
@ -116,7 +132,8 @@
:model="workflow"
label-width="100px"
label-position="right"
:rules="rule1">
:rules="rule1"
>
<el-form-item label="名称" prop="name">
<el-input v-model="workflow.name" placeholder="名称"/>
</el-form-item>
@ -125,9 +142,9 @@
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input
v-model="workflow.description"
type="textarea"
:rows="4"
v-model="workflow.description"
placeholder="描述"
/>
</el-form-item>
@ -162,12 +179,21 @@
</template>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
import { getWfTransitionList,getWorkflowList, createWorkflow,updateWorkflow,deleteWorkflow,getWfCustomfieldList,getWfStateList } from "@/api/workflow";
import {
getWfTransitionList,
getWorkflowList,
createWorkflow,
updateWorkflow,
deleteWorkflow,
getWfCustomfieldList,
getWfStateList
} from "@/api/workflow";
import checkPermission from "@/utils/permission";
// import vueJsonEditor from 'vue-json-editor'
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import dagreD3 from 'dagre-d3'
import * as d3 from 'd3'
const defaultworkflow = {
name: "",
number: "",
@ -227,10 +253,12 @@ export default {
this.listLoading = false;
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
@ -238,6 +266,7 @@ export default {
}
this.getList();
},
handleCreate() {
this.workflow = Object.assign({}, defaultworkflow);
this.dialogType = "new";
@ -246,6 +275,7 @@ export default {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.workflow = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
@ -257,13 +287,13 @@ export default {
if (response.data) {
this.choiceOption = response.data;
}
});
},
handlecfgt(scope)
{
handlecfgt(scope) {
this.$router.push({name: "configuration", params: {workflow: scope.row.id}})
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -279,13 +309,13 @@ export default {
console.error(err);
});
},
handleTicket(scope) {
this.$router.push({name: "workFlowTickets", params: {workflow: scope.row.id}})
},
async confirm(form) {
debugger;
console.log(this.workflow.display_form_str)
async confirm(form) {
// console.log(this.workflow.display_form_str)
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
@ -315,6 +345,7 @@ export default {
}
});
},
handleWatch(scope) {
let that = this;
let workFlow = scope.row.id;
@ -359,7 +390,11 @@ export default {
transitionList.forEach((transition0) => {
if (transition0.condition_expression.length > 0) {
debugger;
g.setNode(transition0.source_state_.id+100000, {label: "条件表达式",style: "stroke: #000;fill: #afa", shape: "diamond"});
g.setNode(transition0.source_state_.id + 100000, {
label: "条件表达式",
style: "stroke: #000;fill: #afa",
shape: "diamond"
});
g.setEdge(transition0.source_state_.id, transition0.source_state_.id + 100000, {
// 边标签
label: transition0.name,
@ -392,7 +427,8 @@ export default {
let svgGroup = svg.append('g');
// 在绘图容器上运行渲染器生成流程图.
render(d3.select("svg g"), g);
}else{}
} else {
}
});
}
@ -400,9 +436,11 @@ export default {
})
},
closeMark() {
this.limitedWatch = false;
},
onJsonChange(value) {
// console.log('更改value:', value);
// 实时保存
@ -427,6 +465,7 @@ export default {
onError1(value) {
this.hasJsonFlag1 = false
},
// 检查json
checkJson() {
if (this.hasJsonFlag == false) {
@ -437,6 +476,7 @@ export default {
return true
}
},
// 检查json
checkJson2() {
if (this.hasJsonFlag1 == false) {
@ -454,16 +494,19 @@ export default {
::-webkit-scrollbar {
width: 15px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
background-color: #fefefe;
border-radius: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 7px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5);
background-color: #f5f5f5;
}
.svgMark {
width: 100%;
height: 100%;
@ -477,6 +520,7 @@ export default {
z-index: 2000;
background: rgba(0, 0, 0, .3);
}
.svgWrapper {
background: #fff;
width: 800px;
@ -486,6 +530,7 @@ export default {
max-height: 80vh;
overflow-y: scroll;
}
.svgItem {
padding: 20px 40px 0;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
@ -493,22 +538,27 @@ export default {
display: flex;
justify-content: space-between;
}
svg {
font-size: 14px;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
g.conditions > rect {
fill: #00ffd0;
stroke: #000;
}
.el-icon-close {
cursor: pointer;
}

View File

@ -2,7 +2,22 @@
<div class="app-container">
<el-card style="margin-bottom: 10px">
<div>
<el-select v-model="pageForm.workflow" placeholder="工作流" clearable style="width: 200px" class="filter-item" @change="handleFilter">
<el-button
v-if="checkPermission(['ticket_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增
</el-button>
<el-select
v-model="pageForm.workflow"
placeholder="工作流"
clearable
style="width: 200px"
class="filter-item"
@change="handleFilter"
>
<el-option
v-for="item in workflows"
:key="item.id"
@ -15,39 +30,42 @@
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button>
>
重置
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
>
搜索
</el-button>
</div>
</el-card>
<el-tabs v-model="pageForm.category" type="border-card" @tab-click="handleClick">
<el-tab-pane label="待处理" name="duty">
<el-card>
<el-tabs v-model="pageForm.category" type="card" @tab-click="handleClick">
<el-tab-pane label="待处理" name="duty"></el-tab-pane>
<el-tab-pane label="我处理" name="worked"></el-tab-pane>
<el-tab-pane label="我发起" name="owner"></el-tab-pane>
<el-tab-pane label="抄送我" name="cc"></el-tab-pane>
</el-tabs>
<el-table
v-loading="listLoading"
:data="tickets"
border fit stripe
border
fit
stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 100}"
v-el-height-adaptive-table="{bottomOffset: 80}"
>
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
<el-tag>{{states[scope.row.act_state]}}</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="100">
@ -57,21 +75,71 @@
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
<template slot-scope="scope">
{{scope.row.workflow_.name}}
</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link v-if="scope.row.state_.distribute_type==1&&scope.row.participant_type==2" type="danger" @click="handleGetTicket(scope)">接单</el-link>
<el-link v-else-if="(scope.row.act_state==1||scope.row.act_state==3)&&scope.row.participant_type!==2&&scope.row.state_.type===0" type="primary" @click="handleDetail(scope)">处理</el-link>
<el-link v-if="scope.row.state_.type==1&&userId==1" type="danger" @click="handleClose(scope,'2')">关闭</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])&&scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
type="danger"
@click="handleGetTicket(scope)"
>
接单
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])&&(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.participant_type!==2&&scope.row.state_.type===0"
type="primary"
@click="handleDetail(scope)"
>
处理
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])&&scope.row.state_.type===1&&userId===1"
type="danger"
@click="handleClose(scope,'2')"
>
关闭
</el-link>
<!--如果state_.retreat为可退回则显示撤回按钮 state_.type==1处于草稿状态 -->
<el-link v-if="scope.row.state_.enable_retreat&&userId==scope.row.create_by&&scope.row.state_.type!==1" type="danger" @click="handleClose(scope,'1')">撤回</el-link>
<el-link type="primary" @click="handleDetails(scope)">详情</el-link>
<el-link type="success" @click="handleDelete(scope)">删除</el-link>
<el-link type="success" @click="handlePicture(scope)">查看流程图</el-link>
<el-link type="success" @click="handleLogs(scope)">工单日志</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])&&scope.row.state_.enable_retreat&&userId===scope.row.create_by&&scope.row.state_.type!==1"
type="danger"
@click="handleClose(scope,'1')"
>
撤回
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])"
type="primary"
@click="handleDetails(scope)"
>
详情
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])"
type="success"
@click="handleDelete(scope)"
>
删除
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])"
type="success"
@click="handlePicture(scope)"
>
查看流程图
</el-link>
<el-link
v-if="checkPermission(['ticket_handle'])"
type="success"
@click="handleLogs(scope)"
>
工单日志
</el-link>
</template>
</el-table-column>
</el-table>
@ -81,150 +149,7 @@
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="我处理" name="worked">
<el-table :data="tickets"
border fit stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 60}">
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.state_.type==0">{{scope.row.state_.name}}</span>
<span v-else>{{scope.row.state_.name}}</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<!-- <el-link v-if="scope.row.state_.distribute_type==1&&scope.row.participant_type==2" type="danger" @click="handleGetTicket(scope)">接单</el-link>
<el-link v-else-if="(scope.row.act_state==1||scope.row.act_state==3)&&scope.row.participant_type!==2&&scope.row.state_.type===0" type="primary" @click="handleDetail(scope)">处理</el-link>
-->
<el-link v-if="scope.row.state_.type==1&&userId==1" type="danger" @click="handleClose(scope,'2')">关闭</el-link>
<el-link type="primary" @click="handleDetails(scope)">详情</el-link>
<el-link type="success" @click="handlePicture(scope)">查看流程图</el-link>
<el-link type="success" @click="handleLogs(scope)">工单日志</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="我发起" name="owner">
<el-table :data="tickets"
border fit stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 60}">
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.state_.type==0">{{scope.row.state_.name}}</span>
<span v-else>{{scope.row.state_.name}}</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope" v-if="scope.row.state_">
<el-link v-if="scope.row.state_.enable_retreat&&scope.row.state_.type!==1" type="danger" @click="handleClose(scope,'1')">撤回</el-link>
<el-link v-if="scope.row.state_.type==1" type="danger" @click="handleClose(scope,'2')">关闭</el-link>
<el-link type="primary" @click="handleDetails(scope)">详情</el-link>
<el-link type="success" @click="handleDelete(scope)">删除</el-link>
<el-link type="success" @click="handlePicture(scope)">查看流程图</el-link>
<el-link type="success" @click="handleLogs(scope)">工单日志</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="抄送我" name="cc">
<el-table :data="tickets"
border fit stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 60}">
<el-table-column label="工单标题" min-width="100" prop="title">
</el-table-column>
<el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
</template>
</el-table-column>
<el-table-column label="进行状态" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.state_.type==0">{{scope.row.state_.name}}</span>
<span v-else>{{scope.row.state_.name}}</span>
</template>
</el-table-column>
<el-table-column label="类型" min-width="100">
<template slot-scope="scope">{{ scope.row.workflow_.name }}</template>
</el-table-column>
<el-table-column label="创建时间" min-width="100" prop="create_time">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link type="primary" @click="handleDetails(scope)">详情</el-link>
<el-link type="danger" @click="handlePicture(scope)">查看流程图</el-link>
<el-link type="success" @click="handleLogs(scope)">工单日志</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="pageForm.page"
:limit.sync="pageForm.page_size"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</el-card>
<div class="svgMark" v-if="dialogVisible" @click="closeMark">
<div class="svgWrapper">
<div class="svgItem">工单流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div>
@ -237,14 +162,17 @@
</el-col>
</el-row>
<el-steps :active="actives" spac="400px" align-center="" style="padding-top: 20px;">
<el-step :title="item.name" v-for="item in flowSteps " :key="item.id">
<el-step
v-for="item in flowSteps "
:key="item.id"
:title="item.name"
>
</el-step>
</el-steps>
<div style="width: 90%;margin: auto;">
<svg height=1000 id="mySvg" style="width:100%!important;">
</svg>
</div>
</div>
</div>
<el-dialog :visible.sync="limitedRetreat" :title="handleTitle">
@ -283,7 +211,8 @@
<el-input v-model="item.default_value" :placeholder="item.description"/>
</template>
<template v-if="item.field_type==='int'">
<el-input v-model="item.default_value" type="number" :placeholder="item.description" oninput="value=value.replace(/[^\d]/g,'')" />
<el-input v-model="item.default_value" type="number" :placeholder="item.description"
oninput="value=value.replace(/[^\d]/g,'')"/>
</template>
<template v-if="item.field_type==='float'">
<el-input v-model="item.default_value" type="number" :placeholder="item.description"/>
@ -356,26 +285,20 @@
</div>
</el-dialog>
<el-dialog :visible.sync="limitedFlowLogs" title="工单日志">
<el-table :data="floeLogs" fit stripe
<el-table
:data="floeLogs"
fit
stripe
style="width: 100%;border-top:1px solid #EBEEF5;"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 60}">
v-el-height-adaptive-table="{bottomOffset: 60}"
>
<el-table-column label="工单标题" min-width="100">
<template slot-scope="scope" v-if="scope.row.ticket_data">
<span>{{scope.row.ticket_data.title}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="当前状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
</template>
</el-table-column>-->
<el-table-column label="进行状态" min-width="100">
<template slot-scope="scope" v-if="scope.row.state_">
<span v-if="scope.row.state_.type==0">{{scope.row.state_.name}}</span>
@ -396,11 +319,28 @@
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
import {upUrl, upHeaders} from "@/api/file";
import {getWorkflowList,getWfCustomfieldList,createTicket,getWfStateList,getTickets,ticketAccpet,getWfTransitionList,
ticketHandle,getWfFlowSteps,getTicketDetail,getTicketTransitions,getTicketFlowlog,ticketRetreat,ticketClose,ticketDestory} from "@/api/workflow";
import checkPermission from "@/utils/permission";
import {
getWorkflowList,
getWfCustomfieldList,
createTicket,
getWfStateList,
getTickets,
ticketAccpet,
getWfTransitionList,
ticketHandle,
getWfFlowSteps,
getTicketDetail,
getTicketTransitions,
getTicketFlowlog,
ticketRetreat,
ticketClose,
ticketDestory
} from "@/api/workflow";
import Pagination from "@/components/Pagination";
import dagreD3 from 'dagre-d3'
import * as d3 from 'd3'
export default {
name: "ticket",
components: {Pagination},
@ -458,8 +398,15 @@
rule1: {
title: [{required: true, message: "请输入", trigger: "blur"}],
workflow: [{required: true, message: "选择", trigger: "blur"}]
}
,
},
states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
}
},
mounted() {
@ -474,6 +421,8 @@
this.getWorkFlow();
},
methods: {
checkPermission,
getList() {
this.listLoading = true;
getTickets(this.pageForm).then((res) => {
@ -660,7 +609,8 @@
this.limitedRetreat = true;
this.retreatId = scope.row.id;
},
handleLogs(){},
handleLogs() {
},
handlePicture(scope) {
let that = this;
that.dialogVisible = true;
@ -684,7 +634,8 @@
})
that.sort = dat[0].sort;
that.actives = that.flowSteps.indexOf(dat[0]);
if( that.flowSteps.length-that.actives >1){}else{
if (that.flowSteps.length - that.actives > 1) {
} else {
that.actives = that.flowSteps.length;
}
var g = new dagreD3.graphlib.Graph().setGraph({
@ -741,7 +692,11 @@
debugger;
console.log(transition0.condition_expression.length)
if (transition0.condition_expression.length > 0) {
g.setNode(transition0.source_state_.id+100000, {label: "条件表达式", style: "fill: #a4d088", shape: "diamond"});
g.setNode(transition0.source_state_.id + 100000, {
label: "条件表达式",
style: "fill: #a4d088",
shape: "diamond"
});
g.setEdge(transition0.source_state_.id, transition0.source_state_.id + 100000, {
// 边标签
label: transition0.name,
@ -821,7 +776,8 @@
}
})
}else{}
} else {
}
});
}
});
@ -908,7 +864,8 @@
})
})
},
stepclick(){},
stepclick() {
},
closeMark() {
this.dialogVisible = false;
}
@ -920,16 +877,19 @@
::-webkit-scrollbar {
width: 15px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
background-color: #fefefe;
border-radius: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 7px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5);
background-color: #f5f5f5;
}
.svgMark {
width: 100%;
height: 100%;
@ -943,6 +903,7 @@
z-index: 2000;
background: rgba(0, 0, 0, .3);
}
.svgWrapper {
background: #fff;
width: 800px;
@ -952,6 +913,7 @@
max-height: 80vh;
overflow-y: scroll;
}
.svgItem {
padding: 20px 40px 0;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
@ -959,25 +921,31 @@
display: flex;
justify-content: space-between;
}
svg {
font-size: 14px;
}
.node rect {
stroke: #606266;
fill: #fff;
}
.edgePath path {
stroke: #606266;
fill: #333;
stroke-width: 1.5px;
}
.el-icon-close {
cursor: pointer;
}
.listItem {
margin-top: 15px;
font-size: 16px;
}
.listItem > span {
width: 100px;
text-align: right;
@ -986,7 +954,6 @@
}
.tooltip {
position: absolute;
font-size: 12px;
@ -1004,10 +971,12 @@
.tooltip > div {
padding: 10px;
}
.node rect {
stroke: #333;
fill: #999;
}
.node {
cursor: pointer;
}

View File

@ -63,21 +63,21 @@
>
<template slot-scope="scope">
<el-link
v-if="scope.row.first_test===null"
v-if="checkPermission(['first_test'])&&scope.row.first_test===null"
type="primary"
@click="handleTest(scope)"
>
首件检验
</el-link>
<el-link
v-else-if="scope.row.first_test!==null&&!scope.row.first_test_.is_submited"
v-else-if="checkPermission(['first_test'])&&scope.row.first_test!==null&&!scope.row.first_test_.is_submited"
type="primary"
@click="handleTestContinue(scope)"
>
检验
</el-link>
<el-link
v-else-if="scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
v-else-if="checkPermission(['first_audit'])&&scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
type="primary"
@click="handleSelectclick(scope,'0')"
>
@ -291,12 +291,14 @@
}
});
},
//工序转换
changeIndex(item,index) {
this.activeIndex = index;
this.listQuery.process = item.id;
this.getTableData();
},
//获取table数据
getTableData() {
this.listLoading = true;
@ -309,8 +311,12 @@
this.listLoading = false;
});
},
//分页
getsList(){},
getsList(){
this.getTableData
},
//第一次点击首件检验
handleTest(scope){
let that = this;
@ -331,6 +337,7 @@
}
});
},
//首件审批
handleSelectclick(scope,index){
let that = this;
@ -362,6 +369,7 @@
});
})
},
//选择物料检查表
recordFormChange() {
let that = this;
@ -370,6 +378,7 @@
});
that.formName = arr[0].name;
},
//根据选择的表渲染检查项目
selectedRecordForm() {
let that = this;
@ -396,40 +405,27 @@
});
} else this.$message.error("请选择检查表!");
},
//第一次保存提交检查项目
recordCancel() {
this.recordVisible = false;
this.listVisible = false;
this.getTableData();
},
/*关闭相机*/
closeCamera () {
this.$refs.faceTracking.closeCamera();
let video = document.getElementById('video');
let stream = video.srcObject;
console.log(stream);
// console.log(stream);
let tracks = stream.getTracks();
tracks.forEach(track => {
track.stop()
});
video.srcObject = null;
/*let firstTestIndex = sessionStorage.getItem('firstTestIndex');
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
if(firstTestIndex){
sessionStorage.removeItem('firstTestIndex');
sessionStorage.setItem('firstTestIndex',this.activeIndex);
}else{
sessionStorage.setItem('firstTestIndex',this.activeIndex);
}
if(firstTestProcess){
sessionStorage.removeItem('firstTestProcess');
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
}else{
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
}
this.reload();*/
// this.thisVideo.srcObject.getTracks()[0].stop();
},
//保存首件检查
recordSave(value) {
let that = this;
@ -445,10 +441,10 @@
that.$message.error(res.msg)
}
}).catch((err) => {
// console.error(err);
that.$message.error(err)
});
},
//提交首件检查
recordSubmit(value) {
let that = this;
@ -471,6 +467,7 @@
that.$message.error(err);
});
},
//再次点击首件检验
handleTestContinue(scope) {
let that = this;
@ -508,11 +505,13 @@
}
});*/
},
//点击人脸验证
directorConfirm(index){
this.leader = index;
this.limitedPhoto = true;
},
//获取人脸数据
getMsgFormSon(data){
let that =this;
@ -553,25 +552,7 @@
},
},
mounted() {
debugger;
this.getProcessList();
/*let that = this;
let activeIndex = sessionStorage.getItem('firstTestIndex');
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
if(activeIndex&&firstTestProcess){
this.activeIndex = parseInt(activeIndex);
this.listQuery.process = parseInt(firstTestProcess);
sessionStorage.removeItem('firstTestIndex');
sessionStorage.removeItem('firstTestProcess');
this.getTableData();
getProcessList({page: 0}).then((response) => {
if (response.data) {
that.processOption = response.data;
}
});
}else{
this.getProcessList();
}*/
},
}
</script>

View File

@ -15,14 +15,16 @@
type="primary"
icon="el-icon-search"
@click="handleFilter1"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter1"
>重置
>
重置
</el-button>
<el-table
v-loading="listLoading"
@ -38,15 +40,12 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="半成品编号" prop="number">
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="检测状态"
>
<el-table-column label="检测状态">
<template slot-scope="scope">
{{ actstate_[scope.row.act_state] }}
</template>
@ -54,31 +53,34 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
filter-placement="bottom-end">
filter-placement="bottom-end"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
v-if="checkPermission(['wp_test_init'])&&scope.row.test===null"
@click="handleInspection(scope,'1')"
>检验
>
检验
</el-link>
<el-link
v-if="scope.row.test!==null"
@click="checkRecord(scope,'1')"
>检验记录
>
检验记录
</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_scrap'])"
type="danger"
@click="handleScrapbcp(scope)"
>报废
>
报废
</el-link>
</template>
</el-table-column>
@ -129,22 +131,22 @@
type="primary"
icon="el-icon-search"
@click="handleFilter2"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter2"
>重置
>
重置
</el-button>
<el-table
:data="wproductList2.results"
border
fit
stripe
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
@ -153,7 +155,6 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -168,18 +169,17 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序"
:filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
v-if="checkPermission(['wp_test_init'])&&scope.row.test===null"
@click="handleInspection(scope,'2')"
>检验
</el-link>
@ -217,26 +217,26 @@
type="primary"
icon="el-icon-search"
@click="handleFilter3"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter3"
>重置
>
重置
</el-button>
<el-table
:data="wproductList1.results"
ref="multipleTable"
:data="wproductList1.results"
border
fit
stripe
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column
type="selection"
@ -246,9 +246,7 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="半成品编号" prop="number">
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
@ -261,26 +259,26 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序"
:filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_putins'])"
@click="handlePutin(scope)"
>入库
>
入库
</el-link>
<el-link
v-if="scope.row.test!==null"
@click="checkRecord(scope)"
>检验记录
>
检验记录
</el-link>
</template>
</el-table-column>
@ -308,17 +306,18 @@
type="primary"
icon="el-icon-search"
@click="handleFilter4"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter4"
>重置
>
重置
</el-button>
<el-table
:data="wproductList4.results"
border
fit
@ -331,7 +330,6 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -343,11 +341,11 @@
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column label="不合格标记">
@ -361,14 +359,14 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wmaterial_scrap'])"
type="danger"
@click="handleScrap(scope)"
>
报废
</el-link>
<el-link
v-if="!scope.row.ticket"
v-if="checkPermission(['operation_hear'])&&!scope.row.ticket"
type="primary"
@click="handleRetrial(scope)"
>
@ -389,7 +387,6 @@
<el-tab-pane label="夹层半成品" name="5">
<el-card style="margin-top: 2px">
<el-table
:data="wproductList3.results"
border
fit
@ -416,16 +413,17 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]" :filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="scope.row.test===null"
v-if="scope.row.test===null&&checkPermission(['wp_test_init'])"
@click="handleInspection(scope,'3')"
>检验
</el-link>
@ -458,40 +456,6 @@
>
</el-option>
</el-select>
<!-- &lt;!&ndash;第一次操作时的展示&ndash;&gt;
<el-dialog
width="60%"
:title="formName"
:visible.sync="innerVisible"
append-to-body
>
<customForm
:results="fieldList"
:hasPicture="hasPicture"
:formID="recordform"
:wproduct="wproduct"
:recordId="recordId"
@recordSubmit="recordSubmit"
@recordSave="recordSave"
/>
</el-dialog>
&lt;!&ndash;复检检验表单&ndash;&gt;
<el-dialog
width="60%"
:title="formName"
:visible.sync="limitedReview"
append-to-body
>
<reviewForm
:results="fieldList"
:originList="originList"
:formID="recordform"
:hasPicture="hasPicture"
:wproduct="wproduct"
:origintest="origintest"
@formFunc="formFunc"
/>
</el-dialog>-->
<div slot="footer" class="dialog-footer">
<el-button @click="outerVisible = false">
@ -602,18 +566,22 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="!scope.row.is_submited"
v-if="checkPermission(['wp_test_init'])&&!scope.row.is_submited"
@click="handleInspectionRecord(scope)"
>检验
>
检验
</el-link>
<el-link
v-else
v-if="scope.row.is_submited"
@click="handleRecordDetail(scope)"
>查看
>
查看
</el-link>
<el-link
v-if="checkPermission(['wp_test_init'])"
@click="delTestRecord(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -924,6 +892,10 @@
},
WarehouseData: "",
formName: '项目检查表',
filtersList: [{text: '切割', value: '切割'}, {text: '磨边', value: '磨边'},
{text: '清洗', value: '清洗'}, {text: '热弯成型', value: '热弯成型'}, {text: '化学钢化', value: '化学钢化'},
{text: '镀膜', value: '镀膜'}, {text: '断膜', value: '断膜'}, {text: '汇流条制备', value: '汇流条制备'},
{text: '夹层', value: '夹层'}, {text: '包边', value: '包边'}]
};
},
computed: {},
@ -952,7 +924,6 @@
} else if (tab.name == 5) {
this.getList3();
}
},
//待检半成品列表
getList() {
@ -965,37 +936,38 @@
this.listLoading = false;
});
},
handleFilter1() {
this.listQuery.page = 1;
this.getList();
},
resetFilter1() {
resetFilter1() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
//待检半成品报废
handleScrapbcp(scope) {
this.dialogFormVisiblebcp = true;
this.bcpbf = scope.row.id;
},
//确定报废半成品
scrapesubmit() {
console.log(this.formbcp);
// console.log(this.formbcp);
scrap(this.bcpbf, this.formbcp).then((response) => {
if (response.code >= 200) {
this.$message.success("该半成品已报废!");
this.dialogFormVisiblebcp = false;
this.getList();
}
});
},
//复检半成品列表
getList2() {
this.listQuery2.act_state = 6;
@ -1005,18 +977,20 @@
}
});
},
handleFilter2() {
this.listQuery2.page = 1;
this.getList2();
},
resetFilter2() {
resetFilter2() {
this.listQuery2 = {
page: 1,
page_size: 20,
};
this.getList2();
},
//已合格半成品
getList1() {
this.listQuery1.act_state = 30;
@ -1025,21 +999,22 @@
if (response.data) {
this.wproductList1 = response.data;
}
});
},
handleFilter3() {
this.listQuery1.page = 1;
this.getList1();
},
resetFilter3() {
resetFilter3() {
this.listQuery1 = {
page: 1,
page_size: 20,
};
this.getList1();
},
//不合格半成品
getList4() {
this.listQuery4.act_state = 50;
@ -1048,21 +1023,22 @@
if (response.data) {
this.wproductList4 = response.data;
}
});
},
handleFilter4() {
this.listQuery4.page = 1;
this.getList4();
},
resetFilter4() {
resetFilter4() {
this.listQuery4 = {
page: 1,
page_size: 20,
};
this.getList4();
},
//不合格半成品报废
handleScrap(scope) {
this.$confirm("确认该半成品报废?", "警告", {
@ -1076,9 +1052,10 @@
this.$message.success("该半成品已报废!");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//不合格产品重审展示
handleRetrial(scope) {
let that = this;
@ -1111,13 +1088,13 @@
if (that.customfieldList[i].label === "deptSelect") {
that.customfieldList[i].field_choice = that.orgList;
}
}
}
});
that.limitedRetrial = true;
})
},
//不合格产品重审提交
retrialSubmit() {
let that = this;
@ -1137,10 +1114,12 @@
}
});
},
//筛选
filterTag(value, row) {
return row.step_.name === value;
},
//夹层半成品列表
getList3() {
this.listQuery3.act_state = 26;
@ -1150,11 +1129,13 @@
}
});
},
//半成品批量入库
handleCreate() {
this.dialogFormVisibles = true;
this.getWarehouseLists();//仓库
},
//批量入库
putins() {
let _this = this;
@ -1174,6 +1155,7 @@
}
});
},
//仓库列表
getWarehouseLists() {
getWarehouseList({page: 0}).then((response) => {
@ -1182,6 +1164,7 @@
}
});
},
//点击检验:如果有一个直接进入如果有多个表再进行选择
handleInspection(scope, index) {
//调该物料对应的检查表
@ -1211,6 +1194,7 @@
}
});
},
//选择物料检查表
recordformChange() {
let that = this;
@ -1219,6 +1203,7 @@
});
that.formName = arr[0].name;
},
//检验记录
checkRecord(scope, index) {
let that = this;
@ -1233,6 +1218,7 @@
}
})
},
//点击记录里的检验
handleInspectionRecord(scope) {
let that = this;
@ -1282,7 +1268,6 @@
if (res.data) {
that.hasPicture = false;
let fieldList = res.data.record_data;
that.origintest = res.data.origin_test;
that.recordform = res.data.origin_test_.form;
let originList = res.data.origin_test_.record_data;
@ -1311,6 +1296,7 @@
})
}
},
//点击记录里的查看
handleRecordDetail(scope) {
let that = this;
@ -1325,6 +1311,7 @@
}
})
},
//半产品复检
handleReview() {
let that = this;
@ -1349,8 +1336,6 @@
}
that.fieldList.push(obj)
}
/*that.fieldList = [...fieldList];
that.originList = [...originList];*/
let arr = fieldList.filter(item => {
return item.field_type === 'draw'
});
@ -1377,7 +1362,6 @@
that.formName = res.data.form_.name;
let fieldList = res.data.record_data;
that.fieldList = [...fieldList];
debugger;
let arr = fieldList.filter(item => {
return item.field_type === 'draw'
});
@ -1403,6 +1387,7 @@
this.getWarehouseLists();//仓库
this.id = scope.row.id;//半成品id
},
putin() {
wproductPutin(this.id, this.form).then((res) => {
if (res.code >= 200) {
@ -1412,6 +1397,7 @@
}
});
},
delTestRecord(scope) {
let that = this;
this.$confirm("确认删除?", "警告", {
@ -1434,9 +1420,10 @@
});
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//更新检验记录列表
refreshRecord() {
let that = this;
@ -1448,6 +1435,7 @@
}
})
},
//保存检查项目
recordSave(value) {
let that = this;
@ -1468,9 +1456,10 @@
this.$message.error(res.msg)
}
}).catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//记录提交检查项目
recordSubmit(value) {
let that = this;
@ -1496,9 +1485,10 @@
this.$message.error(res.msg)
}
}).catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//第一次保存提交检查项目
recordCancel() {
this.recordVisible = false;
@ -1508,9 +1498,6 @@
this.getList1();
this.getList3();
},
pageRefresh() {
this.reload()
},
},
mounted() {
getUserList({page: 0}).then(response => {

View File

@ -1,15 +1,17 @@
<template>
<div class="app-container">
<el-card class="box-card">
<el-tabs @tab-click="handleClick" type="border-card">
<el-tabs
type="border-card"
@tab-click="handleClick"
>
<el-tab-pane
:key="item.name"
v-for="item in processOption"
:key="item.name"
:label="item.name"
:name="item.id"
:closable="item.close"
>
<el-table
:data="operationList.results"
border
@ -21,74 +23,73 @@
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="子工序工序">
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column label="是否提交">
<template slot-scope="scope">
<el-span v-if="scope.row.is_submited"></el-span>
<el-span v-else></el-span></template
>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="创建人">
<template slot-scope="scope">{{
scope.row.create_by_.username
}}</template>
<template slot-scope="scope">
{{scope.row.create_by_.username}}
</template>
</el-table-column>
<el-table-column label="过程记录表">
<template slot-scope="scope" v-if="scope.row.record_">
<el-tag v-for="item in scope.row.record_"
<template v-if="scope.row.record_" slot-scope="scope">
<el-tag
v-for="item in scope.row.record_"
:key="item.id"
:label="item.name"
:value="item.id">{{item.name}}</el-tag>
:value="item.id"
>
{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">
{{ scope.row.count_work }}
</template>
</el-table-column>
<el-table-column label="生产设备">
<template slot-scope="scope" v-if="scope.row.equip_">
<el-tag v-for="item in scope.row.equip_"
:key="item.id"
:label="item.number"
:value="item.id">{{item.number}}</el-tag>
:value="item.id">{{item.number}}
</el-tag>
</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="操作" width="100px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.is_submited"
v-if="checkPermission(['operation_create'])&&scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>前往查看</el-link>
>
前往查看
</el-link>
<el-link
v-else
v-if="checkPermission(['operation_create'])&&!scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>前往操作</el-link>
>
前往操作
</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['operation_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
@ -134,8 +135,7 @@ export default {
methods: {
checkPermission,
handleoperation(scope)
{
handleoperation(scope) {
this.$router.push({name: "operationdo", params: {id: scope.row.id},})
},
//大工序工序渲染
@ -144,15 +144,14 @@ handleoperation(scope)
if (response.data) {
this.processOption = response.data;
}
});
},
getList() {
getoperationList(this.listQuery).then((response) => {
if (response.data) {
this.operationList = response.data;
}
});
},
@ -177,7 +176,7 @@ getList(){
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},

View File

@ -14,9 +14,9 @@
>
<el-table-column type="index" width="50"/>
<el-table-column label="成品名称">
<template slot-scope="scope">{{
scope.row.material_.name
}}</template>
<template slot-scope="scope">
{{scope.row.material_.name}}
</template>
</el-table-column>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -33,17 +33,16 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="
checkPermission(['warehouse_update']) &&
scope.row.test === null
"
v-if="checkPermission(['wp_test_init']) &&scope.row.test === null"
@click="handleInspection(scope)"
>检验
>
检验
</el-link>
<el-link
v-if="scope.row.test !== null"
@click="checkRecord(scope)"
>检验记录
>
检验记录
</el-link>
</template>
</el-table-column>
@ -63,9 +62,9 @@
>批量入库
</el-button>
<el-table
ref="multipleTable"
v-loading="listLoading"
:data="wproductList1.results"
ref="multipleTable"
border
fit
stripe
@ -75,11 +74,10 @@
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" width="50"/>
<el-table-column label="成品名称">
<template slot-scope="scope">{{
scope.row.material_.name
}}</template>
<template slot-scope="scope">
{{scope.row.material_.name}}
</template>
</el-table-column>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -106,9 +104,10 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_putins'])"
@click="handlePutin(scope)"
>入库
>
入库
</el-link>
</template>
</el-table-column>
@ -143,12 +142,14 @@
>
</el-option>
</el-select>
<div slot="footer" class="dialog-footer">
<el-button @click="outerVisible = false"> </el-button>
<el-button type="primary" @click="submitrecordform()"
>填写检查项目</el-button
<el-button
type="primary"
@click="submitrecordform()"
>
填写检查项目
</el-button>
</div>
</el-dialog>
<!--检查表显示-->
@ -183,9 +184,9 @@
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
</el-table-column>
<el-table-column label="检查类型">
<template slot-scope="scope">{{
checkTypes[scope.row.type]
}}</template>
<template slot-scope="scope">
{{checkTypes[scope.row.type]}}
</template>
</el-table-column>
<el-table-column label="是否提交">
<template slot-scope="scope">
@ -196,11 +197,17 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="!scope.row.is_submited"
v-if="checkPermission(['wp_test_init'])&&!scope.row.is_submited"
@click="handleInspectionRecord(scope)"
>检验
>
检验
</el-link>
<el-link
v-if="scope.row.is_submited"
@click="handleRecordDetail(scope)"
>
查看
</el-link>
<el-link v-else @click="handleRecordDetail(scope)">查看 </el-link>
<el-link @click="delTestRecord(scope)">删除</el-link>
</template>
</el-table-column>
@ -218,8 +225,8 @@
<el-form :model="form">
<el-form-item label="仓库">
<el-select
style="width: 100%"
v-model="form.warehouse"
style="width: 100%"
placeholder="请选择仓库"
>
<el-option
@ -248,8 +255,8 @@
<el-form :model="form">
<el-form-item label="仓库">
<el-select
style="width: 100%"
v-model="form.warehouse"
style="width: 100%"
placeholder="请选择仓库"
>
<el-option
@ -270,16 +277,14 @@
<el-button type="primary" @click="putins"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getOrderList } from "@/api/sam";
// import {getOrderList} from "@/api/sam";
import checkPermission from "@/utils/permission";
import {getWarehouseList} from "@/api/inm";
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
import { genTree } from "@/utils";
import { getrecordformList, getrffieldList} from "@/api/mtm";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import customForm from "@/components/customForm/index";
import {
@ -288,7 +293,6 @@ import {
wproductPutin,
createputins,
testInit,
toorder,
} from "@/api/wpm";
import {
getTestRecord,
@ -297,6 +301,7 @@ import {
delTestRecordItem,
subTestRecordItem,
} from "@/api/qm";
const defaultetestitem = {};
export default {
components: {Pagination, customForm},
@ -343,14 +348,8 @@ export default {
40: "成品检验",
},
choice: [
{
value: true,
label: "合格",
},
{
value: false,
label: "不合格",
},
{value: true, label: "合格"},
{value: false, label: "不合格"},
],
options: [],
listLoading: true,
@ -417,6 +416,7 @@ export default {
this.dialogFormVisibles = true;
this.getWarehouseLists(); //仓库
},
//批量入库
putins() {
let _this = this;
@ -424,8 +424,6 @@ export default {
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID.push(item.id);
});
console.log(_this.mutipID);
createputins({
warehouse: this.form.warehouse,
wproducts: _this.mutipID,
@ -438,6 +436,7 @@ export default {
}
});
},
//仓库列表
getWarehouseLists() {
getWarehouseList({page: 0}).then((response) => {
@ -446,6 +445,7 @@ export default {
}
});
},
//提交检查项目
submitfield() {
let _this = this;
@ -457,13 +457,10 @@ export default {
is_testok: item.is_testok, //单项检查结果
});
});
console.log(this.recordform);
this.testrecord.form = this.recordform; //检查表
this.testrecord.record_data = _this.field; //检查项列表
this.testrecord.is_testok = this.is_testok; //检查表检查结果
this.testrecord.wproduct = this.wproduct; //半成品ID
wproductTest(this.testrecord).then((res) => {
if (res.code >= 200) {
this.innerVisible = false;
@ -473,12 +470,14 @@ export default {
}
});
},
//半成品入库
handlePutin(scope) {
this.dialogFormVisible = true;
this.getWarehouseLists(); //仓库
this.id = scope.row.id; //半成品id
},
putin() {
wproductPutin(this.id, this.form).then((res) => {
if (res.code >= 200) {
@ -511,6 +510,7 @@ export default {
}
});
},
//根据选择的表渲染检查项目
submitrecordform() {
let that = this;
@ -539,6 +539,7 @@ export default {
);
} else this.$message.error("请选择检查表!");
},
//选择物料检查表
recordformChange() {
let that = this;
@ -547,6 +548,7 @@ export default {
});
that.formName = arr[0].name;
},
//更新检验记录列表
refreshRecord() {
let that = this;
@ -558,6 +560,7 @@ export default {
}
});
},
//检验记录
checkRecord(scope) {
let that = this;
@ -571,6 +574,7 @@ export default {
}
});
},
//点击记录里的检验
handleInspectionRecord(scope) {
let that = this;
@ -614,6 +618,7 @@ export default {
}
);
},
delTestRecord(scope) {
let that = this;
this.$confirm("确认删除?", "警告", {
@ -634,9 +639,10 @@ export default {
});
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//保存检查项目
recordSave(value) {
let that = this;
@ -657,9 +663,10 @@ export default {
}
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//记录提交检查项目
recordSubmit(value) {
let that = this;
@ -685,9 +692,10 @@ export default {
}
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//第一次保存提交检查项目
recordCancel() {
this.outerVisible = false;

View File

@ -2,8 +2,8 @@
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
<el-tab-pane
:key="item.name"
v-for="item in processOption"
:key="item.name"
:label="item.name"
:name="item.id"
:closable="item.close"
@ -18,8 +18,7 @@
@current-change="handleCurrentChange"
>
<el-table-column type="index" width="50"/>
<el-table-column label="子计划编号" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="子计划编号" prop="number" min-width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column label="产品名称" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
@ -58,11 +57,9 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="开工时间" width="100">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
<el-table-column label="开工时间" prop="start_date" width="100">
</el-table-column>
<el-table-column label="完工时间" width="100">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
<el-table-column label="完工时间" prop="end_date" width="100">
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
@ -88,20 +85,21 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['wmaterial_pick'])&&!scope.row.is_picked"
type="success"
v-if="scope.row.is_picked == false"
@click="handleNeed(scope)"
>
领料
</el-link>
<el-link
v-if="checkPermission(['wmaterial_pick'])&&scope.row.is_picked"
type="success"
v-if="scope.row.is_picked"
@click="handleNeed(scope)"
>
继续领料
</el-link>
<el-link
v-if="checkPermission(['wmaterial_pick'])"
type="primary"
@click="handlepick(scope)"
>
@ -124,10 +122,11 @@
<span>半成品</span>
</div>
<el-button
v-for="item in steps"
v-show="checkPermission(['wmaterial_operation'])"
:key="item.number"
type="primary"
style="margin-left: 2px"
v-for="item in steps"
:key="item.number"
:label="item.name"
:value="item.number"
@click="handlework(item)"
@ -135,10 +134,11 @@
{{ item.name }}
</el-button>
<el-button
type="primary"
@click="handleScrapbcp()"
v-if="checkPermission(['wmaterial_scrap'])"
id="scrap"
type="primary"
style="float: right; display: none"
@click="handleScrapbcp()"
>
报废
</el-button>
@ -167,10 +167,7 @@
{{scope.row.subproduction_plan_.number}}
</template>
</el-table-column>
<el-table-column label="玻璃编号" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.number }}
</template>
<el-table-column label="玻璃编号" prop="number" width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column label="玻璃状态" width="100" show-overflow-tooltip>
<template slot-scope="scope">
@ -192,10 +189,7 @@
{{ ng_sign_[scope.row.ng_sign] }}
</template>
</el-table-column>
<el-table-column label="更新时间" width="160">
<template slot-scope="scope">
{{scope.row.update_time}}
</template>
<el-table-column label="更新时间" prop="update_time" width="160">
</el-table-column>
</el-table>
</el-card>
@ -229,11 +223,9 @@
{{scope.row.material_.unit}}
</template>
</el-table-column>
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column prop="batch" label="物料批次">
</el-table-column>
<el-table-column label="物料数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column prop="count" label="物料数量">
</el-table-column>
</el-table>
</el-card>
@ -249,8 +241,8 @@
<el-form :model="formbcp">
<el-form-item label="甩片原因">
<el-select
style="width: 80%"
v-model="formbcp.scrap_reason"
style="width: 80%"
placeholder="请甩片原因"
>
<el-option
@ -943,7 +935,13 @@
//车间物料表
this.getwmaterialLists();
// 半成品表
this.getwproductLists();
getwproductList({page:0,tag:'no_scrap'}).then((response) => {
if (response.data) {
this.wproductData = response.data;
//console.log( this.wproductData)
}
});
},
//大工序下子工序产出的半成品
@ -1017,6 +1015,14 @@
this.dialogVisiblenw = false;
this.$message.success("领料成功!");
this.listQuery.process = this.process;
getsubplanList(this.listQuery).then((response) => {
if (response.data) {
this.subproductionplanList = response.data;
}
});
//车间物料表
this.getwmaterialLists();
// 半成品表

View File

@ -17,11 +17,13 @@ class Equipment(CommonAModel):
EQUIP_STATE_LIMIT = 20
EQUIP_STATE_FIX = 30
EQUIP_STATE_DISABLE = 40
EQUIP_STATE_scrap = 50
state_choices = (
(EQUIP_STATE_OK, '完好'),
(EQUIP_STATE_LIMIT, '限用'),
(EQUIP_STATE_FIX, '在修'),
(EQUIP_STATE_DISABLE, '禁用')
(EQUIP_STATE_DISABLE, '禁用'),
(EQUIP_STATE_scrap, '报废')
)
state2_choices = (