From 68e417e94ab4c97e13d24522d748fc032f4865af Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 07 十一月 2022 16:38:29 +0800
Subject: [PATCH] 1.工艺路线新增复制功能2.节拍工价编辑问题处理
---
src/views/scgl/zdpc.vue | 250 ++++++++++++++---------------------
src/views/scgl/cngh.vue | 2
src/views/zzmx/gylx.vue | 55 ++++++-
src/views/zzmx/jpgj.vue | 63 +++++---
src/lib/v-gantt-chart/lib/components/time-line/index.vue | 12
5 files changed, 197 insertions(+), 185 deletions(-)
diff --git a/src/lib/v-gantt-chart/lib/components/time-line/index.vue b/src/lib/v-gantt-chart/lib/components/time-line/index.vue
index 1c069e1..580ba14 100644
--- a/src/lib/v-gantt-chart/lib/components/time-line/index.vue
+++ b/src/lib/v-gantt-chart/lib/components/time-line/index.vue
@@ -150,14 +150,14 @@
throw new TypeError('閿欒鐨勮绠楃被鍨�')
}
while (!a.isAfter(b)) {
- if (scale >= 60) {
- totalblock.push(a.format('HH'))
- } else {
- totalblock.push(a.format('HH:mm'))
- }
+ // if (scale >= 60) {
+ // totalblock.push(a.format('HH'))
+ // } else {
+ totalblock.push(a.format('HH:mm'))
+ // }
a = a.add(scale, 'minute')
}
-
+ // console.log(1, totalblock)
return totalblock
}
}
diff --git a/src/views/scgl/cngh.vue b/src/views/scgl/cngh.vue
index 04964ae..733848f 100644
--- a/src/views/scgl/cngh.vue
+++ b/src/views/scgl/cngh.vue
@@ -13,7 +13,7 @@
inline
style="display: flex;justify-content: space-between"
>
- <div class="elForm" style="justify-content: flex-start">
+ <div class="elForm">
<el-form-item label-width="70px" label="鐢熶骇杞﹂棿" style=" display: flex;">
<el-select
v-model="form.workshop"
diff --git a/src/views/scgl/zdpc.vue b/src/views/scgl/zdpc.vue
index 2520e2c..8a912f7 100644
--- a/src/views/scgl/zdpc.vue
+++ b/src/views/scgl/zdpc.vue
@@ -57,7 +57,6 @@
<el-radio
v-model="radioSelectedId"
:label="row.id"
- style="color: transparent;padding-left: 10px;"
@change.native="getCurrentRowTop(row.id)"
/>
</template>
@@ -347,7 +346,7 @@
radio: '',
formBottom: {
- value1: ['2022-11-05', '2022-11-12'], // 鎺掔▼鏃ユ湡
+ value1: ['2022-11-07', '2022-11-12'], // 鎺掔▼鏃ユ湡
types: 'N', // 鎺掔▼鏂瑰紡
scale: 60, // 鏃堕棿鍒诲害
times: 0, // 鎹㈠瀷鏃堕棿
@@ -438,70 +437,6 @@
},
'rows': [
{
- 'YearDate': '2022-11-03',
- 'children': [
- {
- 'AdvaDevicNumber': 'LKFDL_SC-PC029',
- 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
- 'AdvaDevicCropMob': '78',
- 'AdvaDevicRhythm': '10',
- 'OneStartDate': '08:00~11:30',
- 'TwoStartDate': '12:30~17:00',
- 'ThreeStartDate': '',
- 'FourStartDate': '',
- 'FiveStartDate': ''
- }
- ]
- },
- {
- 'YearDate': '2022-11-04',
- 'children': [
- {
- 'AdvaDevicNumber': 'LKFDL_SC-PC029',
- 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
- 'AdvaDevicCropMob': '78',
- 'AdvaDevicRhythm': '10',
- 'OneStartDate': '08:00~11:30',
- 'TwoStartDate': '12:30~17:00',
- 'ThreeStartDate': '',
- 'FourStartDate': '',
- 'FiveStartDate': ''
- }
- ]
- },
- {
- 'YearDate': '2022-11-05',
- 'children': [
- {
- 'AdvaDevicNumber': 'LKFDL_SC-PC029',
- 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
- 'AdvaDevicCropMob': '78',
- 'AdvaDevicRhythm': '10',
- 'OneStartDate': '08:00~11:30',
- 'TwoStartDate': '12:30~17:00',
- 'ThreeStartDate': '',
- 'FourStartDate': '',
- 'FiveStartDate': ''
- }
- ]
- },
- {
- 'YearDate': '2022-11-06',
- 'children': [
- {
- 'AdvaDevicNumber': 'LKFDL_SC-PC029',
- 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
- 'AdvaDevicCropMob': '78',
- 'AdvaDevicRhythm': '10',
- 'OneStartDate': '08:00~11:30',
- 'TwoStartDate': '12:30~17:00',
- 'ThreeStartDate': '',
- 'FourStartDate': '',
- 'FiveStartDate': ''
- }
- ]
- },
- {
'YearDate': '2022-11-07',
'children': [
{
@@ -519,6 +454,70 @@
},
{
'YearDate': '2022-11-08',
+ 'children': [
+ {
+ 'AdvaDevicNumber': 'LKFDL_SC-PC029',
+ 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+ 'AdvaDevicCropMob': '78',
+ 'AdvaDevicRhythm': '10',
+ 'OneStartDate': '08:00~11:30',
+ 'TwoStartDate': '12:30~17:00',
+ 'ThreeStartDate': '',
+ 'FourStartDate': '',
+ 'FiveStartDate': ''
+ }
+ ]
+ },
+ {
+ 'YearDate': '2022-11-09',
+ 'children': [
+ {
+ 'AdvaDevicNumber': 'LKFDL_SC-PC029',
+ 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+ 'AdvaDevicCropMob': '78',
+ 'AdvaDevicRhythm': '10',
+ 'OneStartDate': '08:00~11:30',
+ 'TwoStartDate': '12:30~17:00',
+ 'ThreeStartDate': '',
+ 'FourStartDate': '',
+ 'FiveStartDate': ''
+ }
+ ]
+ },
+ {
+ 'YearDate': '2022-11-10',
+ 'children': [
+ {
+ 'AdvaDevicNumber': 'LKFDL_SC-PC029',
+ 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+ 'AdvaDevicCropMob': '78',
+ 'AdvaDevicRhythm': '10',
+ 'OneStartDate': '08:00~11:30',
+ 'TwoStartDate': '12:30~17:00',
+ 'ThreeStartDate': '',
+ 'FourStartDate': '',
+ 'FiveStartDate': ''
+ }
+ ]
+ },
+ {
+ 'YearDate': '2022-11-11',
+ 'children': [
+ {
+ 'AdvaDevicNumber': 'LKFDL_SC-PC029',
+ 'AdvaDevicName': '閲戦紟鏁版帶杞﹀簥029',
+ 'AdvaDevicCropMob': '78',
+ 'AdvaDevicRhythm': '10',
+ 'OneStartDate': '08:00~11:30',
+ 'TwoStartDate': '12:30~17:00',
+ 'ThreeStartDate': '',
+ 'FourStartDate': '',
+ 'FiveStartDate': ''
+ }
+ ]
+ },
+ {
+ 'YearDate': '2022-11-12',
'children': [
{
'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -1891,31 +1890,10 @@
width: 100px;
}
-.top-bar {
- /* height: 30px; */
- margin-bottom: 20px;
-}
-
.container {
display: flex;
flex-direction: column;
flex: 1;
-}
-
-.main-footer {
- /* height: 30px; */
-}
-
-.ib {
- display: inline-block;
-}
-
-.w250 {
- width: 250px;
-}
-
-.el-slider {
- width: 100px;
}
.tc {
@@ -1933,11 +1911,6 @@
align-items: center;
}
-.colorBar {
- width: 10px;
- height: 100%;
-}
-
.carId {
flex: 1;
}
@@ -1945,63 +1918,6 @@
.tc {
color: #909399;
font-size: 14px;
-}
-
-.type {
- padding: 0 5px 0 0;
- font-size: 1.2rem;
-}
-
-.t_size {
- font-size: 14px;
-}
-
-.icon_true {
- height: 8px;
- display: inline-block;
- width: 8px;
- background: #00a79d;
- margin-right: 7px;
- border-radius: 15px;
-}
-
-.icon_ty {
- height: 8px;
- display: inline-block;
- width: 8px;
- background: red;
- margin-right: 7px;
- border-radius: 15px;
-}
-
-.icon_gz {
- height: 8px;
- display: inline-block;
- width: 8px;
- background: yellow;
- margin-right: 7px;
- border-radius: 15px;
-}
-
-/* .el-col-offset-1 {
- margin-left: 0.5% !important;
-} */
-.marginLeft {
- margin-left: 15px;
-}
-
-.button_style {
- background: #00a79d;
- color: #ffff;
- border-color: #00a79d;
-}
-
-.rg {
- float: right;
-}
-
-.color {
- color: #909399;
}
</style>
@@ -2138,3 +2054,39 @@
}
</style>
+
+<!--<style>-->
+<!--input[type=range]:focus {-->
+<!-- display: none;-->
+<!--}-->
+
+<!--input[type=range] {-->
+<!-- -webkit-appearance: none;-->
+<!-- width: 500px;-->
+<!-- border-radius: 10px;-->
+<!-- /*杩欎釜灞炴�ц缃娇濉厖杩涘害鏉℃椂鐨勫浘褰负鍦嗚*/-->
+<!--}-->
+
+<!--input[type=range]::-webkit-slider-runnable-track {-->
+<!-- height: 20px;-->
+<!-- border-radius: 10px;-->
+<!-- /*灏嗚建閬撹涓哄渾瑙掔殑*/-->
+<!-- /* box-shadow: 0 1px 1px #def3f8, inset 0 .125em .125em #0d1112; */-->
+<!-- border: solid 1px red;-->
+<!--}-->
+
+<!--input[type=range]::-webkit-slider-thumb {-->
+<!-- -webkit-appearance: none;-->
+<!-- height: 30px;-->
+<!-- width: 120px;-->
+<!-- margin-top: -5px;-->
+<!-- /*浣挎粦鍧楄秴鍑鸿建閬撻儴鍒嗙殑鍋忕Щ閲忕浉绛�*/-->
+<!-- background: #ffffff;-->
+<!-- /* border-radius: 50%; */-->
+<!-- /*澶栬璁剧疆涓哄渾褰�*/-->
+<!-- border: solid 0.125em rgba(205, 224, 230, 0.5);-->
+<!-- /*璁剧疆杈规*/-->
+<!-- /* box-shadow: 0 .125em .125em #3b4547; */-->
+<!-- /*娣诲姞搴曢儴闃村奖*/-->
+<!--}-->
+<!--</style>-->
diff --git a/src/views/zzmx/gylx.vue b/src/views/zzmx/gylx.vue
index 832913d..7df18bb 100644
--- a/src/views/zzmx/gylx.vue
+++ b/src/views/zzmx/gylx.vue
@@ -125,7 +125,10 @@
/>
</el-tooltip>
<el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i class="el-icon-delete" @click="del(row)" />
+ <i class="el-icon-delete" style="margin-right:15px;" @click="del(row)" />
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="澶嶅埗" placement="top">
+ <i class="el-icon-document-copy" style="cursor: pointer;color:#42b983" @click="copy('copy',row)" />
</el-tooltip>
</div>
</template>
@@ -145,7 +148,7 @@
</div>
<el-dialog
- :title="operation==='add'?'鏂板':'棰勮'"
+ :title="operation==='add'?'鏂板':(operation==='edit'?'棰勮':'澶嶅埗')"
:visible.sync="dialogVisible"
width="1000px"
:close-on-click-modal="false"
@@ -156,7 +159,7 @@
<el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px">
<div style="display: flex">
<el-form-item label="宸ヨ壓璺嚎缂栫爜" prop="code" style="margin-right: 20px">
- <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" />
+ <el-input v-model="dialogForm.code" :disabled="operation==='edit'" style="width: 220px" />
</el-form-item>
<el-form-item label="宸ヨ壓鍚嶇О" prop="name">
<el-input v-model="dialogForm.name" :disabled="operation==='edit'" style="width: 220px" />
@@ -346,7 +349,7 @@
routeArr: [], // 宸ヨ壓璁剧疆涓嬫媺鎵�鏈夊��
routeSelectedArr: [], // 宸ヨ壓璁剧疆涓嬫媺宸查�夌殑鍊�
addDisabled: true, // 娣诲姞鎸夐挳鏄惁鍙偣鍑�
- editDisabled: true, // 淇敼鎸夐挳鏄惁鍙偣鍑�
+ // editDisabled: true, // 淇敼鎸夐挳鏄惁鍙偣鍑�
mouseFocusPosition: 0, // 榧犳爣鑱氱劍鐨勪綅缃�
operation: '',
dialogFormRules: {
@@ -444,6 +447,7 @@
stepname: item.stepname,
value: item.value
})
+ console.log(this.routeSelectedArr, 7)
this.routeArr.splice(index, 1)
}
})
@@ -685,6 +689,43 @@
this.$message.info('宸插彇娑堝垹闄�')
})
},
+ // 澶嶅埗鎸夐挳
+ async copy(operation, row) {
+ this.operation = operation
+ this.dialogVisible = true
+
+ await this.getStepSelectArr()
+ const { data: res } = await ViewRoute({ routecode: row.code })
+ // 寰呮敼
+ this.dynamicTags = []
+ this.routeSelectedArr = []
+ this.$nextTick(() => {
+ this.dialogForm.code = res[0].code
+ this.dialogForm.name = res[0].name
+ this.dialogForm.enable = res[0].enable
+ this.dialogForm.description = res[0].description
+ // this.dialogForm.Data = row.description
+ res[0].Data.forEach(item => {
+ this.dynamicTags.push(
+ { seq: item.seq, stepname: item.stepname, stepcode: item.stepcode, editDisabled: true, effect: 'light' }
+ )
+ this.routeSelectedArr.push({
+ stepcode: item.stepcode,
+ stepname: item.stepname,
+ value: item.stepname
+ })
+
+ console.log(item, 2)
+ console.log(this.routeArr)
+
+ this.routeArr = this.routeArr.filter(i => i.stepcode !== item.stepcode)
+ })
+
+ this.addDisabled = false
+
+ // { editDisabled: true, stepcode: '', seq: 1, stepname: ' ', effect: 'light' }
+ })
+ },
// 瀵硅瘽妗嗗叧闂簨浠�
handleClose() {
this.dialogForm.code = ''
@@ -731,14 +772,14 @@
Data: Data
}
- AddUpdateRoute(this.dialogForm.id, this.operation === 'add' ? 'Add' : 'Update', data).then(res => {
+ AddUpdateRoute(this.dialogForm.id, this.operation === 'edit' ? 'Update' : 'Add', data).then(res => {
if (res.code === '200') {
this.dialogVisible = false
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '澶嶅埗鎴愬姛锛�')
this.getRouteSearch()
this.$store.state.app.buttonIsDisabled = false
} else {
- this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+ this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '澶嶅埗澶辫触锛�')
}
})
}
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index a506c91..cf72335 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -256,7 +256,6 @@
style="width: 220px"
placeholder="璇烽�夋嫨"
:popper-append-to-body="false"
-
@change="partDialogChange"
>
<!-- @focus="getPartSelect2"-->
@@ -328,14 +327,15 @@
class="tableFixed"
:data="eqpDialogArr"
:height="tableHeight"
- :style="{width: 100+'%',height:tableHeight-50+'px',}"
+ :style="{width: 100+'%',height:tableHeight-50+'px'}"
border
:row-class-name="tableRowClassName"
- highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
+ highlight-current-row
@sort-change="dialogSortChange"
>
+ <!-- @row-click="rowClick"-->
<el-table-column
width="50"
label="搴忓彿"
@@ -431,10 +431,10 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
- <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
- <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
- <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
+ <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
+ <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
+ <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
+ <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
</div>
</template>
</el-table-column>
@@ -639,6 +639,7 @@
this.routeDialogArr = res
this.stepDialogArr = []
this.eqpDialogArr = []
+ this.dialogForm.routecode = ''
},
async routeDialogChange(val) {
const { data: res } = await RouteSelectStep({ routecode: val })
@@ -668,12 +669,14 @@
this.eqpTable.partcode = this.dialogForm.partcode
this.eqpTable.routecode = this.dialogForm.routecode
this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code
- } else if (typeof val === 'number') {
+ // } else if (typeof val === 'number') {
+ } else {
this.eqpTable.partcode = this.dialogForm.partcode
this.eqpTable.routecode = this.dialogForm.routecode
this.eqpTable.stepcode = this.stepDialogArr[0].code
this.dialogForm.stepcode = this.stepDialogArr[0].name
}
+
const res = await StepSelectEqpList(this.eqpTable)
this.eqpDialogArr = res.data
this.eqpTableLength = res.count
@@ -714,13 +717,26 @@
editRow(row) {
if (this.isEqpTableEdit) {
row.isVisible = 1
+ let temp = {}
+ this.eqpDialogArr.forEach((item, index) => {
+ if (row.eqpcode === item.eqpcode) {
+ temp = item
+ this.eqpDialogArr.splice(index, 1, temp)
+ this.eqpDialogArr[index].isVisible = 1
+ }
+ })
this.isEqpTableEdit = false
} else {
return this.$message.info('鍙兘涓�琛屼竴琛屼慨鏀癸紒')
}
},
+ // rowClick(row, column, event) {
+ // console.log(row, column, event, 3)
+ // console.log(this.dialogForm.stepcode, 4)
+ // this.getEqpTable(this.dialogForm.stepcode)
+ // },
// 澶嶅埗琛�
- async copyRow(row) {
+ async copyRow(row) {
let currentData = {}// 褰撳墠琛屽璞�
let nextData = {}// 涓嬩竴琛屽璞�
if (row.RowNum === this.eqpDialogArr.length) {
@@ -775,7 +791,7 @@
this.getPartSelect2()
},
// 淇敼鎸夐挳
- async edit(operation, row) {
+ async edit(operation, row) {
this.operation = operation
this.dialogVisible = true
@@ -783,13 +799,11 @@
this.editRouteName = row.route_name
this.editStepName = row.stepname
- // this.$nextTick(() => {
+ await this.partDialogChange(row.partcode)
+ await this.routeDialogChange(row.route_code)
this.dialogForm.partcode = row.partcode
this.dialogForm.routecode = row.route_code
this.dialogForm.stepcode = row.stepcode
- // })
- await this.partDialogChange(row.partcode)
- await this.routeDialogChange(row.route_code)
await this.radioChange(0)
},
// 鍒犻櫎鎸夐挳
@@ -889,15 +903,17 @@
<!--鍏叡椤甸潰鏍峰紡-->
<style lang="scss" scoped>
$main_color: #42b983;
-.el-button--text{
+.el-button--text {
font-size: 14px;
cursor: pointer;
}
-.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
+
+.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
color: $main_color;
cursor: pointer;
}
-.el-icon-edit-outline{
+
+.el-icon-edit-outline {
margin-right: 15px;
}
@@ -958,8 +974,8 @@
background-color: #f8f8fa;
}
-::v-deep .el-table__body .el-table__row.hover-row td{
- background-color: #eaecef ;
+::v-deep .el-table__body .el-table__row.hover-row td {
+ background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
@@ -975,14 +991,17 @@
.body ::v-deep .el-form-item {
margin-bottom: 0;
}
+
.userDialogVisible ::v-deep .el-form-item {
margin-bottom: 0;
}
-.tableFixed{
- ::v-deep .el-table__fixed-right{
+
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
height: 100% !important;
}
- ::v-deep .el-table__fixed{
+
+ ::v-deep .el-table__fixed {
height: 100% !important;
}
}
--
Gitblit v1.9.3