Browse Source

售后页面修改

fix_bug_pro20231227
pref_mail@163.com 1 year ago
parent
commit
c052739366
  1. 2
      src/api/distribution/createTask.js
  2. 172
      src/views/distribution/checkInventoryTask/createTaskTemp.vue

2
src/api/distribution/createTask.js

@ -76,7 +76,7 @@ export const $_getDetailInfo = params => {
export const $_updateQuestChildInfo = data => {
return request({
url: '/api/logpm-warehouse/blade-taskQuest/taskQuest/updateQuestChildInfo',
method:'post',
method:'put',
data,
});
};

172
src/views/distribution/checkInventoryTask/createTaskTemp.vue

@ -174,7 +174,8 @@
<el-dialog v-model="PopupDetails" title="盘点数据" width="70%" :before-close="handleClose">
<div style="margin-bottom:10px;">
<div v-if='TcMInventoryStatus'>
<div>
<!-- v-if='TcMInventoryStatus' -->
<div v-if="!NotCounted">
<el-button type="primary" @click="searchChange"> </el-button>
<el-button type="primary" @click="InventoryModification">提交修改</el-button>
@ -316,13 +317,28 @@
<!-- 状态选择 -->
<el-dialog v-model="InventoryStatus" title="状态选择" width="70%" style="display: flex;flex-direction: column;">
<el-radio-group v-model="WrapBarEditing.radio" class="tcradiogroup">
<!-- 定制品单选框 -->
<el-radio-group v-model="WrapBarEditing.radio" class="tcradiogroup" v-if="!TcStateSwitching">
<template v-for='(item,index) in radioList' :key='item.label'>
<div class="Tcstate">
<el-radio @change='TcReac' :label=item.label>{{item.txt}} </el-radio> <el-input-number v-model="counting[item.input]" :disabled="item.disabled" placeholder="数量" />
</div>
</template>
</el-radio-group>
<!-- 多选框 -->
<el-checkbox-group v-model="radioList" v-else>
<template v-for='(item,index) in radioList' :key='item.label'>
<div class="Tcstate">
<el-checkbox @change='Tcmultiple' :label="item.txt"/><el-input-number v-model="counting[item.input]" :disabled="item.disabled" placeholder="数量" />
</div>
</template>
</el-checkbox-group>
<span class="Tcstdialog-footer">
<el-button @click="InventoryStatus=false">取消</el-button>
<el-button type="primary" @click="StatusDetermination">确定</el-button>
@ -552,8 +568,12 @@ const Inventoryrow=ref({});//详情编辑响应式临时数据
const NotCounted=ref(false);//
const UncheckedRow=ref({});//
const InventoryStatus=ref(false);//
const InventoryInput=ref(null);//input
// const InventoryData=ref([]);//
const TcMInventoryStatus=ref(true);//
const TcStatusModification=ref(false);//
const TcStateSwitching=ref(false);//
const TcnumStatu=ref(false);//,,
const radioList=ref([
{label:0,txt:'在库',input:'stockNum',disabled:true },
{label:1,txt:'破损',input:'wornNum',disabled:true },
@ -1090,12 +1110,26 @@ const TcselectAll=(selectAll,val)=>{
item.Checkbox=!item.Checkbox
})
}
//
}
//
const TcselectChange=(selectAll,val)=>{
val.Checkbox=!val.Checkbox;//
Tcrow.value=selectAll
console.log(Tcrow.value,'弹窗单选');
if(TcStatusModification.value){ //
if(val.questTarget!=1){
Tcrow.value=val
Tcrow.value=selectAll
console.log(Tcrow.value,'状态多条修改');
}else{
Tcrow.value=val
console.log(Tcrow.value,'零担单条数据修改');
}
}else{
//
Tcrow.value=selectAll
}
}
//
const extension=(val)=>{
@ -1122,10 +1156,7 @@ const InventoryDate=()=>{
console.log(res,'延期成功返回值');
})
}
// ,
const ModifyingStatus=()=>{
InventoryStatus.value=true;//
}
//
const InventoryModification=()=>{
if(!Tcrow.value){
@ -1218,15 +1249,7 @@ const ViewEvent = val => {
}
TcViewEvent(row.value)
};
//
const TcReac=(val)=>{
console.log(val);
radioList.value.forEach(item=>{
item.disabled=true;
counting.value[item.input]=0
})
radioList.value[val].disabled=false;
}
//
const NotCountedFn=(row)=>{
TcPdloading.value=true;
@ -1291,39 +1314,118 @@ $_updateDetailInfo(data).then(res=>{
}
})
}
// ,
const ModifyingStatus=()=>{
if(!Tcrow.value){
ElMessage({
showClose: true,
message: '暂未选择信息',
type: 'warning',
})
return
}
InventoryStatus.value=true;//
if(Tcrow.value[0].questTarget==1){//
TcStateSwitching.value=false;
}else{
TcStateSwitching.value=true;//
}
}
//
const TcReac=(val)=>{
console.log(val);
InventoryInput.value=val;//input
if(!TcStateSwitching.value){//
radioList.value.forEach(item=>{
item.disabled=true;
counting.value[item.input]=0
})
radioList.value[val].disabled=false;
counting.value[radioList.value[val].input]=1;//1
}else{
//,
if(!TcnumStatu.value){
radioList.value.forEach(item=>{
item.disabled=true;
counting.value[item.input]=0
})
TcnumStatu.value=true;//
}else{
radioList.value[val].disabled=false;
}
}
}
//
const Tcmultiple=(val)=>{
console.log(val);
}
//
const StatusDetermination=()=>{
console.log(row.value,'row.value');
if(!TcStateSwitching.value){//
let InputMax=counting.value[radioList.value[InventoryInput.value].input];//
if(InputMax>Tcrow.value[0].questTarget){
ElMessage({
showClose: true,
message: '数量超过最大值上限',
type: 'warning',
})
return
}
console.log(counting.value,'状态输入框的值');
let start= Tcrow.value.questTarget
let data=[];
Tcrow.value.forEach(item=>{
console.log(item);
const filteredData = Tcrow.value.filter(item => item.name == start); //
filteredData.forEach(item=>{
console.log(item);
data.push({
cargoName:1,
questNum:item.questNum,//
stockNum:item.stockNum,//
lossNum:item.lossNum,//
deliveNum:item.deliveNum,//
wornNum:item.wornNum,//
noRepairNum:item.noRepairNum,//
noReceivedNum:item.noReceivedNum,//
stockNum:counting.value.stockNum,//
lossNum:counting.value.lossNum,//
deliveNum:counting.value.deliveNum,//
wornNum:counting.value.wornNum,//
noRepairNum:counting.value.noRepairNum,//
noReceivedNum:counting.value.noReceivedNum,//
questNum:row.value.questNum,//
questId:item.questId,
allocationId:item.allocationId,//id
})
id:item.id,
cargoName: Number((InventoryInput.value +1) +'0') ,//
})
})
console.log(data,'处理好的数据');
// $_updateQuestChildInfo().then(res=>{
// console.log(res,'');
// })
$_updateQuestChildInfo(data).then(res=>{
console.log(res,'盘点状态修改完成的返回值');
if(res.data.code==200){
ElMessage({
showClose: true,
message:res.data.msg,
type: 'success',
})
InventoryStatus.value=false;//
TcViewEvent(row.value)
}
})
}
// else{
// // ,
// }
}
//
const TcPageSizeChange=(val)=>{
console.log('每一页多少条');
TcpageSize.value=val;
if(NotCounted.value){//
NotCountedFn(UncheckedRow.value)
}else{
console.log(val);
TcpageSize.value=val;
TcViewEvent(row.value)
}
@ -1331,13 +1433,13 @@ const TcPageSizeChange=(val)=>{
//
const TcSizeChange=(val)=>{
TccurrentPage.value=val;
console.log('翻页');
TccurrentPage.value=val;
if(NotCounted.value){//
NotCountedFn(UncheckedRow.value)
}else{
console.log(val);
TcpageSize.value=val;
TcViewEvent(row.value)
}
}

Loading…
Cancel
Save