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/sckbg.vue | 311 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 245 insertions(+), 66 deletions(-)
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 01bc811..027cbb0 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -12,17 +12,17 @@
v-model="form.orderstepqrcode"
name="produceCode"
style="width: 300px"
- @keyup.native="e=>judgeIsScanning(e,'produceCode')"
@keyup.enter.native="val=>enterNative(val,'produceCode')"
/>
+ <!-- @keyup.native="e=>judgeIsScanning(e,'produceCode')"-->
</div>
<div v-if="false" style="display: flex;padding-right: 10px">
- <el-button @click="ZZstart">
+ <el-button v-waves @click="ZZstart">
<svg-icon icon-class="start_time" style="margin-right: 2px" />
寮�濮�
</el-button>
- <el-button @click="ZZreport">
+ <el-button v-waves @click="ZZreport">
<svg-icon icon-class="report_work" style="margin-right: 2px" />
鎶ュ伐
</el-button>
@@ -31,6 +31,8 @@
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -49,6 +51,7 @@
/>
<el-table-column
prop="status"
+ show-tooltip-when-overflow
label="鐘舵��"
sortable="custom"
width="80"
@@ -58,6 +61,8 @@
<div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
<div v-if="row.status==='START'">寮�宸�</div>
<div v-if="row.status==='CLOSED'">瀹屽伐</div>
+ <div v-if="row.status==='NOSCHED'">寰呮帓绋�</div>
+ <div v-if="row.status==='SCHED'">宸叉帓绋�</div>
</template>
</el-table-column>
<el-table-column
@@ -72,6 +77,7 @@
label="浜у搧缂栫爜"
min-width="110"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="partname"
@@ -103,10 +109,12 @@
label="浠诲姟鏁伴噺"
width="110"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
label="鏈姤宸ユ暟閲�"
width="120"
+ show-tooltip-when-overflow
>
<!-- sortable="custom"-->
<template slot-scope="{row}">
@@ -115,6 +123,7 @@
</el-table-column>
<el-table-column
prop="good_qty"
+ show-tooltip-when-overflow
label="宸叉姤宸ユ暟閲�"
sortable="custom"
width="160"
@@ -122,6 +131,7 @@
<el-table-column
prop="ng_qty"
label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
/>
@@ -129,16 +139,18 @@
prop="bad_qty"
label="宸叉姤搴熸暟閲�"
width="120"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
prop="plan_startdate"
label="璁″垝寮�宸ユ棩鏈�"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -147,10 +159,11 @@
label="璁″垝瀹屽伐鏃ユ湡"
width="150"
sortable="custom"
+ show-tooltip-when-overflow
fixed="right"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -161,8 +174,8 @@
<!-- >-->
<!-- <template slot-scope="{row}">-->
<!-- <div class="operationClass">-->
- <!-- <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
- <!-- <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+ <!-- <el-button v-waves type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+ <!-- <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
@@ -201,16 +214,17 @@
v-model="WXform.orderstepqrcode"
name="WXproduceCode"
style="width: 300px"
- @keyup.native="e=>judgeIsScanning(e,'WXproduceCode')"
@keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
/>
+ <!-- @keyup.native="e=>judgeIsScanning(e,'WXproduceCode')"-->
+
</div>
<div v-if="false" style="display: flex;padding-right: 10px">
- <el-button @click="WXsend">
+ <el-button v-waves @click="WXsend">
<svg-icon icon-class="start_time" style="margin-right: 2px" />
鍙戞枡
</el-button>
- <el-button @click="WXback">
+ <el-button v-waves @click="WXback">
<svg-icon icon-class="report_work" style="margin-right: 2px" />
鏀舵枡
</el-button>
@@ -219,6 +233,8 @@
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="WXtableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -238,6 +254,7 @@
<el-table-column
prop="status"
label="鐘舵��"
+ show-tooltip-when-overflow
sortable="custom"
width="80"
>
@@ -258,6 +275,7 @@
<el-table-column
prop="partcode"
label="浜у搧缂栫爜"
+ show-tooltip-when-overflow
width="110"
sortable="custom"
/>
@@ -272,6 +290,7 @@
prop="stepname"
label="宸ュ簭"
width="120"
+ show-tooltip-when-overflow
sortable="custom"
/>
<!-- <el-table-column-->
@@ -288,12 +307,14 @@
<el-table-column
prop="plan_qty"
label="浠诲姟鏁伴噺"
+ show-tooltip-when-overflow
width="110"
sortable="custom"
/>
<el-table-column
- label="鏈姤宸ユ暟閲�"
+ label="鏈敹鏂欐暟閲�"
width="120"
+ show-tooltip-when-overflow
>
<!-- sortable="custom"-->
<template slot-scope="{row}">
@@ -303,12 +324,14 @@
<el-table-column
prop="good_qty"
label="宸叉敹鏂欐暟閲�"
+ show-tooltip-when-overflow
sortable="custom"
width="160"
/>
<el-table-column
prop="ng_qty"
label="涓嶈壇鏁伴噺"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
/>
@@ -317,27 +340,30 @@
label="宸叉姤搴熸暟閲�"
min-width="120"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="plan_startdate"
label="璁″垝寮�宸ユ棩鏈�"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
<el-table-column
prop="plan_enddate"
label="璁″垝瀹屽伐鏃ユ湡"
+ show-tooltip-when-overflow
width="150"
sortable="custom"
fixed="right"
>
<template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+ <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -348,8 +374,8 @@
<!-- >-->
<!-- <template slot-scope="{row}">-->
<!-- <div class="operationClass">-->
- <!-- <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
- <!-- <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+ <!-- <el-button v-waves type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
+ <!-- <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
@@ -376,14 +402,17 @@
v-model="badForm.orderstepqrcode"
name="badProduceCode"
style="width: 300px"
- @keyup.native="e=>judgeIsScanning(e,'badProduceCode')"
@keyup.enter.native="val=>enterNative(val,'badProduceCode')"
/>
+ <!-- @keyup.native="e=>judgeIsScanning(e,'badProduceCode')"-->
+
</div>
</div>
<el-divider />
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="badTableData"
:height="isIpad? (tableHeight+50):tableHeight"
border
@@ -401,18 +430,21 @@
fixed
/>
<el-table-column
+ show-tooltip-when-overflow
prop="wo_code"
label="宸ュ崟鍙�"
min-width="160"
sortable="custom"
/>
<el-table-column
+ show-tooltip-when-overflow
prop="partcode"
label="浜у搧缂栫爜"
min-width="110"
sortable="custom"
/>
<el-table-column
+ show-tooltip-when-overflow
prop="partname"
min-width="160"
label="浜у搧鍚嶇О"
@@ -421,6 +453,7 @@
<el-table-column
prop="stepname"
label="宸ュ簭"
+ show-tooltip-when-overflow
min-width="120"
sortable="custom"
/>
@@ -428,6 +461,7 @@
prop="plan_qty"
label="浠诲姟鏁伴噺"
width="110"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
@@ -435,11 +469,13 @@
label="宸叉姤宸ユ暟閲�"
sortable="custom"
min-width="160"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="ng_qty"
label="涓嶈壇鏁伴噺"
width="150"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
@@ -447,6 +483,7 @@
label="宸叉姤搴熸暟閲�"
width="120"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
label="鎿嶄綔"
@@ -455,7 +492,7 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button type="text" @click="repairHandle(row)">缁翠慨澶勭悊</el-button>
+ <el-button v-waves type="text" @click="repairHandle(row)">缁翠慨澶勭悊</el-button>
</div>
</template>
</el-table-column>
@@ -478,6 +515,7 @@
</div>
<el-dialog
+ v-el-drag-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
width="850px"
@@ -598,6 +636,7 @@
placeholder="璇烽�夋嫨"
:disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
multiple
+ collapse-tags
>
<el-option
v-for="item in badArr"
@@ -628,11 +667,13 @@
<el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
</el-form-item>
<div v-if="dialogTitle==='鑷埗鎶ュ伐'">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 浜哄憳鍒楄〃
- <el-button type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 浜哄憳鍒楄〃
+ <el-button v-waves type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
<el-table
+ ref="userTableDataRef"
:data="userTableData"
border
+ class="tableFixed"
:row-class-name="tableRowClassName"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -649,6 +690,7 @@
<el-table-column
prop="username"
label="浜哄憳鍚嶇О"
+ show-tooltip-when-overflow
>
<template slot-scope="{row}">
<div v-if="row.isVisible===0">{{ row.username }}</div>
@@ -675,9 +717,9 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">鍒犻櫎</el-button>
- <el-button v-if="row.isVisible===1&&!userIsSave" type="text" @click="userSave(row)">淇濆瓨</el-button>
- <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">鍙栨秷</el-button>
+ <el-button v-if="row.isVisible===0" v-waves type="text" @click="userDel(row)">鍒犻櫎</el-button>
+ <el-button v-if="row.isVisible===1&&!userIsSave" v-waves type="text" @click="userSave(row)">淇濆瓨</el-button>
+ <el-button v-if="row.isVisible===1" v-waves type="text" @click="userCancel(row)">鍙栨秷</el-button>
</div>
</template>
</el-table-column>
@@ -813,6 +855,7 @@
v-model="dialogForm.badcode"
style="width: 200px;"
multiple
+ collapse-tags
:disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
placeholder="璇烽�夋嫨"
>
@@ -824,37 +867,82 @@
/>
</el-select>
</el-form-item>
- <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">
- <el-select
- v-model="dialogForm.operation"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in OperationArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
+ <!-- <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">-->
+ <!-- <el-select-->
+ <!-- v-model="dialogForm.operation"-->
+ <!-- style="width: 200px;"-->
+ <!-- placeholder="璇烽�夋嫨"-->
+ <!-- >-->
+ <!-- <el-option-->
+ <!-- v-for="item in OperationArr"-->
+ <!-- :key="item.usercode"-->
+ <!-- :label="item.username"-->
+ <!-- :value="item.usercode"-->
+ <!-- />-->
+ <!-- </el-select>-->
+ <!-- </el-form-item>-->
<el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="澶囨敞锛�">
<el-input v-model="dialogForm.remarks" type="textarea" 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 v-if="dialogTitle==='鑷埗寮�濮�'" type="primary" @click="dialogVisibleConfirm">寮� 宸�</el-button>
- <el-button v-if="dialogTitle==='鑷埗鎶ュ伐'" type="primary" @click="dialogVisibleConfirm">鎻愪氦/鎵撳嵃</el-button>
- <el-button v-if="dialogTitle==='澶栧崗鍙戞枡'" type="primary" @click="dialogVisibleConfirm">鍙戞枡</el-button>
- <el-button v-if="dialogTitle==='澶栧崗鏀舵枡'" type="primary" @click="dialogVisibleConfirm">鏀舵枡/鎵撳嵃</el-button>
+ <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-if="dialogTitle==='鑷埗寮�濮�'"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >寮� 宸�</el-button>
+ <el-button
+ v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.nextstepname===''"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鎻愪氦/鎵撳嵃</el-button>
+ <el-button
+ v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.nextstepname!==''"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鎻愪氦</el-button>
+ <el-button
+ v-if="dialogTitle==='澶栧崗鍙戞枡'"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鍙戞枡</el-button>
+ <el-button
+ v-if="dialogTitle==='澶栧崗鏀舵枡'&&dialogForm.nextstepname===''"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鏀舵枡/鎵撳嵃</el-button>
+ <el-button
+ v-if="dialogTitle==='澶栧崗鏀舵枡'&&dialogForm.nextstepname!==''"
+ v-waves
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鏀舵枡</el-button>
</div>
</span>
</el-dialog>
<!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
<el-dialog
+ v-el-drag-dialog
title="棰勮"
:visible.sync="dialogVisible2"
width="1140"
@@ -875,7 +963,9 @@
>
<div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
</div>
- <div style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center">
+ <div
+ style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+ >
<div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
{{ qrForm.startqty }}
</div>
@@ -921,14 +1011,15 @@
</div>
<span slot="footer" class="dialog-footer">
<div class="footerButton">
- <el-button @click="dialogVisible2 = false">鍙� 娑�</el-button>
- <el-button v-print="printObj2" type="primary">纭� 瀹�</el-button>
+ <el-button v-waves @click="dialogVisible2 = false">鍙� 娑�</el-button>
+ <el-button v-waves v-print="printObj2" type="primary">纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
<!-- 涓嶈壇澶勭悊鍒楄〃瀵硅瘽妗�-->
<el-dialog
+ v-el-drag-dialog
title="缁翠慨澶勭悊"
:visible.sync="badDialogVisible"
width="990px"
@@ -988,7 +1079,7 @@
</el-form>
<div style="margin-bottom:20px">
- <i class="el-icon-s-operation" style="color:#42b983;" /> 涓嶈壇淇℃伅鏄庣粏锛�
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 涓嶈壇淇℃伅鏄庣粏锛�
</div>
<div class="elTableDiv">
<el-table
@@ -1072,11 +1163,11 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button v-if="row.isVisible===0" type="text" @click="badEdit(row)">缂栬緫</el-button>
- <el-button v-if="row.isVisible===0" type="text" @click="badDel(row)">鍒犻櫎</el-button>
+ <el-button v-if="row.isVisible===0" v-waves type="text" @click="badEdit(row)">缂栬緫</el-button>
+ <el-button v-if="row.isVisible===0" v-waves type="text" @click="badDel(row)">鍒犻櫎</el-button>
- <el-button v-if="row.isVisible===1" type="text" @click="badSave(row)">纭</el-button>
- <el-button v-if="row.isVisible===1" type="text" @click="badCancel(row)">鍙栨秷</el-button>
+ <el-button v-if="row.isVisible===1" v-waves type="text" @click="badSave(row)">纭</el-button>
+ <el-button v-if="row.isVisible===1" v-waves type="text" @click="badCancel(row)">鍙栨秷</el-button>
</div>
</template>
</el-table-column>
@@ -1085,8 +1176,14 @@
</div>
<span slot="footer" class="dialog-footer">
<div class="footerButton">
- <el-button @click="badDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" @click="badDialogVisibleConfirm ">淇� 瀛�/鎵� 鍗�</el-button>
+ <el-button v-waves @click="badDialogVisibleCancel">鍙� 娑�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="badDialogVisibleConfirm "
+ >淇� 瀛�/鎵� 鍗�</el-button>
</div>
</span>
</el-dialog>
@@ -1116,6 +1213,8 @@
import QRCode from 'qrcodejs2'
import { getCookie } from '@/utils/auth'
import { handleDatetime2 } from '@/utils/global'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -1123,6 +1222,7 @@
components: {
Pagination
},
+ directives: { elDragDialog, waves },
data() {
const validateName = (rule, value, callback) => {
if (!value) {
@@ -1196,7 +1296,7 @@
taskqty: '', // 浠诲姟鏁伴噺
fqty: '', // 鍙戞枡鏁伴噺
- inuser: '', // 鏀舵枡浜哄憳
+ inuser: getCookie('navTabId'), // 鏀舵枡浜哄憳
sqty: '', // 鏀舵枡鏁伴噺
ngqty: '', // 涓嶈壇鏁伴噺
badcode: '', // 涓嶈壇鍘熷洜缂栫爜
@@ -1305,7 +1405,8 @@
badTableDataDialog: [], // 涓嶈壇瀵硅瘽妗唗able琛ㄦ牸
OperationArr: [], // 浜哄憳鏁扮粍
sendButtonIsDisabled: false, // 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
- judgeIsScanningArr: []// 鍒ゆ柇鏄惁鎵爜鏁扮粍
+ judgeIsScanningArr: [], // 鍒ゆ柇鏄惁鎵爜鏁扮粍
+ countJudgeIsScanningInput: 0 // 鍒ゆ柇鎵爜妗嗙殑涓暟
}
},
watch: {
@@ -1470,13 +1571,68 @@
}
},
// 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
+ judgeIsScanning2(e, belong) {
+ if (belong === 'produceCode' && this.form.orderstepqrcode.toString().length === 0) {
+ this.judgeIsScanningArr = []
+ this.countJudgeIsScanningInput = 0
+ }
+ if (belong === 'WXproduceCode' && this.WXform.orderstepqrcode.toString().length === 0) {
+ this.judgeIsScanningArr = []
+ this.countJudgeIsScanningInput = 0
+ }
+ const timenow = e.timeStamp
+ // console.log(timenow, 1)
+ // let flag = true
+ let flag = false
+ this.judgeIsScanningArr.push(timenow)
+ let i
+
+ for (i in this.judgeIsScanningArr) {
+ console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]))
+ // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
+ if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1) {
+ this.countJudgeIsScanningInput++
+ }
+ if (this.countJudgeIsScanningInput >= 3) {
+ flag = true
+ }
+ if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
+ if (flag) {
+ console.log(flag, 1)
+ this.fnThrottle(this.enterNative, 500, 2000, belong)()
+ return
+ }
+ }
+ }
+
+ // // for (i in this.judgeIsScanningArr) {
+ // // console.log(i)
+ // // console.log( this.judgeIsScanningArr)
+ // console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]))
+ // if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 10) {
+ // this.countJudgeIsScanningInput++
+ // }
+ // if (this.countJudgeIsScanningInput > this.judgeIsScanningArr.length / 2) {
+ // flag = true
+ // }
+ // // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
+ // // if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
+ // if (flag) {
+ // console.log(flag, 2)
+ // this.fnThrottle(this.enterNative, 500, 2000, belong)()
+ // return
+ // }
+ // // }
+ // // }
+ },
+ // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
judgeIsScanning(e, belong) {
const timenow = e.timeStamp
let flag = true
this.judgeIsScanningArr.push(timenow)
let i
for (i in this.judgeIsScanningArr) {
- flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 1
+ flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
if (flag) {
this.fnThrottle(this.enterNative, 500, 2000, belong)()
@@ -1718,9 +1874,14 @@
})
this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode))
+
+ this.$refs.tableDataRef.doLayout()
},
// 鐢ㄦ埛娣诲姞
userAdd() {
+ if (this.userTableData.find(i => i.isVisible === 1)) {
+ return this.$message.info('璇峰厛淇濆瓨褰撳墠琛屼俊鎭紒')
+ }
let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
number = number === 0 ? (10 + Math.random()) : number
console.log(this.userTableData, 6)
@@ -1806,7 +1967,7 @@
this.dialogForm.taskqty = '', // 浠诲姟鏁伴噺
this.dialogForm.fqty = '', // 鍙戞枡鏁伴噺
- this.dialogForm.inuser = '', // 鏀舵枡浜哄憳
+ this.dialogForm.inuser = getCookie('navTabId'), // 鏀舵枡浜哄憳 榛樿鐧诲綍浜哄憳
this.dialogForm.sqty = '', // 鏀舵枡鏁伴噺
this.dialogForm.ngqty = '', // 涓嶈壇鏁伴噺
this.dialogForm.badcode = '', // 涓嶈壇鍘熷洜缂栫爜
@@ -1851,11 +2012,13 @@
taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
fqty: this.dialogForm.fqty // 鍙戞枡鏁伴噺
}
+ this.$store.state.app.buttonIsDisabled = true
SavaMesOrderStepOut(data).then(res => {
if (res.code === '200') {
- this.$message.success('鍙戞枡鎴愬姛锛�')
this.dialogVisible = false
+ this.$message.success('鍙戞枡鎴愬姛锛�')
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鍙戞枡澶辫触!')
}
@@ -1886,16 +2049,17 @@
ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
}
+ this.$store.state.app.buttonIsDisabled = true
SavaMesOrderStepIn(data).then(res => {
if (res.code === '200') {
+ this.dialogVisible = false
this.$message.success('鏀舵枡鎴愬姛锛�')
-
if (this.dialogForm.nextstepcode === '') {
- this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
+ this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
this.dialogVisible2 = true
}
- this.dialogVisible = false
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鏀舵枡澶辫触!')
}
@@ -1912,11 +2076,13 @@
taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
startqty: this.dialogForm.startqty// 寮�濮嬫暟閲�
}
+ this.$store.state.app.buttonIsDisabled = true
SavaMesOrderStepStart(data).then(res => {
if (res.code === '200') {
- this.$message.success('寮�宸ユ垚鍔燂紒')
this.dialogVisible = false
+ this.$message.success('寮�宸ユ垚鍔燂紒')
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('寮�宸ュけ璐�!')
}
@@ -1961,17 +2127,17 @@
ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
}
-
+ this.$store.state.app.buttonIsDisabled = true
SavaMesOrderStepReport(data).then(res => {
if (res.code === '200') {
+ this.dialogVisible = false
this.$message.success('鎶ュ伐鎴愬姛锛�')
-
if (this.dialogForm.nextstepcode === '') {
this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
this.dialogVisible2 = true
}
- this.dialogVisible = false
this.tabClick()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error('鎶ュ伐澶辫触!')
}
@@ -2040,6 +2206,7 @@
if (window.innerHeight < 769) {
this.tableHeight = this.tableHeight - 50
}
+ this.$refs.tableDataRef.doLayout()
})
},
@@ -2056,13 +2223,16 @@
const data = {
Data: this.badTableDataDialog
}
+ this.$store.state.app.buttonIsDisabled = true
EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => {
if (res.code === '200' || res.code === '301') {
this.getBadList()
this.badDialogVisible = false
this.badPrint(this.OperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
this.dialogVisible2 = true
- return this.$message.success('淇濆瓨鎴愬姛锛�')
+ this.$message.success('淇濆瓨鎴愬姛锛�')
+
+ this.$store.state.app.buttonIsDisabled = false
}
})
},
@@ -2075,7 +2245,7 @@
this.qrForm.nextstepname = this.badDialogForm.nextstepname
this.qrForm.operator = username
this.qrForm.operatorTime = handleDatetime2(new Date())
- console.log(this.qrForm, 22)
+
this.$nextTick(() => {
this.bindQRCode(this.qrForm.qrvalue)
})
@@ -2087,7 +2257,7 @@
this.badTableDataDialog = []
this.judgeIsScanningArr = []
},
- async getMesOrderSelectUserAll() {
+ async getMesOrderSelectUserAll() {
const { data: res } = await MesOrderSelectUser({ usercode: '' })
this.OperationArr = res
},
@@ -2370,6 +2540,15 @@
margin-bottom: 0;
}
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
+ height: 100% !important;
+ }
+
+ ::v-deep .el-table__fixed {
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3