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 | 70 +++++++++++++++++++++++++++++++----
1 files changed, 62 insertions(+), 8 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 94462ae..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'},
],
},
@@ -152,7 +154,7 @@
})
-
+const arr=[]
//琛ㄦ牸鎸夐挳
const gridEvents = {
@@ -164,17 +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;
}
- for (let i = 0; i < selectRecords.length; i++) {
- console.log(selectRecords[i])
+ let a
+ selectRecords.forEach((item) => {
+ if(arr.length===0){
+ a='A1'
+ item.rack=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;
@@ -184,7 +235,10 @@
}
}
}
+const checkBoxConfig = ({ records, row }) => {
+
+}
</script>
@@ -195,7 +249,7 @@
<div class="main-table">
<vxe-grid
ref="xGrid"
- :checkbox-config="checkBoxConfig"
+ @checkbox-change="checkBoxConfig"
class="mytable-scrollbar"
height="100%"
v-bind="gridOptions"
@@ -243,6 +297,6 @@
.main-table{
width: 100%;
- height: 600px;
+ height: 540px;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0