This commit is contained in:
郭飞 2025-05-19 09:07:18 +08:00
commit e413f991fc
3 changed files with 59 additions and 16 deletions

View File

@ -131,4 +131,15 @@ export function printStorage(data: any) {
method: 'post', method: 'post',
data: data, data: data,
}); });
}
/**
*
* @returns
*/
export function getUserInfo() {
return request({
url: '/api/CostCenter/getUserInfo',
method: 'get',
})
} }

View File

@ -636,9 +636,9 @@ function changeFac(e: any) {
state.queryParams.params.destinationErpFactory = e state.queryParams.params.destinationErpFactory = e
state.spcERPFactoryList = [] as any state.spcERPFactoryList = [] as any
ERPLocationQuery() ERPLocationQuery()
if(e == "1010" || e == "1020") { if(e == "1010" || e == "1020" || e == "1200") {
state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) =>
(item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020") (item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020" || item.ERPFACTORY === "1200")
) )
}else { }else {
state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) =>
@ -673,9 +673,9 @@ function ERPFactoryQuery() {
state.ERPFactoryList.unshift({ state.ERPFactoryList.unshift({
ERPFACTORY: '' ERPFACTORY: ''
}) })
if(state.queryParams.params.ERPFACTORY == "1010" || state.queryParams.params.ERPFACTORY == "1020") { if(state.queryParams.params.ERPFACTORY == "1010" || state.queryParams.params.ERPFACTORY == "1020" || state.queryParams.params.ERPFACTORY == "1200") {
state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) =>
(item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020") (item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020" || item.ERPFACTORY === "1200")
) )
}else { }else {
state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) =>

View File

@ -156,16 +156,30 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row :gutter="22"> <el-row :gutter="24" class="page-search" justify="space-between" align="bottom">
<el-form ref="formDataRef" :model="state.CAREER_ASSISTANCE" :rules="rules" label-position="top" > <el-form ref="formDataRef" :model="state.CAREER_ASSISTANCE" :rules="rules" label-position="left" >
<el-form-item label="" prop="CAREER_ASSISTANCE"> <el-form-item label="" prop="CAREER_ASSISTANCE">
<el-col :span="9"> <el-col :span="6">
<el-form-item label="借用人">
<!-- <el-Input @input="inputCareer" v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/>--> <!-- <el-Input @input="inputCareer" v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/>-->
<el-Input v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/> <!-- <el-Input v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/> -->
<el-select filterable v-model="state.CAREER_ASSISTANCE" placeholder="下拉选择业助" size="small">
<el-option v-for="item in state.userList" :key="item.USERNAME"
:label="item.USERNAME" :value="item.USERNAME" />
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="6">
<el-form-item label="新销售订单">
<!-- <el-Input @input="inputCareer" v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/>--> <!-- <el-Input @input="inputCareer" v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/>-->
<el-Input v-model="state.COUSTOMNO" placeholder="客户" :rules="rules"/> <el-Input v-model="state.SALESHIPREQUESTNAME" placeholder="单号" :rules="rules"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="新销售订单行号">
<!-- <el-Input @input="inputCareer" v-model="state.CAREER_ASSISTANCE" placeholder="业助" :rules="rules"/>-->
<el-Input v-model="state.SALESHIPREQUESTDETAILNAME" placeholder="行号" :rules="rules"/>
</el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-button type="primary" @click="modifiedRemark" :disabled="state.CAREER_ASSISTANCEDrawer" v-loading="state.loadings">更新</el-button> <el-button type="primary" @click="modifiedRemark" :disabled="state.CAREER_ASSISTANCEDrawer" v-loading="state.loadings">更新</el-button>
@ -207,10 +221,11 @@
import router from "@/router"; import router from "@/router";
import exportDataToExcel from "@/utils/export-excel"; import exportDataToExcel from "@/utils/export-excel";
import { localStorage } from '@/utils/storage' import { localStorage } from '@/utils/storage'
import { updateCareerAssistance, updateRemark } from '@/api/label' import { updateCareerAssistance, updateRemark, getUserInfo } from '@/api/label'
import { bTableHeight } from "../../../composables/calcTableHeight"; import { bTableHeight } from "../../../composables/calcTableHeight";
import { getORG } from '@/api/auth'; import { getORG } from '@/api/auth';
import { search } from '@/api/wareHouse' import { search } from '@/api/wareHouse'
import { log } from "node:console";
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(310); const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(310);
@ -234,6 +249,9 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
CAREER_ASSISTANCE : '', CAREER_ASSISTANCE : '',
CHARGE : '', CHARGE : '',
} , } ,
userList: [],
SALESHIPREQUESTNAME: '',
SALESHIPREQUESTDETAILNAME: '',
boxDrawer :false, boxDrawer :false,
PhaseList: [{ label: '全部', Value: '' }, { label: 'C', Value: 'C' }, { label: 'D', Value: 'D' }, { label: 'S', Value: 'S' }] as any, PhaseList: [{ label: '全部', Value: '' }, { label: 'C', Value: 'C' }, { label: 'D', Value: 'D' }, { label: 'S', Value: 'S' }] as any,
ChangeERPLocation: [], ChangeERPLocation: [],
@ -260,7 +278,9 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
FROMDATE: '', FROMDATE: '',
TODATE: '', TODATE: '',
CAREER_ASSISTANCE :'', CAREER_ASSISTANCE :'',
DESC_CN:'' DESC_CN:'',
OQARESULTSTATE: '',
PACKINGGRADE: '',
}, },
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
@ -431,7 +451,7 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
handleQuery(); handleQuery();
ERPFactoryQuery(); ERPFactoryQuery();
// ERPLocationQuery(); // ERPLocationQuery();
getUser();
updateTableHeight(); updateTableHeight();
window.addEventListener('resize', handleResize); window.addEventListener('resize', handleResize);
}); });
@ -489,6 +509,12 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
} }
} }
function getUser() {
getUserInfo().then((res: any) => {
state.userList = res.data;
})
}
function modifiedRemark() { function modifiedRemark() {
if ( state.multipleSelection.length == 0) { if ( state.multipleSelection.length == 0) {
ElMessageBox.alert('列表为空', { ElMessageBox.alert('列表为空', {
@ -496,6 +522,8 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
}) })
return return
} }
console.log(state.multipleSelection);
// return
let boxLists = [] let boxLists = []
for (var i = 0 ; i < state.multipleSelection.length; ++ i) { for (var i = 0 ; i < state.multipleSelection.length; ++ i) {
state.multipleSelection[i].key = { state.multipleSelection[i].key = {
@ -514,15 +542,19 @@ const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableH
boxList : boxLists, boxList : boxLists,
USER : localStorage.get('userId'), USER : localStorage.get('userId'),
remark: state.CAREER_ASSISTANCE, remark: state.CAREER_ASSISTANCE,
CUSTOMNO : state.COUSTOMNO // CUSTOMNO : state.COUSTOMNO,
SALESHIPREQUESTNAME: state.SALESHIPREQUESTNAME, //
SALESHIPREQUESTDETAILNAME: state.SALESHIPREQUESTDETAILNAME,//
} }
// console.log(PRINT) // console.log(PRINT)
// return; // return;
updateCareerAssistance(PRINT).then((res: any) => { updateCareerAssistance(PRINT).then((res: any) => {
console.log(res.success) console.log(res.success)
state.CAREER_ASSISTANCE = '' // state.COUSTOMNO = ''
state.COUSTOMNO = ''
if (res.success) { if (res.success) {
state.SALESHIPREQUESTNAME = '';
state.SALESHIPREQUESTDETAILNAME = '';
state.CAREER_ASSISTANCE = '';
// proxy.$ElMessage.success(''); // proxy.$ElMessage.success('');
ElMessageBox.alert('业助更新成功', '提醒框', { ElMessageBox.alert('业助更新成功', '提醒框', {
confirmButtonText: 'OK', confirmButtonText: 'OK',