From 9620ca5caed59bd206dce701a04a5a4e4cfb9dc5 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期二, 31 三月 2026 13:46:57 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/FbStepFoldinBillList/fbStepFoldinBillList.vue | 93 ++++++++++++++++++++++++++++++++++++++++------
1 files changed, 81 insertions(+), 12 deletions(-)
diff --git a/src/views/FbStepFoldinBillList/fbStepFoldinBillList.vue b/src/views/FbStepFoldinBillList/fbStepFoldinBillList.vue
index 7e66b45..167f89f 100644
--- a/src/views/FbStepFoldinBillList/fbStepFoldinBillList.vue
+++ b/src/views/FbStepFoldinBillList/fbStepFoldinBillList.vue
@@ -163,6 +163,7 @@
<el-row style="margin-bottom:8px">
<el-col>
<el-button size="mini" type="primary" @click="handleAdd">鏂板</el-button>
+ <el-button size="mini" @click="set_PalletChange">鎵樻暟鍙樻洿</el-button>
<el-button size="mini" @click="handleEdit">缂栬緫</el-button>
<el-button size="mini" type="danger" @click="set_DeleteBill">鍒犻櫎</el-button>
<el-button size="mini" @click="set_CheckBill(1)">瀹℃牳</el-button>
@@ -175,7 +176,9 @@
<el-button size="mini" @click="get_PrintReport">鎵撳嵃</el-button>
<el-button size="mini" @click="get_Refresh">鍒锋柊</el-button>
<el-button size="mini" @click="get_BarCodeDetail">鏉$爜鏄庣粏</el-button>
+ <el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single" @click="get_PackStockDetail">鍖呰瀹瑰櫒鍑哄叆搴撴槑缁�</el-button>
</el-col>
+
</el-row>
<el-table
@@ -184,11 +187,11 @@
border
style="width:100%"
@row-click="onRowClick"
- @selection-change="onSelectionChange"
+ @selection-change="onSelectionChange"
:loading="loading"
ref="mainTable"
>
- <el-table-column type="selection" width="55" />
+ <el-table-column type="selection" width="55" />
<el-table-column v-for="(col, idx) in tableColumns" :key="idx" :prop="col.field" :label="col.title" :width="col.width" :formatter="col.formatter">
<template v-if="col.field === '鍗曟嵁鍙�'" #default="scope">
<span style="color: blue; cursor: pointer;" @click="onBillNoClick(scope.row)">{{ scope.row.鍗曟嵁鍙� }}</span>
@@ -210,6 +213,8 @@
:visible.sync="barcodeDetailVisible"
ref="barcodeDetail"
/>
+ <!-- 鍖呰瀹瑰櫒鍑哄叆搴撴槑缁� -->
+ <PackStockDetail :visible.sync="packStockDetailShow" ref="packStockDetail"/>
</div>
</template>
@@ -218,21 +223,23 @@
//import FbStepFoldinBillEdit from './fbStepFoldinBillEdit'
import FbStepFoldinBillEdit from '@/views/FbStepFoldinBillList/fbStepFoldinBillListEdit'
import BarCodeDetail from '@/views/component/BarCodeDetail'
-
+import PackStockDetail from '@/views/component/PackStockDetail'
export default {
name: 'FbStepFoldinBillList',
components: {
FbStepFoldinBillEdit,
- BarCodeDetail
+ BarCodeDetail,
+ PackStockDetail
},
data() {
return {
+ rowForm: {},
editDialogVisible:false,
operationType:'1',
currentId : '',
barcodeDetailVisible: false,// 鏉$爜鏄庣粏寮圭獥鏄剧ず鎺у埗
-
+ packStockDetailShow:false, //鍖呰瀹瑰櫒鍑哄叆搴撴槑缁嗗鍣ㄦ樉绀烘爣璁�
query: {
HInitTimeCycle: 29,
HBeginDate: '',
@@ -293,7 +300,7 @@
this.set_InitGrid();
this.ColFilter();
this.get_DefaultModule();
- },
+ },
setSelect_HInitTimeCycle() {
this.query.HInitTimeCycle = 29;
},
@@ -430,7 +437,7 @@
const userName = sessionStorage['HUserName'] || sessionStorage['Czybm'] || 'admin';
const orgName = sessionStorage['OrganizationName'] || sessionStorage['Organization'] || '娴欐睙鏅轰簯杩堟��';
- const url = `${this.baseURL}/Kf_StepFoldinBill/GetStepFoldinBillList`;
+ const url = `${this.$baseUrl}/Kf_StepFoldinBill/GetStepFoldinBillList`;
const params = {
sWhere: sWhere || '',
user: userName,
@@ -497,7 +504,7 @@
},
async get_DefaultModule() {
try {
- const url = `${this.baseURL}/Xt_FastICScheme/Chooselist`;
+ const url = `${this.$baseUrl}/Xt_FastICScheme/Chooselist`;
const params = {
user: sessionStorage['Czybm'] || sessionStorage['HUserName'] || '',
HModuleName: '鍒嗘寮忚皟鍏ュ崟缁存姢',
@@ -542,7 +549,7 @@
try {
await this.$confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠', '鍒犻櫎纭');
- const url = `${this.baseURL}/Fb_StepFoldInBill/DeltetFb_StepFoldInBill`;
+ const url = `${this.$baseUrl}/Fb_StepFoldInBill/DeltetFb_StepFoldInBill`;
const params = { HInterID: (row.hmainid || row.HInterID) };
const resp = await axios.get(url, { params });
@@ -571,7 +578,7 @@
try {
await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
- const url = `${this.baseURL}/Kf_StepFoldInBill/AuditKf_StepFoldInBill`;
+ const url = `${this.$baseUrl}/Kf_StepFoldInBill/AuditKf_StepFoldInBill`;
const params = {
HInterID: (row.hmainid || row.HInterID),
Type: type,
@@ -604,7 +611,7 @@
try {
await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
- const url = `${this.baseURL}/Kf_StepFoldInBill/CloseKf_StepFoldInBill`;
+ const url = `${this.$baseUrl}/Kf_StepFoldInBill/CloseKf_StepFoldInBill`;
const params = {
HInterID: (row.hmainid || row.HInterID),
Type: type,
@@ -637,7 +644,7 @@
try {
await this.$confirm(`纭瑕�${actionName}姝ゅ崟鎹悧锛焋, `${actionName}纭`);
- const url = `${this.baseURL}/Kf_StepFoldInBill/CancellKf_StepFoldInBill`;
+ const url = `${this.$baseUrl}/Kf_StepFoldInBill/CancellKf_StepFoldInBill`;
const params = {
HInterID: (row.hmainid || row.HInterID),
Type: type,
@@ -657,6 +664,51 @@
}
}
},
+ set_PalletChange() {
+ if (!this.rowForm || !this.rowForm.hmainid) {
+ this.$modal.msgError('璇峰厛閫夋嫨涓�鏉¤褰曪紒')
+ return
+ }
+
+ const rowData = this.rowForm // 浣跨敤 rowForm 鑰屼笉鏄� rowList
+ const currentPallet = rowData.鎵樻暟 || 0
+
+ // 灏�"璇疯緭鍏ユ柊鎵樻暟"浣滀负杈撳叆妗嗙殑placeholder
+ this.$prompt(`褰撳墠鎵樻暟锛�${currentPallet}`, {
+ confirmButtonText: '淇濆瓨',
+ cancelButtonText: '鍙栨秷',
+ inputValue: currentPallet,
+ inputType: 'number',
+ inputValidator: (value) => {
+ if (!value) return '璇疯緭鍏ユ墭鏁帮紒'
+ const num = parseInt(value)
+ if (isNaN(num)) return '璇疯緭鍏ユ湁鏁堢殑鏁板瓧锛�'
+ if (num.toString() !== value) return '鎵樻暟涓嶈兘涓哄皬鏁帮紒'
+ if (num < 0) return '鎵樻暟蹇呴』澶т簬0锛�'
+ return true
+ }
+ }).then(({ value }) => {
+ const newPallet = parseInt(value)
+
+ return axios.post(this.$baseUrl + '/Kf_POStockInBill/UpdatePallet', {
+ hmainid: rowData.hmainid,
+ newPallet: newPallet,
+ operator: sessionStorage["HUserName"]
+ })
+ }).then(response => {
+ if (response.data && response.data.count == 1) {
+ this.$modal.msgSuccess('鎵樻暟鍙樻洿鎴愬姛锛�')
+ this.onSearch()
+ this.rowForm = null
+ } else {
+ this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+ }
+ }).catch(error => {
+ if (error !== 'cancel') {
+ this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+ }
+ })
+ },
onRowClick(row) {
this.$nextTick(() => {
const table = this.$refs.mainTable;
@@ -666,6 +718,11 @@
},
onSelectionChange(selection) {
this.selectedRows = selection;
+ this.ids = selection.map(item => item.hmainid)
+ console.log('閫夋嫨鐨勮:', selection,"閫夋嫨鐨刬ds:",this.ids);
+ if (selection.length > 0)
+ this.rowForm = selection[0]
+
},
onBillNoClick(row) {
const table = this.$refs.mainTable;
@@ -708,6 +765,18 @@
const hmainid = this.selectedRows.map(r => (r.hmainid * (10 ** 8)) + (r.hsubid || 0)).toString();
window.open('../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid + '&MyMsg=' + hmainid + '&Type=HSeOutStockBillList', '_blank');
},
+ //#region 鍖呰瀹瑰櫒鍑哄叆搴撴槑缁�
+ get_PackStockDetail() {
+ // if (this.selectedRow.length !== 1) {
+ // this.$message.warning('璇烽�夋嫨涓�琛屾暟鎹煡鐪嬫潯鐮佹槑缁嗭紒')
+ // return
+ // }
+ this.packStockDetailShow = true
+ this.$nextTick(() => {
+ this.$refs.packStockDetail.open(this.rowForm)
+ })
+ },
+ //#endregion
get_Refresh() {
this.onReset();
},
--
Gitblit v1.9.1