From 6b32ec29b1cd3ed12845d543e18da18f8456cdda Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 18 十月 2022 18:18:33 +0800
Subject: [PATCH] 1.安灯设置开发完成
---
src/views/scgl/gd.vue | 193 ++++++++++++++++++++++++++++++++----------------
1 files changed, 128 insertions(+), 65 deletions(-)
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 5e90e95..66409b9 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -15,12 +15,12 @@
<el-form
ref="form"
:model="form"
- label-width="80px"
+ label-width="100px"
inline
style="display: flex;justify-content: space-between"
>
<div class="elForm">
- <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
+ <el-form-item label-width="70px" label="璁㈠崟鐘舵��" style=" display: flex;">
<el-select
v-model="form.mesorderstus"
:popper-append-to-body="false"
@@ -59,7 +59,7 @@
/>
</el-select>
</el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label-width="70px" label="浜у搧缂栫爜" style=" display: flex;">
<el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
<el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
@@ -71,7 +71,7 @@
<el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
<el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label-width="70px" label="鍒涘缓鏃堕棿" style=" display: flex;">
<!-- <el-date-picker-->
<!-- v-model="form.createdate"-->
<!-- type="daterange"-->
@@ -92,46 +92,41 @@
/>
</el-form-item>
</div>
- <div>
- <div class="bodySearchReset">
- <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
- <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
- </div>
- <!-- <div v-if="!isIpad" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
- <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
- <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
- <!-- <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
- <!-- </div>-->
- <!-- <div v-if="isIpad" style="display: flex;flex-direction: column;align-items: end">-->
- <!-- <div style="display: flex;margin: 10px 0">-->
- <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
- <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
- <!-- </div>-->
- <!-- <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
- <!-- </div>-->
+ <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+ <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+ <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
+
</el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverType==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverType=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverType==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+ @click="isExpandForm=!isExpandForm"
+ @mouseout="mouseHoverType=$event.type"
+ />
+ </div>
</div>
- <div
- class="bodyTopFormExpand"
- @click="isExpandForm=!isExpandForm"
- >
- <i
- :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
- :style="{color:'#42B983'}"
- /></div>
-
- <div class="elTableDiv" style="margin-top: 0">
+ <div class="elTableDiv">
<el-table
ref="tableDataRef"
class="tableFixed"
:data="tableData"
- :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
+ :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
border
:row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px'}"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -210,6 +205,7 @@
prop="partname"
min-width="150"
label="浜у搧鍚嶇О"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
@@ -592,6 +588,22 @@
</el-select>
</el-form-item>
</div>
+ <el-form-item label="鐗╂枡娓呭崟" prop="bomId">
+ <el-select
+ v-model="dialogForm.bomId"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px;"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in bomIdArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
<el-form-item label="璁″垝寮�濮嬫椂闂�" prop="planstartdate">
<el-date-picker
v-model="dialogForm.planstartdate"
@@ -627,6 +639,12 @@
:value="item.code"
/>
</el-select>
+ </el-form-item>
+ <el-form-item label="鏄惁鎺掔▼" prop="isAps">
+ <el-radio-group v-model="dialogForm.isAps">
+ <el-radio key="Y" label="Y" value="Y">鏄�</el-radio>
+ <el-radio key="N" label="N" value="N">鍚�</el-radio>
+ </el-radio-group>
</el-form-item>
</el-form>
@@ -685,7 +703,12 @@
<div class="footerButton">
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
<!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
- <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -783,12 +806,12 @@
title="婧愬崟鍗曞彿"
:visible.sync="dialogVisibleSource"
width="1200px"
- top="5vh"
+ top="10vh"
class="dialogVisibleSearch"
:close-on-click-modal="false"
@close="dialogVisibleSourceClose"
>
- <div class="bodyTopFormGroup" style="animation: move 1s linear">
+ <div class="bodyTopFormGroup">
<el-form
ref="sourceForm"
:model="sourceForm"
@@ -796,10 +819,8 @@
inline
style="display: flex;justify-content: space-between"
>
- <div class="elForm">
-
+ <div class="elForm" style="justify-content: flex-start">
<el-form-item
-
label="棰勮寮�宸ユ椂闂�"
label-width="100px"
style=" display: flex;font-size: 14px;margin-top: 3px"
@@ -869,32 +890,39 @@
</el-form-item>
</div>
- <div>
- <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2;justify-content: end">
- <el-button type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
- <el-button type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
- </div>
+
+ <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
+ <el-button type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+ <el-button type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
</div>
+
</el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverTypeDialog=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverTypeDialog==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
+ @click="isExpandDialog=!isExpandDialog"
+ @mouseout="mouseHoverTypeDialog=$event.type"
+ />
+ </div>
</div>
- <!-- <el-tooltip :content="!isExpandDialog?'鐐瑰嚮灞曠ず鏇村':'鏀惰捣'" placement="bottom">-->
- <div
- style="display:flex;justify-content: center;
- align-items:center;background-color:#eee;cursor: pointer"
- @click="isExpandDialog=!isExpandDialog"
- >
- <i
- :class="!isExpandDialog?'el-icon-arrow-down':'el-icon-arrow-up'"
- :style="{color:'#42B983'}"
- /></div>
- <!-- </el-tooltip>-->
+
<div class="elTableDiv">
<el-table
:data="sourceTableData"
- :height="(tableHeight-100)+'px'"
+ :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
border
:row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:(tableHeight-100)+'px',}"
+ :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -1571,6 +1599,9 @@
},
data() {
return {
+ mouseHoverType: 'mouseout',
+ mouseHoverTypeDialog: 'mouseout',
+ isExpandForm: false,
isIpad: false,
mainHeight: 0,
tableHeight: 0,
@@ -1621,9 +1652,16 @@
planstartdate: '', // 璁″垝寮�濮嬫椂闂�
planenddate: '', // 璁″垝瀹屾垚鏃堕棿
orderlev: '', // 宸ュ崟绛夌骇
-
+ isAps: 'N', // 鏄惁鎺掔▼
+ bomId: '', // 鐗╂枡娓呭崟id
OperType: '' // 鎿嶄綔绫诲瀷
},
+ bomIdArr: [// 鐗╂枡娓呭崟涓嬫媺 鍥犱负鎺ュ彛杩樻病鍐欙紝鏆傛椂鐢ㄥ啓姝荤殑鍊�
+ { code: 15, name: 'V5' },
+ { code: 14, name: 'V1' },
+ { code: 17, name: 'V7' },
+ { code: 16, name: 'V6' }
+ ],
ordertypeArr: [// 宸ュ崟绫诲瀷
{ code: 'PO', name: '鏍囧噯宸ュ崟' },
{ code: 'FO', name: '鎶ュ簾琛ュ崟' }
@@ -1664,6 +1702,12 @@
],
orderlev: [
{ required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+ ],
+ isAps: [
+ { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+ ],
+ bomId: [
+ { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
]
},
@@ -1768,7 +1812,6 @@
defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
projectTableData: [], // 璁惧鍒楄〃
- isExpandForm: false, // 琛ㄥ崟鏄惁灞曞紑锛岄粯璁や笉灞曞紑
tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
printSize: 1,
printSizeSelectArr: [// 瀹�*楂�
@@ -1894,8 +1937,21 @@
this.dialogForm.planstartdate = handleDatetime(new Date())
this.dialogForm.planenddate = handleDatetime(new Date())
this.dialogForm.orderlev = 3
- },
+ this.dialogForm.bomId = this.getMaxBomId()
+ },
+ // 鏌ユ壘鐗╂枡娓呭崟閲岄潰鐗堟湰鏈�澶х殑鍊�
+ getMaxBomId() {
+ let max = 0// 鏈�澶у��
+ let code = ''// 鏈�澶у�煎搴旂殑code
+ this.bomIdArr.forEach(item => {
+ if (parseFloat(item.name.substring(1)) > max) {
+ max = parseFloat(item.name.substring(1))
+ code = item.code
+ }
+ })
+ return code
+ },
// 浜у搧淇℃伅鍊兼敼鍙�
async partcodeChange(val) {
console.log(val, 22)
@@ -1970,6 +2026,8 @@
this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 绛夌骇
+
+ this.dialogForm.bomId = this.getMaxBomId() // 鏆傛椂鍐欐
})
},
// 鍒犻櫎鎸夐挳
@@ -2069,7 +2127,8 @@
this.dialogForm.planstartdate = '' // 璁″垝寮�濮嬫椂闂�
this.dialogForm.planenddate = '' // 璁″垝瀹屾垚鏃堕棿
this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
-
+ this.dialogForm.isAps = 'N' // 鏄惁鎺掔▼
+ this.dialogForm.bomId = this.getMaxBomId()
this.$refs.dialogForm.clearValidate()
},
// 瀵硅瘽妗嗗彇娑�
@@ -2083,6 +2142,7 @@
if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
}
+
const data = {
// partname: this.dialogForm.partname, // 浜у搧鍚嶇О
// partspec: this.dialogForm.partspec, // 浜у搧瑙勬牸
@@ -2100,9 +2160,11 @@
planstartdate: this.dialogForm.planstartdate, // 璁″垝寮�濮嬫椂闂�
planenddate: this.dialogForm.planenddate, // 璁″垝瀹屾垚鏃堕棿
orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
+ is_aps: this.dialogForm.isAps, // 鏄惁鎺掔▼
+ bom_id: this.dialogForm.bomId, // 鏄惁鎺掔▼
OperType: this.operation === 'add' ? 'Add' : 'Update'
}
-
+ this.$store.state.app.buttonIsDisabled = true
AddUpdateMesOrder(data).then(res => {
if (res.code === '200') {
this.dialogVisible = false
@@ -2112,6 +2174,7 @@
this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
// this.dialogVisible = false
this.getMesOrderSearch()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
}
@@ -2145,7 +2208,7 @@
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
// this.tableHeight = this.mainHeight - 250
- this.tableHeight = this.mainHeight - 470
+ this.tableHeight = this.mainHeight - 515
if (window.innerHeight < 769) {
this.tableHeight = this.tableHeight - 20
}
@@ -2663,12 +2726,12 @@
margin-bottom: 0;
}
-//.elTableDiv {
+.elTableDiv {
::v-deep .el-radio__label {
display: none;
}
-//}
+}
.el-table::before {
height: 0;
--
Gitblit v1.9.3