Merge remote-tracking branch 'origin/master'

master
Yangwl 8 months ago
commit 02088b141c

@ -59,3 +59,22 @@ export function addSupplier(data) {
data: data
});
}
// 查询用户物料未关联列表
export function getProductLeftList(query) {
return request({
url: '/quality/qcGoalDistribute/getProductLeftList',
method: 'get',
params: query
});
}
// 查询用户物料已关联列表
export function getProductRightList(query) {
return request({
url: '/quality/qcGoalDistribute/getProductRightList',
method: 'get',
params: query
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

@ -132,6 +132,12 @@ export const constantRoutes = [
component: () => import("@/views/kanban/finishproduct/index"),
hidden: true,
},
// 包装线产线生产看板
{
path: "/kanban/Packagingline",
component: () => import("@/views/kanban/Packagingline/index"),
hidden: true,
},
]

File diff suppressed because it is too large Load Diff

@ -1,8 +1,8 @@
<template>
<div class="bottom-right-table-1">
<dv-border-box-13 :key="borderBoxKey">
<dv-border-box-13 :key="borderBoxKey" style="width: 1120px;">
<div class="table-name">
<dv-scroll-board :config="getScrollBoardConfig()" />
<dv-scroll-board id="dvscroll" :config="getScrollBoardConfig()" style="font-size: 22px;" />
<!-- <dv-scroll-board :config="getScrollBoardConfig()" />-->
</div>
</dv-border-box-13>
@ -27,7 +27,7 @@ export default {
],
index: true,
columnWidth: [100, 150, 100, 501, 200, 52],
columnWidth: [100, 150, 100, 450, 180, 72],
align: ['center'],
oddRowBGC: 'rgba(9, 37, 50, 0.4)',
evenRowBGC: 'rgba(10, 32, 50, 0.3)'
@ -48,10 +48,12 @@ export default {
header: ['工单号', '产线名称', '产品名称', '生产数量', '单位'],
data: this.config.data,
index: true,
columnWidth: [100, 150, 100, 501, 200, 52],
columnWidth: [100, 150, 100, 450, 180, 72],
align: ['center'],
oddRowBGC: 'rgba(9, 37, 50, 0.4)',
evenRowBGC: 'rgba(10, 32, 50, 0.3)'
evenRowBGC: 'rgba(10, 32, 50, 0.3)',
titleTextStyle: { fontSize: '28px' },
contentTextStyle: { fontSize: '28px' }
}
},
// tableData
@ -69,11 +71,12 @@ export default {
};
</script>
<style lang="less">
<style lang="less" scoped >
.bottom-right-table-1 {
width: calc(~"100% + 10px");
height: 100%;
margin: 0 -5px;
.border-box-content {
padding: 20px;
@ -105,4 +108,18 @@ export default {
}
}
/deep/ .dv-scroll-board{
margin-top: 30px;
padding: 0 10px;
}
/deep/ .dv-scroll-board .rows .row-item .ceil {
font-size: 18px !important;
height: 49px !important;
line-height: 45px !important;
}
/deep/ .dv-scroll-board .header .header-item {
font-size: 18px !important;
height: 49px !important;
line-height: 45px !important;
}
</style>

@ -0,0 +1,384 @@
<template>
<div class="bottom-right-table-1" style=" margin-left: 10px">
<dv-border-box-13 style="width: 770px;height: 600px;">
<div class="table-name">
<div id="echart1" style="margin: auto; width: 770px; height: 600px"></div>
</div>
</dv-border-box-13>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'BottomRightechart1',
props: {
tableData: {
type: Array,
default: () => []
}
},
data() {
return {
borderBoxKey: 1, // key
tablelist: [],
}
},
watch: {
// tableData config data
tableData(newVal) {
console.log("newVal-11111",newVal)
this.tablelist = newVal;
this.initChart1()
}
},
methods: {
initChart1() {
const _this = this;
var existingChart = echarts.getInstanceByDom(document.getElementById('echart1'));
if (existingChart) {
//
existingChart.dispose();
}
var myChart1 = echarts.init(document.getElementById('echart1'));
const CubeLeft = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0
},
buildPath: function (ctx, shape) {
const xAxisPoint = shape.xAxisPoint
const c0 = [shape.x, shape.y]
const c1 = [shape.x - 9, shape.y - 9]
const c2 = [xAxisPoint[0] - 9, xAxisPoint[1] - 9]
const c3 = [xAxisPoint[0], xAxisPoint[1]]
ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath()
}
})
const CubeRight = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0
},
buildPath: function (ctx, shape) {
const xAxisPoint = shape.xAxisPoint
const c1 = [shape.x, shape.y]
const c2 = [xAxisPoint[0], xAxisPoint[1]]
const c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9]
const c4 = [shape.x + 18, shape.y - 9]
ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath()
}
})
const CubeTop = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0
},
buildPath: function (ctx, shape) {
const c1 = [shape.x, shape.y]
const c2 = [shape.x + 18, shape.y - 9]
const c3 = [shape.x + 9, shape.y - 18]
const c4 = [shape.x - 9, shape.y - 9]
ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath()
}
})
echarts.graphic.registerShape('CubeLeft', CubeLeft)
echarts.graphic.registerShape('CubeRight', CubeRight)
echarts.graphic.registerShape('CubeTop', CubeTop)
let xAxisname = []
let MAX = []
let VALUE = []
_this.tablelist.forEach((item) => {
xAxisname.push(item.equipment_name)
});
for (let i = 0; i < _this.tablelist.length; i++) {
MAX.push(100)
VALUE.push(96+Math.floor(Math.random() * 5))
}
// VALUE = this.generateRandomNumbers(_this.tablelist.length);
var option1 = {
// backgroundColor: "#010d3a",
title: {
text: '',
top: 32,
left: 18,
textStyle: {
color: '#00F6FF',
fontSize: 24
}
},
grid: {
left: 20,
right: 40,
bottom: '19%',
top: 107,
containLabel: true
},
xAxis: {
type: 'category',
data: xAxisname,
axisLine: {
show: true,
lineStyle: {
color: 'white'
}
},
offset: 20,
axisTick: {
show: false,
length: 9,
alignWithLabel: true,
lineStyle: {
color: '#7DFFFD'
}
},
axisLabel: {
fontSize: 10
}
},
yAxis: {
type: 'value',
axisLine: {
show: true,
lineStyle: {
color: 'white'
}
},
max: '100',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
fontSize: 16,
formatter: "{value}%",
},
boundaryGap: ['20%', '20%']
},
series: [{
type: 'custom',
renderItem: function (params, api) {
const location = api.coord([api.value(0), api.value(1)])
return {
type: 'group',
children: [{
type: 'CubeLeft',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: 'rgba(7,29,97,.6)'
}
}, {
type: 'CubeRight',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: 'rgba(10,35,108,.7)'
}
}, {
type: 'CubeTop',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: 'rgba(11,42,106,.8)'
}
}]
}
},
data: MAX
}, {
type: 'custom',
renderItem: (params, api) => {
const location = api.coord([api.value(0), api.value(1)])
return {
type: 'group',
children: [{
type: 'CubeLeft',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#3B80E2'
},
{
offset: 1,
color: '#49BEE5'
}
])
}
}, {
type: 'CubeRight',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#3B80E2'
},
{
offset: 1,
color: '#49BEE5'
}
])
}
}, {
type: 'CubeTop',
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0])
},
style: {
fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#3B80E2'
},
{
offset: 1,
color: '#49BEE5'
}
])
}
}]
}
},
data: VALUE
}, {
type: 'bar',
label: {
normal: {
show: true,
position: 'top',
formatter: (e) => {
switch (e.name) {
case '10kV线路':
return VALUE[0]
case '公用配变':
return VALUE[1]
case '35kV主变':
return VALUE[2]
case '水':
}
},
fontSize: 16,
color: '#fff',
offset: [4, -25]
}
},
itemStyle: {
color: 'transparent'
},
data: VALUE
}]
}
myChart1.setOption(option1);
},
// tableData
},
mounted() {
this.initChart1();
}
};
</script>
<style lang="less" scoped>
.bottom-right-table-1 {
width: calc(~"100% + 10px");
height: 100%;
margin: 0 -5px;
.border-box-content {
padding: 20px;
box-sizing: border-box;
}
.table-name {
height: 330px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
img {
width: 79px;
height: 30px;
margin-right: 5px;
}
}
.grid-container {
display: grid;
grid-template-rows: repeat(2, auto);
/* 每行的高度为内容的高度 */
gap: 10px;
/* 调整行之间的垂直间距 */
}
.dv-scroll-board {
height: calc(~"100% - 0px");
}
}
::v-deep .dv-scroll-board .rows .ceil {
border-bottom: 1px solid #ebeef4 !important;
}
/deep/ .dv-scroll-board {
margin-top: 30px;
padding: 0 10px;
}
/deep/ .dv-scroll-board .rows .row-item .ceil {
font-size: 18px !important;
height: 49px !important;
line-height: 45px !important;
}
/deep/ .dv-scroll-board .header .header-item {
font-size: 18px !important;
height: 49px !important;
line-height: 45px !important;
}
</style>

@ -29,7 +29,10 @@
export default {
name: 'TopLeftCmp',
props: {
data: []
data: {
type: Array,
default: () => []
}
},
data() {
return {

@ -9,11 +9,7 @@
<img src="../../../assets/images/logo.png" alt="" />
</div>
<div class="back">
<el-button
@click="back()"
type="primary"
icon="el-icon-s-home"
></el-button>
<el-button @click="back()" type="primary" icon="el-icon-s-home"></el-button>
</div>
</div>
<div class="content-top">
@ -26,17 +22,25 @@
<div class="content">
<div class="mc-top">
<div class="mc-left">
<Top-Left-Cmp :data="valueForTopLeftCmp"/>
<Top-Left-Cmp :data="valueForTopLeftCmp" />
</div>
<div class="mc-middle">
</div>
<div class="mc-right">
<Top-Middle-Cmp :data="valueForTopMiddleCmp" style="height: 100%;"/>
<Top-Middle-Cmp :data="valueForTopMiddleCmp" style="height: 100%;" />
</div>
</div>
<div class="mc-bottom">
<BottomRightTable1 :tableData="BottomRightTableValue" style="height: 600px; margin-top: 50px"/>
<div class="mc-bottom" style="display: flex; justify-content: space-between;">
<BottomRightTable1 :tableData="BottomRightTableValue" style="height: 600px; margin-top: 50px" />
<BottomRightechart1 :tableData="BottomRightTableValue" style="height: 600px; margin-top: 50px" />
<!-- <div class="bottom-right-table-1" style="height: 600px; margin-top: 50px">
<dv-border-box-13 style="width: 770px;height: 600px;">
<div class="table-name">
<div id="echart1" style="margin: auto; width: 770px; height: 600px"></div>
</div>
</dv-border-box-13>
</div> -->
<!-- 设置 .mc-bottom 的高度你可以根据实际情况调整 -->
</div>
</div>
@ -45,7 +49,7 @@
</template>
<script>
import * as echarts from "echarts"
import { finishProductBoard } from "@/api/kanban/finishproduct";
import TopLeftCmp from './TopLeftCmp'
import TopMiddleCmp from './TopMiddleCmp'
@ -53,8 +57,7 @@ import TopRightCmp from './TopRightCmp'
import BottomRightTable1 from './BottomRightTable1'
import BottomRightechart1 from './BottomRightechart1'
export default {
name: 'DataView',
@ -63,8 +66,9 @@ export default {
TopMiddleCmp,
TopRightCmp,
BottomRightTable1,
BottomRightechart1,
},
data () {
data() {
return {
currentDateTime: null,
//
@ -72,9 +76,9 @@ export default {
sumplanquantity: 0,
sumFinshQuantity: 0,
},
valueForTopMiddleCmp:[],
BottomRightTableValue:[],
valueForTopMiddleCmp: [],
BottomRightTableValue: [],
tablelist:[],
};
},
methods: {
@ -95,14 +99,15 @@ export default {
console.log(response.data);
this.valueForTopLeftCmp.sumplanquantity = response.data.sumplanquantity ?? 0;;
this.valueForTopLeftCmp.sumFinshQuantity = response.data.sumFinshQuantity ?? 0;;
this.valueForTopMiddleCmp=response.data.daySenvenProductionList;
this.valueForTopMiddleCmp = response.data.daySenvenProductionList;
this.BottomRightTableValue = response.data.ProductionInProgress;
// this.initChart1()
} catch (error) {
console.error('Error fetching data:', error);
}
}
},
},
mounted() {
@ -120,52 +125,60 @@ export default {
</script>
<style lang="scss" scoped>
.app-container {
padding: 0px 24px;
color: #fff;
}
.home {
width: 100%;
height: 100%;
background: url("../../../assets/images/bg-finishproduct.png") no-repeat;
background-size: 100% 100%;
background-color: #050711;
.head {
width: 100%;
height: 74px;
position: relative;
.head-content {
height: 74px;
background-image: url("../../../assets/images/bg-head.png");
background-repeat: no-repeat;
background-size: 100% 100%;
text-align: center;
.title {
font-size: 42px;
font-weight: 400;
color: #ffffff;
}
}
.head-logo {
position: absolute;
left: 0px;
top: 1px;
img {
height: 38px;
// width: ;
}
}
.back {
position: absolute;
right: 0px;
top: 5px;
}
}
.content-top {
display: flex;
justify-content: space-between;
position: relative;
.timebox {
width: 480px;
height: 100px;
@ -175,6 +188,7 @@ export default {
position: absolute;
top: -17px;
right: 0px;
.time {
font-size: 30px;
font-weight: 400;
@ -183,28 +197,31 @@ export default {
}
}
}
.content {
margin-top: 63px;
display: block;
justify-content: space-between;
.mc-top {
height: 100%;
width: 100%;
display: flex;
.mc-left {
flex: 2; //
flex: 2; //
}
.mc-middle {
flex: 1; //
flex: 1; //
}
.mc-right {
flex: 2; //
flex: 2; //
}
}
}
}
</style>

@ -60,7 +60,7 @@
</span>
</div>
<div class="name2">
今日已检数量
今日已检数量
</div>
</div>
<div class="box">
@ -70,7 +70,7 @@
</span>
</div>
<div class="name2">
今日异常数量
今日不良数量
</div>
</div>
</div>
@ -92,7 +92,7 @@
</span>
</div>
<div class="name2">
本月异常数量
本月不良数量
</div>
</div>
</div>

@ -523,7 +523,7 @@
:formatter="orderCodeFormate"/>
<el-table-column label="物料编码" width="180" align="left" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="消耗数量" width="120" align="left" prop="quantity" :show-overflow-tooltip="true" >
<el-table-column label="实际用量" width="120" align="left" prop="quantity" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>

@ -88,6 +88,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -88,6 +88,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -11,18 +11,18 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验任务" prop="checkNo">
<el-form-item label="任务编号" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
placeholder="请输入检测地点"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="materialCode">
<el-form-item label="产品名称" prop="materialName">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入产品编码"
v-model="queryParams.materialName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -100,6 +100,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="产线名称" align="center" prop="supplierName" width="120"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -78,6 +78,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="仓库名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -1,134 +1,124 @@
<template>
<el-dialog
title="分配供应商"
:visible.sync="showFlag"
width="1000px"
append-to-body
>
<el-form ref="form1" label-width="80px">
<el-form-item label="目标id" prop="belongGoalId">
<el-input v-model="belongGoalId" disabled />
</el-form-item>
</el-form>
<el-tabs type="border-card" v-if="belongGoalId != null">
<el-tab-pane label="分配供应商">
<div>
<div class="query">
<el-input
style="width: 351px; margin-bottom: 10px"
v-model="leftQueryParams.supplierName"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input
style="width: 351px; margin-bottom: 10px"
v-model="rightQueryParams.supplierName"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
<el-transfer
v-model="rightList"
:data="leftList"
:titles="titles"
:filterable="true"
@change="handleChange"
>
<!-- 左侧栏分页 -->
<el-button
type="text"
style="color: #606266"
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
>{{ Ltotal }}</el-button
>
<el-button
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftPageNumChange"
:disabled="LPageNum - 1 < 1"
>上一页</el-button
>
<el-input
v-if="leftLength != 0"
v-model="LPageNum"
size="mini"
class="transfer-footer"
slot="left-footer"
:placeholder="LPageNum"
style="width: 67px; padding: 1px 3px"
disabled
></el-input>
<el-button
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftAddPageNumChange"
v-if="leftLength != 0"
:disabled="LNextPage > LPages"
>下一页</el-button
>
<!-- 右侧栏分页 -->
<el-button
type="text"
style="color: #606266"
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
>{{ Rtotal }}</el-button
>
<el-button
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightPageNumChange"
:disabled="RPageNum - 1 < 1"
>上一页</el-button
>
<el-input
v-if="rightLength != 0"
v-model="RPageNum"
size="mini"
class="transfer-footer"
slot="right-footer"
:placeholder="RPageNum"
style="width: 43px"
></el-input>
<el-button
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightAddPageNumChange"
v-if="rightLength != 0"
:disabled="RNextPage > RPages"
>下一页</el-button
>
</el-transfer>
<div>
<el-form ref="form1" label-width="80px">
<el-form-item label="目标id" prop="belongGoalId">
<el-input v-model="belongGoalId" disabled />
</el-form-item>
</el-form>
<el-tabs type="border-card" v-if="belongGoalId != null">
<el-tab-pane :label="disTitle">
<div>
<div class="query">
<el-input
style="width: 351px; margin-bottom: 10px"
v-model="leftQueryParams.supplierName"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input
style="width: 351px; margin-bottom: 10px"
v-model="rightQueryParams.supplierName"
placeholder="请输入内容"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-transfer
v-model="rightList"
:data="leftList"
:titles="titles"
:filterable="true"
@change="handleChange"
>
<!-- 左侧栏分页 -->
<el-button
type="text"
style="color: #606266"
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
>{{ Ltotal }}</el-button
>
<el-button
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftPageNumChange"
:disabled="LPageNum - 1 < 1"
>上一页</el-button
>
<el-input
v-if="leftLength != 0"
v-model="LPageNum"
size="mini"
class="transfer-footer"
slot="left-footer"
:placeholder="LPageNum"
style="width: 67px; padding: 1px 3px"
disabled
></el-input>
<el-button
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftAddPageNumChange"
v-if="leftLength != 0"
:disabled="LNextPage > LPages"
>下一页</el-button
>
<!-- 右侧栏分页 -->
<el-button
type="text"
style="color: #606266"
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
>{{ Rtotal }}</el-button
>
<el-button
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightPageNumChange"
:disabled="RPageNum - 1 < 1"
>上一页</el-button
>
<el-input
v-if="rightLength != 0"
v-model="RPageNum"
size="mini"
class="transfer-footer"
slot="right-footer"
:placeholder="RPageNum"
style="width: 43px"
></el-input>
<el-button
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightAddPageNumChange"
v-if="rightLength != 0"
:disabled="RNextPage > RPages"
>下一页</el-button
>
</el-transfer>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { getLeftList, getRightList, addSupplier } from "@/api/quality/qcGoalDistribute";
import { getLeftList, getRightList, addSupplier, getProductLeftList, getProductRightList } from "@/api/quality/qcGoalDistribute";
export default {
name: "QcGoalDistriBute",
props: ['belongGoalId','mode','disTitle'],
data() {
return {
//
@ -145,6 +135,7 @@ export default {
total: 0,
//
title: "",
model: null,
//
showFlag: false,
//
@ -170,7 +161,7 @@ export default {
//--------------------->
leftList: [],
rightList: [],
titles: ["未关联供应商", "已关联供应商"],
titles: ["未分配", "已分配"],
//
Ltotal: "",
LPageNum: "1",
@ -199,12 +190,23 @@ export default {
},
};
},
props: {
belongGoalId:undefined,
mounted() {
if (this.belongGoalId) {
this.getList();
this.getRightListFun();
}
},
created() {
},
watch: {
belongGoalId(newVal,oldVal) {
console.log(newVal);
if(newVal !== oldVal) {
this.getList();
this.getRightListFun();
}
}
},
methods: {
// // 穿
@ -221,14 +223,26 @@ export default {
getList() {
this.loading = true;
this.leftQueryParams.belongGoalId = this.belongGoalId;
getLeftList(this.leftQueryParams).then((response) => {
this.LPages = Math.ceil(response.total / this.LPageSize);
this.leftList = response.rows;
this.Ltotal = response.total;
this.LPageNum = this.leftQueryParams.pageNum;
this.LNextPage = this.leftQueryParams.pageNum + 1;
this.loading = false;
});
if(this.mode) {
getLeftList(this.leftQueryParams).then((response) => {
this.LPages = Math.ceil(response.total / this.LPageSize);
this.leftList = response.rows;
this.Ltotal = response.total;
this.LPageNum = this.leftQueryParams.pageNum;
this.LNextPage = this.leftQueryParams.pageNum + 1;
this.loading = false;
});
}else{
getProductLeftList(this.leftQueryParams).then((response) => {
this.LPages = Math.ceil(response.total / this.LPageSize);
this.leftList = response.rows;
this.Ltotal = response.total;
this.LPageNum = this.leftQueryParams.pageNum;
this.LNextPage = this.leftQueryParams.pageNum + 1;
this.loading = false;
});
}
},
/**左边上一页**/
leftPageNumChange() {
@ -249,23 +263,36 @@ export default {
getRightListFun() {
this.loading = true;
this.rightQueryParams.belongGoalId = this.belongGoalId;
getRightList(this.rightQueryParams).then((response) => {
this.RPages = Math.ceil(response.total / this.RPageSize);
let dataright = [];
for (let i in response.rows) {
// 穿
dataright.push(response.rows[i].key);
}
this.rightList = dataright;
this.Rtotal = response.total;
this.RPageNum = this.rightQueryParams.pageNum;
this.RNextPage = this.rightQueryParams.pageNum + 1;
this.loading = false;
}).catch((error) => {
console.error('获取右侧列表数据失败:', error);
this.loading = false;
//
});
if(this.mode) {
getRightList(this.rightQueryParams).then((response) => {
this.RPages = Math.ceil(response.total / this.RPageSize);
let dataright = [];
for (let i in response.rows) {
// 穿
dataright.push(response.rows[i].key);
}
this.rightList = dataright;
this.Rtotal = response.total;
this.RPageNum = this.rightQueryParams.pageNum;
this.RNextPage = this.rightQueryParams.pageNum + 1;
this.loading = false;
});
}else{
getProductRightList(this.rightQueryParams).then((response) => {
this.RPages = Math.ceil(response.total / this.RPageSize);
let dataright = [];
for (let i in response.rows) {
// 穿
dataright.push(response.rows[i].key);
}
this.rightList = dataright;
this.Rtotal = response.total;
this.RPageNum = this.rightQueryParams.pageNum;
this.RNextPage = this.rightQueryParams.pageNum + 1;
this.loading = false;
});
}
},
/**右边上一页**/
rightPageNumChange() {
@ -280,11 +307,6 @@ export default {
this.getRightListFun();
},
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
@ -322,11 +344,6 @@ export default {
});
},
/** 提交 */
submitForm() {
this.showFlag = false;
this.getList();
},
},
};
</script>

@ -132,12 +132,19 @@
v-hasPermi="['quality:qcProjectType:remove']"
>删除</el-button>
<el-button
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0'"
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0' && scope.row.typeCode == 'material'"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleDistribution(scope.row)"
>分配</el-button>
@click="handleSupplier(scope.row)"
>分配供应商</el-button>
<el-button
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0' && scope.row.typeCode != 'material'"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleProduct(scope.row)"
>分配产品</el-button>
</template>
</el-table-column>
</el-table>
@ -275,8 +282,17 @@
<el-button type="primary" @click="closeGen"></el-button>
</div>
</el-dialog>
<Distribution ref="itemDistribution" :belongGoalId="goalId" ></Distribution>
<el-dialog :title="disTitle" :visible.sync="showFlag" width="1000px" append-to-body >
<Distribution ref="itemDistribution"
:belongGoalId="belongGoalId"
:mode="mode"
:disTitle="disTitle"
v-if="belongGoalId !== null"
></Distribution>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="closeDistribution"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -311,7 +327,10 @@ export default {
checkTypes: [],
genList: [],
checked: false,
goalId: null,
belongGoalId: null,
showFlag: false,
mode: null,
disTitle: "",
//
title: "",
genTitle: "",
@ -516,11 +535,22 @@ export default {
const checkTypeBody = this.checkTypes.find((item) => item.id === checkType);
return checkTypeBody ? checkTypeBody.checkName : '';
},
handleDistribution(row) {
this.goalId = row.id;
this.$refs.itemDistribution.getRightListFun();
this.$refs.itemDistribution.getList();
this.$refs.itemDistribution.showFlag = true;
handleSupplier(row) {
this.belongGoalId = row.id;
this.mode = true;
this.disTitle = "分配供应商";
this.showFlag = true;
},
handleProduct(row) {
this.belongGoalId = row.id;
this.mode = false;
this.disTitle = "分配产品";
this.showFlag = true;
},
closeDistribution() {
this.showFlag = false;
this.$refs.itemDistribution.leftList=[];
this.$refs.itemDistribution.rightList=[];
},
},

@ -233,11 +233,11 @@
/>
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
width="150"
<el-table-column
label="备注"
align="center"
prop="remark"
width="150"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
@ -253,6 +253,20 @@
prop="equipmentTypeName"
width="150"
/>
<el-table-column
label="sap线体编码"
align="center"
prop="sapCode"
width="100"
>
</el-table-column>
<el-table-column
label="sap线体名称"
align="center"
prop="sapName"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="所属工作中心编码"
align="center"
@ -543,6 +557,22 @@
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="sap线体编码" prop="sapCode">
<el-input
v-model="form.sapCode"
placeholder="请输入sap线体编码"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="sap线体名称" prop="sapName">
<el-input
v-model="form.sapName"
placeholder="请输入sap线体名称"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设备类别" prop="equipmentCategory">
<el-select
@ -890,6 +920,15 @@
<el-descriptions-item label="工时单价">{{
form.hourlyUnitPrice
}}</el-descriptions-item>
<el-descriptions-item label="sap线体编码">{{
form.sapCode
}}</el-descriptions-item>
<el-descriptions-item label="sap线体名称">{{
form.sapName
}}</el-descriptions-item>
<el-descriptions-item label="设备类别">{{
form.equipmentCategory
}}</el-descriptions-item>
</el-descriptions>
<el-divider content-position="center">设备使用状况</el-divider>
@ -1433,6 +1472,8 @@ export default {
equipmentNumber: null,
inventoryNumber: null,
unitMeasurement: null,
sapCode: null,
sapName: null,
};
this.resetForm("form");
},

Loading…
Cancel
Save