From 5eeb8864bebb1dc4f97f2feef32b742d8a9a10d5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 14 九月 2022 15:43:04 +0800
Subject: [PATCH] 1.新增报表管理菜单
---
src/views/scgl/scdd.vue | 102 +++++++++++++++++++++++++++++++-------------------
1 files changed, 63 insertions(+), 39 deletions(-)
diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 5cbf831..4b078da 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -49,29 +49,29 @@
<el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
<el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
<el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
-
- <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+ <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 label="棰勮寮�宸ユ椂闂�" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
+ <el-form-item v-show="isExpandForm" label="棰勮寮�宸ユ椂闂�" label-width="100px" style=" line-height: 40px;;display: flex;font-size: 14px;">
<el-date-picker
v-model="form.paystartdate"
type="daterange"
range-separator="~"
class="timeMini"
size="mini"
- style="width: 250px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+ style="width: 200px;display: flex;line-height: 34px;height: 34px;"
:clearable="false"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
/>
+ <!-- font-size: 14px!important;-->
<!-- :picker-options="expireTimeOption"-->
</el-form-item>
- <el-form-item label="棰勮瀹屽伐鏃堕棿" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
+ <el-form-item v-show="isExpandForm" label="棰勮瀹屽伐鏃堕棿" label-width="100px" style=" display: flex;font-size: 14px;">
<el-date-picker
v-model="form.payenddate"
type="daterange"
@@ -79,7 +79,7 @@
class="timeMini"
range-separator="~"
start-placeholder="寮�濮嬫棩鏈�"
- style="width: 250px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
+ style="width: 200px;display: flex;line-height: 34px ;height: 34px ;"
end-placeholder="缁撴潫鏃ユ湡"
size="mini"
/>
@@ -95,7 +95,7 @@
<!-- />-->
</el-form-item>
</div>
- <div style="min-height: 100px">
+ <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="search">鏌ヨ</el-button>
<el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
@@ -132,13 +132,23 @@
</div>
</el-form>
</div>
- <div class="elTableDiv">
+
+ <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">
<el-table
:data="tableData"
- :height="tableHeight+'px'"
+ :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
border
:row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -156,7 +166,7 @@
<el-radio
v-model="radioSelectedId"
:label="row.id"
- style="color: transparent;padding-left: 15px; margin-right: -25px;"
+ style="color: transparent;padding-left: 10px;"
@change.native="getCurrentRow(row.id)"
/>
</template>
@@ -236,14 +246,24 @@
prop="planstartdate"
label="棰勮寮�宸ユ椂闂�"
sortable="custom"
- width="160"
- />
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.planstartdate">{{ row.planstartdate.substring(0,11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="planenddate"
label="棰勮瀹屽伐鏃堕棿"
sortable="custom"
- width="160"
- />
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.planenddate">{{ row.planenddate.substring(0,11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="createuser"
label="鍒涘缓浜哄憳"
@@ -258,9 +278,14 @@
<el-table-column
prop="createdate"
label="鍒涘缓鏃堕棿"
- width="160"
+ width="130"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.createdate">{{ row.createdate.substring(0,11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
label="鎿嶄綔"
fixed="right"
@@ -359,22 +384,11 @@
style="width: 200px"
/>
</el-form-item>
-
- <!-- <el-form-item label="浜や粯鏃堕棿" prop="">-->
- <!-- <el-date-picker-->
- <!-- v-model="dialogForm.markqty"-->
- <!-- type="date"-->
- <!-- style="width: 200px"-->
- <!-- placeholder="閫夋嫨鏃ユ湡"-->
- <!-- />-->
- <!-- <el-input v-model="dialogForm.OrgName" style="width: 200px" />-->
- <!-- </el-form-item>-->
-
</el-form>
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" @click="dialogVisibleConfirm">涓� 杈�</el-button>
+ <el-button type="primary" :disabled="sendButtonIsDisabled" @click="dialogVisibleConfirm">涓� 杈�</el-button>
</div>
</span>
</el-dialog>
@@ -432,7 +446,6 @@
{ code: 'CLOSED', name: '宸插叧闂�' }
],
total: 10,
- radioSelected: '',
radioSelectedId: '',
tableData: [],
dialogVisible: false,
@@ -470,7 +483,8 @@
{ required: true, message: '璇疯緭鍏ヤ笅鍗曞崟鏁�', trigger: ['blur', 'change'] }
]
- }
+ },
+ isExpandForm: false
// expireTimeOption: {
// disabledDate(time) {
// return time.getTime() > Date.now() - 8.64e6 // 濡傛灉娌℃湁鍚庨潰鐨�-8.64e6灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
@@ -581,8 +595,6 @@
},
// 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
getCurrentRow(id) {
- // console.log(row, 2)
- // this.radioSelected = row.wo
this.radioSelectedId = id
},
// 璁㈠崟鍏抽棴
@@ -604,7 +616,6 @@
if (res.code === '200') {
this.$message.success('璁㈠崟鍏抽棴鎴愬姛!')
this.getErpOrderSearch()
- // this.radioSelected = ''
}
})
}).catch(() => {
@@ -658,6 +669,8 @@
this.dialogForm.markqty = ''
this.dialogForm.ordernum = ''
this.dialogForm.relse_qty = ''
+
+ this.sendButtonIsDisabled = false
this.$refs.dialogForm.clearValidate()
},
// 瀵硅瘽妗嗗彇娑�
@@ -666,9 +679,15 @@
},
// 瀵硅瘽妗嗙‘璁�
dialogVisibleConfirm() {
+ this.dialogForm.markqty = parseFloat(this.dialogForm.markqty)
+ this.dialogForm.erpqty = parseFloat(this.dialogForm.erpqty)
+ this.dialogForm.relse_qty = parseFloat(this.dialogForm.relse_qty)
+ this.dialogForm.ordernum = parseFloat(this.dialogForm.ordernum)
if (this.dialogForm.markqty < 1 || this.dialogForm.markqty > this.dialogForm.erpqty - this.dialogForm.relse_qty) {
return this.$message.info('涓嬪崟鏁伴噺瓒呭嚭鍙笅鍗曟暟鐨勮寖鍥达紒')
}
+
+ console.log(this.dialogForm.ordernum < this.dialogForm.markqty)
if (this.dialogForm.ordernum < 1 || this.dialogForm.ordernum > this.dialogForm.markqty) {
return this.$message.info('涓嬪崟鍗曟暟瓒呭嚭鍙笅鍗曞崟鏁扮殑鑼冨洿锛�')
}
@@ -687,7 +706,7 @@
'ordernum': this.dialogForm.ordernum,
'relse_qty': this.dialogForm.relse_qty
}
- console.log(data)
+ this.sendButtonIsDisabled = true
MarkSaveErpOrder(data).then(res => {
if (res.code === '200') {
this.$message.success('涓嬭揪鎴愬姛锛�')
@@ -704,7 +723,7 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 260
+ this.tableHeight = this.mainHeight - 250
this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
if (this.isIpad) {
@@ -723,7 +742,7 @@
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-range-input{
- font-size: 14px !important;
+ //font-size: 14px !important;
}
::v-deep .el-range__icon{
line-height: 28px !important;
@@ -732,7 +751,7 @@
line-height: 28px !important;
}
::v-deep .el-range-input{
- font-size: 14px ;
+ font-size: 14px;
}
::v-deep .el-range-separator{
display: flex;
@@ -826,6 +845,11 @@
margin-bottom: 0;
}
+.elTableDiv {
+ ::v-deep .el-radio__label {
+ display: none;
+ }
+}
</style>
<style>
.el-table .custom-row {
--
Gitblit v1.9.3