From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改
---
src/views/scgl/scdd.vue | 286 ++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 204 insertions(+), 82 deletions(-)
diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index f8b4fdc..a54b462 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -4,11 +4,13 @@
<div class="bodyTopButtonGroup" style="justify-content: space-between">
<el-button
+ v-waves
icon="el-icon-refresh-right"
@click="syncERP"
>鍚屾ERP
</el-button>
<el-button
+ v-waves
icon="el-icon-switch-button"
@click="orderClose"
>鍏抽棴璁㈠崟
@@ -21,7 +23,7 @@
:model="form"
label-width="100px"
inline
- style="display: flex;justify-content: space-between"
+ style="display: flex;"
>
<div class="elForm">
<el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
@@ -49,29 +51,39 @@
<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="display: flex;font-size: 14px;align-items: center"
+ >
<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;align-items: center"
+ >
<el-date-picker
v-model="form.payenddate"
type="daterange"
@@ -79,7 +91,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,54 +107,50 @@
<!-- />-->
</el-form-item>
</div>
- <div style="min-height: 100px">
- <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>
- </div>
- <!-- <div v-if="!isIpad" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- icon="el-icon-refresh-right"-->
- <!-- @click="reset('update')"-->
- <!-- >鍚屾ERP-->
- <!-- </el-button>-->
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- icon="el-icon-switch-button"-->
- <!-- @click="orderClose"-->
- <!-- >鍏抽棴璁㈠崟-->
- <!-- </el-button>-->
- <!-- </div>-->
- <!-- <div v-if="isIpad" style="display: flex;flex-direction: column;align-items: end">-->
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- icon="el-icon-refresh-right"-->
- <!-- style="margin: 10px 0"-->
- <!-- @click="reset('update')"-->
- <!-- >鍚屾ERP-->
- <!-- </el-button>-->
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- icon="el-icon-switch-button"-->
- <!-- @click="orderClose"-->
- <!-- >鍏抽棴璁㈠崟-->
- <!-- </el-button>-->
- <!-- </div>-->
+
+ <div
+ class="bodySearchReset"
+ :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
+ >
+ <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+ <el-button v-waves 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="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
: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"
@sort-change="sortChange"
+ @row-click="rowClick"
>
<!-- <el-table-column-->
<!-- type="selection"-->
@@ -157,8 +165,8 @@
v-model="radioSelectedId"
:label="row.id"
style="color: transparent;padding-left: 10px;"
- @change.native="getCurrentRow(row.id)"
/>
+ <!-- @change.native="getCurrentRow(row.id)"-->
</template>
</el-table-column>
<el-table-column
@@ -172,6 +180,7 @@
label="璁㈠崟鐘舵��"
sortable="custom"
width="110"
+ show-tooltip-when-overflow
>
<template slot-scope="{row}">
<div v-if="row.status==='NEW'">鏂拌鍗�</div>
@@ -183,6 +192,7 @@
<el-table-column
prop="wo"
label="璁㈠崟缂栧彿"
+ show-tooltip-when-overflow
sortable="custom"
min-width="150"
/>
@@ -190,6 +200,7 @@
prop="partcode"
label="浜у搧缂栫爜"
sortable="custom"
+ show-tooltip-when-overflow
min-width="150"
/>
<el-table-column
@@ -197,11 +208,13 @@
label="浜у搧鍚嶇О"
sortable="custom"
min-width="150"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="partspec"
label="浜у搧瑙勬牸"
sortable="custom"
+ show-tooltip-when-overflow
min-width="110"
>
<template slot-scope="{row}">
@@ -213,17 +226,20 @@
prop="qty"
label="璁㈠崟鏁伴噺"
width="150"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
prop="relse_qty"
label="宸蹭笅鍗曟暟閲�"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
/>
<el-table-column
prop="wkshp_name"
label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
sortable="custom"
width="150"
>
@@ -234,27 +250,42 @@
</el-table-column>
<el-table-column
prop="planstartdate"
+ show-tooltip-when-overflow
label="棰勮寮�宸ユ椂闂�"
sortable="custom"
width="130"
>
<template slot-scope="{row}">
- <div v-if="row.planstartdate">{{ row.planstartdate.substring(0,11) }}</div>
+ <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="棰勮瀹屽伐鏃堕棿"
+ show-tooltip-when-overflow
sortable="custom"
width="130"
>
<template slot-scope="{row}">
- <div v-if="row.planenddate">{{ row.planenddate.substring(0,11) }}</div>
+ <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
<el-table-column
+ prop="saleOrderDeliveryDate"
+ label="棰勮浜や粯鏃ユ湡"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.saleOrderDeliveryDate">{{ row.saleOrderDeliveryDate.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ show-tooltip-when-overflow
prop="createuser"
label="鍒涘缓浜哄憳"
sortable="custom"
@@ -269,10 +300,11 @@
prop="createdate"
label="鍒涘缓鏃堕棿"
width="130"
+ show-tooltip-when-overflow
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.createdate">{{ row.createdate.substring(0,11) }}</div>
+ <div v-if="row.createdate">{{ row.createdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -284,8 +316,13 @@
<template slot-scope="{row}">
<div class="operationClass">
<el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">
- <!-- <el-button type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
- <i class="el-icon-bottom" style="color:#42b983;cursor: pointer;margin-left: 5px" @click="edit('edit',row)" />
+ <!-- <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
+ <i
+ class="el-icon-bottom"
+ :style="{color:$store.state.settings.theme}"
+ style="cursor: pointer;margin-left: 5px"
+ @click="edit('edit',row)"
+ />
</el-tooltip>
</div>
</template>
@@ -305,15 +342,16 @@
</div>
<el-dialog
+ v-el-drag-dialog
:title="operation==='add'?'鏂板':'涓嬭揪'"
:visible.sync="dialogVisible"
- width="800px"
+ width="860px"
top="15vh"
:close-on-click-modal="false"
@closed="handleClose"
@close="handleClose"
>
- <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
+ <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="106px">
<!-- <el-form-item label="璁㈠崟鐘舵��" prop="erporderstus">-->
<!-- <el-select-->
<!-- v-model="dialogForm.erporderstus"-->
@@ -374,11 +412,31 @@
style="width: 200px"
/>
</el-form-item>
+ <el-form-item label="棰勮浜や粯鏃ユ湡" prop="saleOrderDeliveryDate">
+ <el-date-picker
+ v-model="dialogForm.saleOrderDeliveryDate"
+ type="date"
+ size="mini"
+ :clearable="false"
+ class="dateMini"
+ :picker-options="pickerOptions"
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ :disabled="dialogForm.saleOrderDeliveryDateIsDisabled"
+ />
+ </el-form-item>
+
</el-form>
<span slot="footer" class="dialog-footer">
<div class="footerButton">
- <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" :disabled="sendButtonIsDisabled" @click="dialogVisibleConfirm">涓� 杈�</el-button>
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >涓� 杈�</el-button>
</div>
</span>
</el-dialog>
@@ -390,6 +448,8 @@
import { ClosedErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/scgl'
import { handleDatetime } from '@/utils/global'
import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -397,6 +457,7 @@
components: {
Pagination
},
+ directives: { elDragDialog, waves },
data() {
const validateName = (rule, value, callback) => {
if (!value) {
@@ -410,7 +471,8 @@
}
}
return {
- isIpad: false,
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -424,7 +486,7 @@
paystartdate: '', // 棰勮寮�宸ユ椂闂�
payenddate: '', // 棰勮瀹屽伐鏃堕棿
createdate: '', // 鍒涘缓鏃堕棿
- prop: 'createdate', // 鎺掑簭瀛楁
+ prop: 'wo', // 鎺掑簭瀛楁
order: 'desc', // 鎺掑簭瀛楁
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
@@ -456,7 +518,10 @@
erpqty: '', // 璁㈠崟鏁伴噺
markqty: '', // 涓嬪崟鏁伴噺
ordernum: '', // 涓嬪崟鍗曟暟
- relse_qty: '' // 宸蹭笅鍗曟暟閲�
+ relse_qty: '', // 宸蹭笅鍗曟暟閲�
+ saleOrderDeliveryDate: '', // 棰勮浜や粯鏃ユ湡
+
+ saleOrderDeliveryDateIsDisabled: false// 棰勮浜や粯鏃ユ湡瀛楁鏄惁鍙慨鏀�
},
operation: '',
dialogFormRules: {
@@ -471,9 +536,18 @@
],
ordernum: [
{ required: true, message: '璇疯緭鍏ヤ笅鍗曞崟鏁�', trigger: ['blur', 'change'] }
+ ],
+ saleOrderDeliveryDate: [
+ { required: true, message: '璇烽�夋嫨棰勮浜や粯鏃ユ湡', trigger: ['blur', 'change'] }
]
+ },
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
}
+
// expireTimeOption: {
// disabledDate(time) {
// return time.getTime() > Date.now() - 8.64e6 // 濡傛灉娌℃湁鍚庨潰鐨�-8.64e6灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
@@ -586,6 +660,9 @@
getCurrentRow(id) {
this.radioSelectedId = id
},
+ rowClick(row) {
+ this.radioSelectedId = row.id
+ },
// 璁㈠崟鍏抽棴
async orderClose() {
if (this.radioSelectedId.length < 1) {
@@ -621,6 +698,10 @@
},
// 淇敼鎸夐挳
edit(operation, row) {
+ if (parseFloat(row.qty) === parseFloat(row.relse_qty)) {
+ return this.$message.info('姝ゅ伐鍗曞凡鍏ㄩ儴涓嬭揪锛�')
+ }
+
this.operation = operation
this.dialogVisible = true
@@ -635,6 +716,10 @@
this.dialogForm.wkshopname = row.wkshp_name
this.dialogForm.warehousecode = row.stck_code
this.dialogForm.warehousename = row.stck_name
+
+ this.dialogForm.saleOrderDeliveryDate = row.saleOrderDeliveryDate
+
+ this.dialogForm.saleOrderDeliveryDateIsDisabled = this.dialogForm.saleOrderDeliveryDate !== null
this.dialogForm.erpqty = row.qty
this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty)
@@ -654,12 +739,15 @@
this.dialogForm.warehousecode = ''
this.dialogForm.warehousename = ''
+ this.dialogForm.saleOrderDeliveryDate = ''
+
this.dialogForm.erpqty = ''
this.dialogForm.markqty = ''
this.dialogForm.ordernum = ''
this.dialogForm.relse_qty = ''
- this.sendButtonIsDisabled = false
+ this.dialogForm.saleOrderDeliveryDateIsDisabled = false
+
this.$refs.dialogForm.clearValidate()
},
// 瀵硅瘽妗嗗彇娑�
@@ -676,13 +764,13 @@
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('涓嬪崟鍗曟暟瓒呭嚭鍙笅鍗曞崟鏁扮殑鑼冨洿锛�')
}
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
const data = {
'erporderid': this.dialogForm.erporderid,
// 'erporderstus': this.dialogForm.erporderstus,
@@ -693,14 +781,16 @@
'erpqty': this.dialogForm.erpqty,
'markqty': this.dialogForm.markqty,
'ordernum': this.dialogForm.ordernum,
- 'relse_qty': this.dialogForm.relse_qty
+ 'relse_qty': this.dialogForm.relse_qty,
+ 'saleOrderDeliveryDate': handleDatetime(this.dialogForm.saleOrderDeliveryDate) + ' 00:00:00'
}
- this.sendButtonIsDisabled = true
+
MarkSaveErpOrder(data).then(res => {
if (res.code === '200') {
- this.$message.success('涓嬭揪鎴愬姛锛�')
this.dialogVisible = false
+ this.$message.success('涓嬭揪鎴愬姛锛�')
this.getErpOrderSearch()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('涓嬭揪澶辫触锛�')
}
@@ -712,12 +802,9 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 260
- this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.tableHeight = this.mainHeight - 250
- if (this.isIpad) {
- this.tableHeight = this.tableHeight - 20
- }
+ this.$refs.tableDataRef.doLayout()
})
},
tableRowClassName({ row, rowIndex }) {
@@ -730,29 +817,34 @@
<!--鍏叡椤甸潰鏍峰紡-->
<style lang="scss" scoped>
$main_color: #42b983;
-::v-deep .el-range-input{
- font-size: 14px !important;
+::v-deep .el-range-input {
+ //font-size: 14px !important;
}
-::v-deep .el-range__icon{
+
+::v-deep .el-range__icon {
line-height: 28px !important;
}
-::v-deep .el-range-separator{
+
+::v-deep .el-range-separator {
line-height: 28px !important;
}
-::v-deep .el-range-input{
- font-size: 14px ;
+
+::v-deep .el-range-input {
+ font-size: 14px;
}
-::v-deep .el-range-separator{
+
+::v-deep .el-range-separator {
display: flex;
justify-content: center;
align-items: center;
}
-.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;
}
@@ -813,8 +905,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 {
@@ -830,6 +922,7 @@
.body ::v-deep .el-form-item {
margin-bottom: 0;
}
+
.userDialogVisible ::v-deep .el-form-item {
margin-bottom: 0;
}
@@ -839,15 +932,44 @@
display: none;
}
}
+
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
+ height: 100% !important;
+ }
+
+ ::v-deep .el-table__fixed {
+ height: 100% !important;
+ }
+}
+
+.dateMini {
+ ::v-deep .el-input__inner {
+ line-height: 34px;
+ height: 34px;
+ width: 200px;
+ display: flex;
+ font-size: 14px !important;
+ align-items: center !important;
+ }
+
+ ::v-deep .el-input__prefix {
+ margin-top: -3px;
+ }
+}
+
</style>
<style>
.el-table .custom-row {
background: #f8f8fa;
}
-</style>
-<style>
-.osloading{
- font-size: 40px;
+
+.osloading {
+ font-size: 26px !important;
}
+.el-loading-text {
+ font-size: 26px !important;
+}
</style>
+
--
Gitblit v1.9.3