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_MouldInRequestBillList.vue | 158 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 140 insertions(+), 18 deletions(-)
diff --git a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
index 3e4dbd2..80f1f05 100644
--- a/src/views/scMould/warehouse/Sc_MouldInRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldInRequestBillList.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" />
@@ -131,9 +131,17 @@
<el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
@click="handleEdit(row = rowForm, OperationType = 2)">缂栬緫</el-button>
</el-col>
- <el-col :span="1.5">
+ <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> -->
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-tickets" size="mini"
+ @click="handlePush(row = rowForm, OperationType = 4)">涓嬫帹锛堝鍣ㄥ叆搴撳崟锛�</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
@@ -147,14 +155,14 @@
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
@click="set_CheckBill(2, form = rowForm)">杩斿鏍�</el-button>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="multiple"
@click="set_CheckBillAll(1, ids)">瀹℃牳(鎵归噺)</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="multiple"
@click="set_CheckBillAll(2, ids)">杩斿鏍�(鎵归噺)</el-button>
- </el-col>
+ </el-col> -->
<!-- <el-col :span="1.5">
<el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
</el-col> -->
@@ -195,9 +203,14 @@
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>
+ <!-- 涓嬫帹 -->
+ <el-dialog title="涓嬫帹瀹瑰櫒鍏ュ簱鍗�" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close">
+ <push :OperationType='4' :propsData='pushData' :HSouceBillType=BillType
+ @editClose="pushClose" v-if="pushShow" />
</el-dialog>
<el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
<PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
@@ -212,18 +225,27 @@
import axios from 'axios'
import RowSettings from '@/views/component/rowSettings'
import Edit from '@/views/scMould/warehouse/Sc_MouldInRequestBillEdit'
+import Push from '@/views/scMould/warehouse/Sc_MouldProdBackBillEdit'
import PrintList from '@/views/component/printList'
import moment from 'moment';
export default {
name: 'Sc_MouldInRequestBillList',
- components: { RowSettings, Edit, PrintList },
+ components: { RowSettings, Edit, Push,PrintList },
+ props: {
+ openPage: { type: String, },
+ HOrgID: { type: String, },
+ },
data() {
return {
HModName: "Sc_MouldInRequestBillList",
+ rowList:[],
activeSeach: '',
editShow: false,
openEdit: false,
+ pushShow: false,
+ openPush: false,
+ pushData:'',
totalNameList: [],
tableShow: true,
openPrintList: false,
@@ -312,10 +334,14 @@
page: 1,
pageSize: 0,
total: 0,
+ BillType:'3851',
};
},
created() {
// this.fetchData()
+ if(this.openPage && this.HOrgID){
+ this.queryParams.HStockOrgID = this.HOrgID
+ }
this.riqiChange()
this.getList();
},
@@ -391,13 +417,13 @@
this.pageSize = 50
}
// 閿�鍞嚭搴撳崟鍒楄〃
- axios.get(this.baseURL + '/Sc_MouldInRequestBillController/page', {
+ axios.get(this.$baseUrl + '/Sc_MouldInRequestBillController/page', {
params: {
"sWhere": this.sWhere,
"user": sessionStorage["HUserName"],
"page": this.page,
"size": this.pageSize,
- "Type": '3851'
+ "Type": this.BillType,
},
}).then(response => {
this.tyResList = response.data.data//鎬绘暟鎹�
@@ -435,6 +461,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("鎺ュ彛璇锋眰澶辫触!");
@@ -442,7 +470,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,
@@ -583,10 +611,13 @@
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 }) {
- if (this.ids.includes(row.hmainid)) {
+ if (this.ids.includes(row.sorderid)) {
return { "background": "#ecf5ff" }
}
},
@@ -598,7 +629,8 @@
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
// this.rowForm = {}
- this.ids = selection.map(item => item.hmainid)
+ this.rowList=selection
+ this.ids = selection.map(item => item.sorderid)
this.single = selection.length != 1
this.multiple = !selection.length
if (!this.single) {
@@ -743,6 +775,8 @@
this.tableShow = true
this.openEdit = false
this.editShow = false
+ this.openPush = false
+ this.pushShow = false
this.clearData()
this.getList()
},
@@ -758,11 +792,54 @@
this.editShow = true
this.openEdit = true
},
+ //鎵撳紑涓嬫帹缁勪欢寮圭獥
+ handlePush() {
+ if (this.rowList && this.rowList.length > 0) {
+ var dataArray = [];
+ var HSupTypeID_Temp = this.rowList[0].HSupTypeID
+ for (var i = 0; i < this.rowList.length; i++) {
+ if (this.rowList[i].鍗曟嵁鐘舵�� != "宸插鏍�") {
+ this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戜笉涓哄凡瀹℃牳鐘舵��,涓嶅厑璁镐笅鎺紒")
+ return;
+ }
+ if (this.rowList[i].HQtyMust <= 0) {
+ this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戝搴斿彲涓嬫帹鏁伴噺蹇呴』澶т簬 0 锛�")
+ return;
+ }
+ if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) {
+ this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹搴斿線鏉ョ被鍨嬪繀椤讳竴鑷达紒")
+ return;
+ }
+ var temp = {
+ "hmainid": this.rowList[i].hmainid
+ , "hsubid": this.rowList[i].hsubid
+ , "HBillType": this.rowList[i].HBillType
+ }
+ dataArray.push(temp);
+ }
+ var datajson = {
+ "data": dataArray
+ };
+ this.pushData = JSON.stringify(datajson)
+ this.pushShow = true
+ this.openPush = true
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鏁版嵁涓嬫帹锛�")
+ }
+ },
//鍏抽棴缂栬緫椤甸潰
editClose(val) {
this.open = val
this.editShow = false
this.openEdit = val
+ this.clearData()
+ this.getList()
+ },
+ //鍏抽棴涓嬫帹椤甸潰
+ pushClose(val) {
+ this.open = val
+ this.pushShow = false
+ this.openPush = val
this.clearData()
this.getList()
},
@@ -777,25 +854,70 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete() {
this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
- axios.get(this.baseURL + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Delete_Json", {
+ axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_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("鎺ュ彛璇锋眰澶辫触!");
});
}).catch(() => { })
},
+ // 鎵樻暟鍙樻洿
+ set_PalletChange() {
+ if (this.rowList.length !== 1) {
+ this.$modal.msgWarning('璇烽�夋嫨涓�琛屾暟鎹繘琛屾墭鏁板彉鏇达紒')
+ return
+ }
+
+ const rowData = this.rowList[0]
+ 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_MouldOutRequestBill/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)
+ }
+ })
+ },
// 鍙嶅鏍�/瀹℃牳鏁版嵁
set_CheckBill(num, form) {
var InterID = form.hmainid || form.HInterID
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Check_Json", {
+ axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/GetSc_MouldInRequestBill_Check_Json", {
params: { "HInterID": InterID, "Type": num, "HMaker": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
@@ -814,7 +936,7 @@
// 鎵归噺鍙嶅鏍�/瀹℃牳鏁版嵁
set_CheckBillAll(num, ids) {
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Sc_MouldInRequestBillController/CheckAll", {
+ axios.get(this.$baseUrl + "/Sc_MouldInRequestBillController/CheckAll", {
params: { "ids": ids, "Type": num, "HMaker": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
@@ -843,7 +965,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
@@ -866,7 +988,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