From b8b16d90fd13bcad5881a4562b5bbe96e576bd6b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 03 八月 2022 16:27:56 +0800
Subject: [PATCH] 1.解决工单手动打印大二维码问题
---
src/views/wlgl/ckdy.vue | 73 +++++++++++++++++++++++++++++++-----
1 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/src/views/wlgl/ckdy.vue b/src/views/wlgl/ckdy.vue
index 9f871ec..d689952 100644
--- a/src/views/wlgl/ckdy.vue
+++ b/src/views/wlgl/ckdy.vue
@@ -32,6 +32,12 @@
<el-divider />
<div style="margin-left: 10px;display: flex">
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-refresh-right"
+ @click="syncSeaveSearchWhareHouseLocation"
+ >鍚屾浠撳簱/搴撲綅
+ </el-button>
<el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
</div>
<el-divider />
@@ -40,7 +46,7 @@
:data="tableData"
border
stripe
- :height="tableHeight"
+ :height="tableHeight+'px'"
:style="{width: 100+'%',height:tableHeight+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
@@ -80,13 +86,14 @@
prop="lm_date"
label="鍒涘缓鏃堕棿"
sortable="custom"
+ width="160"
/>
<el-table-column
label="鎿嶄綔"
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button type="text" @click="edit('edit',row)">淇敼</el-button>
+ <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>
<el-button type="text" @click="del(row)">鍒犻櫎</el-button>
</div>
</template>
@@ -107,9 +114,9 @@
</div>
<el-dialog
- :title="operation==='add'?'鏂板':'淇敼'"
+ :title="operation==='add'?'鏂板':'缂栬緫'"
:visible.sync="dialogVisible"
- width="50%"
+ width="800px"
:close-on-click-modal="false"
top="15vh"
@closed="handleClose"
@@ -117,13 +124,13 @@
>
<el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
<el-form-item label="浠撳簱缂栫爜" prop="warehousecode">
- <el-input v-model="dialogForm.warehousecode" :disabled="operation!=='add'" style="width: 220px" />
+ <el-input v-model="dialogForm.warehousecode" :disabled="operation!=='add'" style="width: 200px" />
</el-form-item>
<el-form-item label="浠撳簱鍚嶇О" prop="warehousename">
- <el-input v-model="dialogForm.warehousename" style="width: 220px" />
+ <el-input v-model="dialogForm.warehousename" style="width: 200px" />
</el-form-item>
<el-form-item label="浠撳簱鎻忚堪">
- <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" />
+ <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -133,18 +140,24 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateWareHouseDef, DeleteWareHouseDef, WareHouseDefSearch } from '@/api/wlgl'
+import { SeaveSearchWhareHouseLocation } from '@/api/ErpSyncMes'
+import ImportPicker from '@/components/ImportPicker'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
- name: 'Zzjg',
+ name: 'CKDY',
components: {
- Pagination
+ Pagination, ImportPicker
},
data() {
const validateName = (rule, value, callback) => {
@@ -189,9 +202,19 @@
warehousename: [
{ required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
]
+ },
+ title_value: '鏁版嵁瀵煎叆 / 浠撳簱銆佸簱浣嶅畾涔�',
+ code: '6',
+ shows: false
+
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getWareHouseDefSearch()
}
-
}
},
created() {
@@ -206,6 +229,29 @@
const res = await WareHouseDefSearch(this.form)
this.tableData = res.data
this.total = res.count
+ },
+ // 鍚屾浠撳簱/搴撲綅
+ async syncSeaveSearchWhareHouseLocation() {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍚屾浠撳簱/搴撲綅锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const res = await SeaveSearchWhareHouseLocation()
+ if (res.code === '200') {
+ setTimeout(() => {
+ this.getWareHouseDefSearch()
+ loading.close()
+ this.$message.success('鍚屾鎴愬姛锛�')
+ }, 2000)
+ } else {
+ setTimeout(() => {
+ loading.close()
+ this.$message.error('鍚屾澶辫触锛�')
+ }, 10000)
+ }
},
// 鎺掑簭鏀瑰彉鏃�
sortChange({ column, prop, order }) {
@@ -224,8 +270,13 @@
search() {
this.getWareHouseDefSearch()
},
+ // 瀵煎叆鎸夐挳
upload() {
-
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
},
// 閲嶇疆
reset() {
--
Gitblit v1.9.3