From d1f08bfc65d459b893fb6d5134927e0c078d32e5 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 24 一月 2025 13:50:59 +0800
Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
---
admin/src/views/stock/check.vue | 48 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/admin/src/views/stock/check.vue b/admin/src/views/stock/check.vue
index 2048c22..49018c2 100644
--- a/admin/src/views/stock/check.vue
+++ b/admin/src/views/stock/check.vue
@@ -2,13 +2,13 @@
<div class="main_app">
<QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" />
<div class="mt20">
- <el-button type="primary" @click="handleEx()" v-permissions="['business:ywpatrolline:create']">娣诲姞</el-button>
+ <el-button type="primary" @click="$refs.newInventory.open('鏂板缓鐩樼偣鍗�')" v-permissions="['business:ywpatrolline:create']">娣诲姞</el-button>
</div>
<el-table v-loading="loading" :data="list" stripe>
<el-table-column prop="name" label="鐩樼偣鍗曞悕绉�" min-width="120" show-overflow-tooltip />
<el-table-column prop="warehouseName" label="鐩樼偣浠撳簱" min-width="100" show-overflow-tooltip />
<el-table-column prop="userName" label="鐩樼偣鍛�" min-width="80" show-overflow-tooltip />
- <el-table-column prop="dealDate" label="鐩樼偣鏃ユ湡" min-width="110" show-overflow-tooltip />
+ <el-table-column prop="planDate" label="鐩樼偣鏃ユ湡" min-width="110" show-overflow-tooltip />
<el-table-column prop="createName" label="鍒涘缓浜�" min-width="80" show-overflow-tooltip />
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="140" show-overflow-tooltip />
<el-table-column label="鐩樼偣鐘舵��" min-width="80">
@@ -21,29 +21,35 @@
</el-table-column>
<el-table-column prop="workTime" label="鎿嶄綔" min-width="140" show-overflow-tooltip>
<template v-slot="{ row }">
- <el-button type="text">鏌ョ湅璇︽儏</el-button>
- <el-button type="text">鍙栨秷</el-button>
- <el-button type="text">鍒犻櫎</el-button>
+ <el-button type="text" @click="$refs.inventoryDetails.open('鐩樼偣璇︾粏', row.id)">鏌ョ湅璇︽儏</el-button>
+ <el-button type="text" v-if="[0,1].includes(row.status)" @click="cancel(row.id)">鍙栨秷</el-button>
+ <el-button type="text" v-if="[0,3].includes(row.status)" @click="dele(row.id)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
<div class="mt20">
<Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
</div>
+ <NewInventory ref="newInventory" @success="getList" />
+ <InventoryDetails ref="inventoryDetails" />
</div>
</template>
<script>
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
+import NewInventory from './components/newInventory'
+import InventoryDetails from './components/inventoryDetails'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
dayjs.extend(duration)
-import { fetchList } from '@/api/ywStocktaking'
+import { fetchList, cancelById, deleteById } from '@/api/ywStocktaking'
export default {
components: {
Pagination,
- QueryForm
+ QueryForm,
+ NewInventory,
+ InventoryDetails
},
data() {
return {
@@ -100,6 +106,34 @@
this.loading = false
})
},
+ cancel(id) {
+ this.$confirm('鏄惁纭鍙栨秷?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ cancelById(id)
+ .then(res => {
+ this.getList()
+ })
+ }).catch(() => {
+
+ });
+ },
+ dele(id) {
+ this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteById(id)
+ .then(res => {
+ this.getList()
+ })
+ }).catch(() => {
+
+ });
+ },
clear() {
this.filters = {}
this.pagination.pageSize = 10
--
Gitblit v1.9.3