From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示
---
src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue | 86 +++++++++++++++++++++++++++++++++++-------
1 files changed, 71 insertions(+), 15 deletions(-)
diff --git a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
index c1b4540..ddd3d04 100644
--- a/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldProdBackBillList.vue
@@ -40,8 +40,8 @@
<el-form-item label="閮ㄩ棬淇℃伅" prop="HDept">
<el-input v-model="queryParams.HDept" placeholder="璇疯緭鍏ラ儴闂ㄤ俊鎭�" @keyup.enter.native="handleQuery" />
</el-form-item>
- <el-form-item label="鍣ㄥ叿浠g爜" prop="HModelNumber">
- <el-input v-model="queryParams.HModelNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�" @keyup.enter.native="handleQuery" />
+ <el-form-item label="瀹瑰櫒浠g爜" prop="HModelNumber">
+ <el-input v-model="queryParams.HModelNumber" placeholder="璇疯緭鍏ュ鍣ㄤ唬鐮�" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
<el-input v-model="queryParams.HSupName" placeholder="璇疯緭鍏ュ線鏉ュ崟浣�" @keyup.enter.native="handleQuery" />
@@ -129,7 +129,11 @@
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
- @click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
+ @click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</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"
@@ -171,7 +175,7 @@
<el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
<div :style="item.style">
<span v-if="column.property.includes('鏃ユ湡')">{{ parseTime(row[column.property], '{y}-{m}-{d}') }}</span>
- <el-button type="text" @click="handleEdit(row, OperationType = 3)"
+ <el-button type="text" @click="handleEdit(row, OperationType = 2)"
v-else-if="column.property == '鍗曟嵁鍙�'">{{
row.鍗曟嵁鍙�
}}</el-button>
@@ -186,8 +190,9 @@
<RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
v-if="rowHideShow" />
</el-dialog>
+
<!-- 缂栬緫 -->
- <el-dialog title="缂栬緫鍣ㄥ叿棰嗙敤閫�搴撳崟" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <el-dialog title="缂栬緫瀹瑰櫒鍏ュ簱鍗�" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
<edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
:copyType="copyType" @editClose="editClose" v-if="editShow" />
</el-dialog>
@@ -256,7 +261,7 @@
HStatusList: [{name:'鍏ㄩ儴',value:'-1'},{name:'鏈鏍�',value:'0'},{name:'宸插鏍�',value:'1'},{name:'宸插叧闂�',value:'2'}],
addBtnShow: false,
dialogTitle: '',
- OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ OperationType: null,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼2锛�
HInterID: null,
baseURL: process.env.VUE_APP_BASE_API,
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
@@ -383,7 +388,7 @@
this.pageSize = 50
}
// 閿�鍞嚭搴撳崟鍒楄〃
- axios.get(this.baseURL + '/Sc_MouldProdBackBillController/page', {
+ axios.get(this.$baseUrl + '/Sc_MouldProdBackBillController/page', {
params: {
"sWhere": this.sWhere,
"user": sessionStorage["HUserName"],
@@ -428,6 +433,8 @@
option.data = data1.data
this.dataList = option
this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
+ }else{
+ this.$modal.msgError(response.data.Message);
}
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
@@ -435,7 +442,7 @@
},
DisPlay_HideColumn(HModName, user, option, dataOption) {
this.totalNameList = []
- axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
params: {
"HModName": HModName,
"user": user,
@@ -576,6 +583,9 @@
this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', this.rowList, this.BillType)
+ }
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
@@ -585,7 +595,7 @@
},
//鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
- this.OperationType = 3
+ this.OperationType = 2
this.handleEdit(row)
},
// 澶氶�夋閫変腑鏁版嵁
@@ -767,17 +777,63 @@
this.OperationType = 0
this.copyType = 0
},
+
+ //鎵樻暟鍙樻洿
+ 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 + '/Sc_MouldProdBackBillController/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)
+ }
+ })
+ },
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete() {
this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
- axios.get(this.baseURL + "/Sc_MouldProdBackBill/DeltetMouldProdBackBill", {
- params: { 'HInterID': this.rowForm.hmainid.toString(), 'user': sessionStorage["HUserName"] }
+ axios.get(this.$baseUrl + "/Sc_MouldProdBackBillController/GetSc_MouldProdBackBill_Delete_Json", {
+ params: { 'HInterID': this.rowForm.hmainid.toString(), 'HMaker': sessionStorage["HUserName"] }
}).then(response => {
if (response.data.count == 1) {
this.getList()
this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
} else {
- this.$modal.msgError("閿欒:" + result.code + result.Message);
+ this.$modal.msgError("閿欒:" + response.data.code + response.data.Message);
}
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
@@ -788,7 +844,7 @@
set_CheckBill(num, form) {
var InterID = form.hmainid || form.HInterID
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Sc_MouldProdBackBill/AuditMouldProdBackBill", {
+ axios.get(this.$baseUrl + "/Sc_MouldProdBackBill/AuditMouldProdBackBill", {
params: { "HInterID": InterID, "flag": num, "user": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
@@ -818,7 +874,7 @@
} else if (this.rowForm.鐘舵�� != "宸插鏍�" && !this.defaintOperationByCompanyName()) {
this.$modal.msgError("鎵撳嵃澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'宸插鏍�'鐘舵��!!");
} else {
- axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
+ axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
params: { "HInterID": this.rowForm.hmainid }
}).then(response => {
var result = response.data
@@ -841,7 +897,7 @@
//#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
defaintOperationByCompanyName() {
var result = false;
- axios.get(this.baseURL + '/Xt_getInfo/getCompanyName').then(response => {
+ axios.get(this.$baseUrl + '/Xt_getInfo/getCompanyName').then(response => {
var data1 = response.data
if (data1.count == 1) {
if (data1.data == "姘村姟") {
--
Gitblit v1.9.1