From bf90cf8568301edb38920e8b0a0ce7e137a668ef Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 21 八月 2025 09:51:55 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue | 87 ++++++++++++++++++++++++++++++++++++++-----
1 files changed, 76 insertions(+), 11 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue b/north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue
index 3823495..8b6a42d 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue
@@ -8,11 +8,14 @@
import { useI18n } from 'vue-i18n'
import footSum from "@/hook/footSum";
import {addListener} from "@/hook/mouseMove";
+import useUserInfoStore from '@/stores/userInfo'
//璇█鑾峰彇
const { t } = useI18n()
+const userStore = useUserInfoStore()
let router=useRouter()
let produceList = ref([])
+let dialogTableVisible = ref(false)
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
@@ -122,7 +125,6 @@
filterData.value[column.property] = value
}
request.post(`/finishedGoodsInventory/getSelect/1/${total.pageSize}`,filterData.value).then((res) => {
-
if(res.code==200){
total.dataTotal = res.data.total.total*1
total.pageTotal= res.data.total.pageTotal
@@ -139,7 +141,6 @@
const selectOrderList = ()=>{
request.post(`/finishedGoodsInventory/getSelect/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => {
-
if(res.code==200){
if (res.data.total!=null){
total.dataTotal = res.data.total.total*1
@@ -233,6 +234,7 @@
{ 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'},
{ 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'},
/*{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},*/
+ { 'code' :'changeRack','name':'瑁呯璋冩灦',status: 'primary'},
],
/*import: false,
@@ -261,7 +263,7 @@
})
-
+let currentRecord = ref(null)
const xGrid = ref();
const gridEvents = {
toolbarButtonClick({ code }) {
@@ -270,23 +272,49 @@
switch (code){
case 'issue':{
/*VXETable.modal.confirm('鐐瑰嚮浜嗗簱瀛樿皟鎷�');*/
- router.push({path: '/main/productStock/OrderAllocation'});
- return;
+ router.push({path: '/main/productStock/OrderAllocation'})
break
}
case 'out':{
- router.push({path: '/main/productStock/FinishedGoodsIssue'});
- return;
- break;
+ router.push({path: '/main/productStock/FinishedGoodsIssue'})
+ break
}
case 'rework':{
- router.push({path: '/main/productStock/FinishedProductRework'});
- return;
- break;
+ router.push({path: '/main/productStock/FinishedProductRework'})
+ break
+ }
+ case 'changeRack':{
+ currentRecord.value = null
+ if(xGrid.value.getCurrentRecord()===null){
+ ElMessage.warning(t('productStock.unselectedData'))
+ return
+ }
+ currentRecord.value = JSON.parse(JSON.stringify(xGrid.value.getCurrentRecord()))
+ dialogTableVisible.value = true
+ break
}
}
}
}
+}
+const changeRack =async () => {
+ const max = xGrid.value.getCurrentRecord().quantityAvailable*1 || 0
+ if(currentRecord.value.quantityAvailable<=0 || parseInt(currentRecord.value.quantityAvailable)>max){
+ ElMessage.warning(`0<value<=${xGrid.value.getCurrentRecord().quantityAvailable}`)
+ return
+ }
+ if(currentRecord.value.boxNo.length>255 || currentRecord.value.remark.length>255){
+ ElMessage.warning('绠卞彿鎴栧娉�'+t('basicData.msg.max255'))
+ return
+ }
+ await request.post(`/finishedGoodsInventory/changeRack/${userStore.user.userName}`,currentRecord.value).then((res) => {
+ if(res.code==200 ){
+ ElMessage.success('瑁呯璋冩灦鎴愬姛')
+ router.push({path: '/main/productStock/productStockList', query:{random:Math.random()}})
+ }else{
+ ElMessage.warning(res.msg)
+ }
+ })
}
@@ -345,6 +373,40 @@
</template>
</vxe-grid>
+
+ <el-dialog v-model="dialogTableVisible" style="width: 400px;height:250px;margin-top: 25vh">
+ <el-row>
+ <el-col :span="8">
+ <el-text>绠卞彿:</el-text>
+ </el-col>
+ <el-col :span="16">
+ <el-input v-model="currentRecord.boxNo"/>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-text>鏁伴噺:</el-text>
+ </el-col>
+ <el-col :span="16">
+ <el-input v-model="currentRecord.quantityAvailable" type="number"/>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-text>澶囨敞:</el-text>
+ </el-col>
+ <el-col :span="16">
+ <el-input v-model="currentRecord.remark"/>
+ </el-col>
+ </el-row>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary" @click="changeRack">
+ 璋冩灦
+ </el-button>
+ </div>
+ </template>
+ </el-dialog>
</div>
</template>
@@ -360,4 +422,7 @@
-ms-user-select: none;
user-select: none;
}
+.el-row {
+ margin-bottom: 10px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0