From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示
---
north-glass-erp/northglass-erp/src/components/pp/SelectProcessCardDetail.vue | 73 ++++++++++++++++++++++++++++--------
1 files changed, 56 insertions(+), 17 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/SelectProcessCardDetail.vue b/north-glass-erp/northglass-erp/src/components/pp/SelectProcessCardDetail.vue
index 5e887a8..4631e83 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/SelectProcessCardDetail.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/SelectProcessCardDetail.vue
@@ -117,7 +117,7 @@
filters: [{data: ''}],
slots: {filter: 'num1_filter'}
},
- {field: 'rack',width:100, title: t('鏋跺彿'), editRender: {name: 'input', attrs: {placeholder: ''}}, slots: {filter: 'num1_filter'}},
+ {field: 'rack',width:100, title:t('processCard.shelfNumber'), slots: {filter: 'num1_filter'}},
{field: 'technology_number', title: t('processCard.technologyNumber'),},
{
field: 'product_id',
@@ -143,7 +143,9 @@
toolbarConfig: {
buttons: [
- {code: 'update', name: t('鍚堟灦'), status: 'primary'},
+ {code: 'update', name: t('processCard.combinedFrame'), status: 'primary'},
+ {code: 'save', name: t('basicData.save'), status: 'primary'},
+ {code: 'clear', name: t('basicData.empty'), status: 'primary'},
],
},
@@ -164,25 +166,66 @@
const $table = xGrid.value
if ($table) {
const selectRecords = $table.getCheckboxRecords()
- if (selectRecords.length == 0) {
+ if (selectRecords.length === 0) {
ElMessage.warning(t('processCard.pleaseCheckTheRequiredData'))
return;
}
+ let a
selectRecords.forEach((item) => {
if(arr.length===0){
- let a='A1'
+ a='A1'
item.rack=a
- arr.push(a)
- }else{
- let a='A'+arr.length
- item.rack=a
- arr.push(a)
- }
+ }else{
+ if(item.rack==null){
+ a='A'+(arr.length+1)
+ item.rack=a
+ }
+ }
+ })
+ if(!arr.includes(a)){
+ arr.push(a)
+ }
+
+ }
+ return;
+
+ }
+ case 'clear': {
+ const $table = xGrid.value
+ if ($table) {
+ $table.getTableData().fullData.forEach((item) => {
+ item.rack=null
+ })
+ }
+ return;
+
+ }
+ case 'save': {
+ const $table = xGrid.value
+ if ($table) {
+ const selectRecords = $table.getCheckboxRecords()
+ if (selectRecords.length === 0) {
+ ElMessage.warning(t('processCard.pleaseCheckTheRequiredData'))
+ return;
+ }
+
+ let composingData = ref({
+ composing: selectRecords,
})
+ request.post("/processCard/updateProcessCardRack", composingData.value).then((res) => {
+ if (res.code == 200 && res.data === true) {
+ ElMessage.success(t('basicData.msg.saveSuccess'))
+ router.push({
+ path: '/main/processCard/SelectProcessCard',
+ query: {random: Math.random()}
+ })
+ } else {
+ ElMessage.warning(t('basicData.msg.deleteFail'))
-
+ }
+ })
}
return;
@@ -194,11 +237,7 @@
}
const checkBoxConfig = ({ records, row }) => {
- /*if(row.checked){
- console.log(111)
- }else{
- console.log(222)
- }*/
+
}
@@ -258,6 +297,6 @@
.main-table{
width: 100%;
- height: 600px;
+ height: 540px;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0