From 723793a0aa8d69cbbb463830a3344dbd6655cee5 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期六, 04 四月 2026 14:57:02 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/ProductInBill/Kf_ProductInBillList.vue | 93 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 75 insertions(+), 18 deletions(-)
diff --git a/src/views/ProductInBill/Kf_ProductInBillList.vue b/src/views/ProductInBill/Kf_ProductInBillList.vue
index c20bc12..0a7958b 100644
--- a/src/views/ProductInBill/Kf_ProductInBillList.vue
+++ b/src/views/ProductInBill/Kf_ProductInBillList.vue
@@ -114,6 +114,10 @@
@click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
</el-col>
<el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-Pallet" size="mini" :disabled="single" @click="set_PalletChange">鎵樻暟鍙樻洿
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
<el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
@click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
</el-col>
@@ -169,10 +173,11 @@
</el-table-column>
</template>
</el-table>
- <!-- 璁板綍鏁般�侀〉鏁般�佸綋鍓嶉〉 -->
- <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" @pagination="handleQuery" />
- <!-- 鍒楄缃� -->
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
<el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
+ v-if="rowHideShow" />
+ </el-dialog>
<RowSettings :colName="btResList" HModName="Kf_ProductInBillList" @rowEditClose="rowSetClose"
v-if="rowHideShow" />
</el-dialog>
@@ -282,9 +287,17 @@
ColContent: '',
},
- page: 1, //page椤电储寮�
- pageSize: 0, //page椤甸潰璁板綍鏁�
- total: 0, //璁板綍鍚堣鏁�
+ loading: true,
+ tyResList: [],//鍒楄〃锛堟帴鍙f暟鎹級
+ btList: [],//琛ㄥご鍒楄〃鏄剧ず
+ btResList: [],
+ tableData: [],//鍒楄〃(鍒嗛〉鏄剧ず)
+ dataList: [],
+ titleData: [],//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ pageSizes: [ 50,100, 500, 5000, 50000],
+ page: 1,
+ pageSize: 0,
+ total: 0, //璁板綍鍚堣鏁�
tableShow: true, // table鏄剧ず鏍囪
totalNameList: [], // 闇�瑕佽缃悎璁¤鐨勫垪鏁扮粍
tableData: [], // 鍒楄〃鏁版嵁銆傜敤浜巘able鐩戝惉浜嬩欢
@@ -494,7 +507,6 @@
//#region 鏌ヨ
getList() {
- this.pageSize = 50
if (this.pageSize == 0) {
this.pageSize = 50
}
@@ -502,18 +514,19 @@
this.loading = true
// 鍒楄〃鏌ヨ
- axios.get(this.$baseUrl + '/Kf_ProductInBillController/GetKf_ProductInBillList_Json', {
+ axios.get(this.$baseUrl + '/Kf_ProductInBillController/page', {
params: {
"sWhere": this.sWhere,
- "HMaker": sessionStorage["HUserName"],
- "OperationType": 1,
- "ViewName": "h_v_Kf_ProductInBillList"
+ "user": sessionStorage["HUserName"],
+ "page": this.page,
+ "size": this.pageSize,
+ "Type":'3802',
},
}).then(response => {
this.tyResList = response.data.data//鎬绘暟鎹�
let data1 = response.data
let option = []
- if (data1.count == 1) {
+ if (data1.list && data1.list.length > 0) {
this.btResList = data1.list //鍒楄〃琛ㄥご鏁版嵁
this.total = data1.count;
var data = [];//鍒楀瓧娈垫暟鎹�
@@ -651,6 +664,50 @@
this.rowHideShow = true
this.openRowHide = true
},
+ 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.getList()
+ } else {
+ this.$modal.msgError('閿欒锛�' + (response.data.Message || '淇濆瓨澶辫触'))
+ }
+ }).catch(error => {
+ if (error !== 'cancel') {
+ this.$modal.msgError('鎿嶄綔澶辫触锛�' + error.message)
+ }
+ })
+ },
rowSetClose(val) {
this.rowHideShow = false
this.tableShow = true
@@ -763,11 +820,11 @@
this.totalNameList.push(item)
}
})
- if (data1.data[0].HPageSize == 0) {
- this.pageSize = 50
- } else {
- this.pageSize = data1.data[0].HPageSize
- }
+ // if (data1.data[0].HPageSize == 0) {
+ // this.pageSize = 50
+ // } else {
+ // this.pageSize = data1.data[0].HPageSize
+ // }
this.tableData = option.data
this.tableShow = true
this.loading = false
@@ -873,7 +930,7 @@
var result = false;
axios.get(this.$baseUrl + '/Xt_getInfo/getCompanyName').then(response => {
var data1 = response.data
- if (data1.count == 1) {
+ if (data1.list && data1.list.length > 0) {
if (data1.data == "姘村姟") {
result = true;
}
--
Gitblit v1.9.1