Browse Source

盘点

fix_bug_pro20231227
马远东 1 year ago
parent
commit
7b68850e07
  1. 294
      src/views/distribution/checkInventoryTask/createTask.vue

294
src/views/distribution/checkInventoryTask/createTask.vue

@ -239,7 +239,7 @@
<el-input
@change="InputSo(item)"
clearable
v-if="item.type == 5 || item.prop == 'categoryName'"
v-if="item.type == 5 || item.prop == 'categoryName' || item.prop == 'materialCode'"
v-model="item.values"
:placeholder="`请输入${item.label}`"
/>
@ -288,7 +288,7 @@
}}</span
>
<span v-if="item.type == 10">
<span v-if="item.type == 10 && item.prop !='materialCode'">
<el-input
clearable
:disabled="props.row.Checkbox"
@ -297,6 +297,25 @@
/>
</span>
<span v-if="item.type==10 && item.prop == 'materialCode'">
<!-- 下拉搜索 -->
<el-select v-if="props.row.wLinputState" v-model="props.row.Input" filterable placeholder="请输入物料编码" >
<el-option
v-for="item in Wloptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-input v-else
@change='wLcheng(props.row,props.row)'
clearable
:disabled="props.row.Checkbox"
v-model="props.row.Input"
:placeholder="`请输入${item.label}`"
/>
</span>
<div :class="ElBtnClass" v-if="item.type == 3 && !NotCounted">
<el-button
:link="ElButtonS[2].link"
@ -588,7 +607,7 @@
row-key="name"
border
height="600"
style="width: 100%"
style="width:100%"
@select-all="contrastselectAll"
@select="contrastselectChange"
>
@ -602,7 +621,6 @@
width: 宽度
prop: 数据字段
-->
<el-table-column
:prop="item.prop"
:label="item.label"
@ -665,11 +683,13 @@ import {
$_exportGetContrastInfo,
$_getList,
} from '@/api/distribution/createTask';
import { ElMessageBox } from 'element-plus'
import { ElMessage } from 'element-plus';
import { downloadXls } from '@/utils/util';
import { getDictionaryBiz } from '@/api/system/dict';
import { ref } from 'vue';
const wLinput=ref(null);//
const wLinputState=ref(false);//
const SoInfoData = ref({}); //
const searchSo = ref(false); //
const ElData = ref([]); //
@ -978,7 +998,7 @@ const InventoryDetails = ref([
head: true,
},
{
prop: 'updateUser',
prop: 'inventoryPerson',
label: '盘点人',
type: 4,
values: '',
@ -989,7 +1009,7 @@ const InventoryDetails = ref([
head: true,
},
{
prop: 'updateTime',
prop: 'inventoryDate',
label: '盘点时间',
type: 4,
values: '',
@ -1032,20 +1052,21 @@ const InventoryDetails = ref([
search: true,
head: true,
},
{
prop: 'brandName',
label: '品牌',
type: 4,
prop: 'categoryName',
label: '产品名称',
type: 10,
values: '',
width: '250',
width: '260',
checkarr: [],
fixed: false,
search: true,
head: true,
},
{
prop: 'categoryName',
label: '产品名称',
prop: 'materialCode',
label: '物料编码',
type: 10,
values: '',
width: '260',
@ -1055,11 +1076,11 @@ const InventoryDetails = ref([
head: true,
},
{
prop: 'materialCode',
label: '物料编码',
type: 5,
prop: 'brandName',
label: '品牌',
type: 4,
values: '',
width: '260',
width: '250',
checkarr: [],
fixed: false,
search: true,
@ -1101,6 +1122,28 @@ const contrast = ref([
search: true,
head: true,
},
{
prop: 'trayCode',
label: '托盘码',
type: 4,
values: '',
width: '150',
checkarr: [],
fixed: false,
search: false,
head: true,
},
{
prop: 'trayName',
label: '托盘名称',
type: 4,
values: '',
width: '150',
checkarr: [],
fixed: false,
search: false,
head: true,
},
{
prop: 'brandName',
label: '品牌',
@ -1178,17 +1221,6 @@ const contrast = ref([
search: false,
head: true,
},
{
prop: 'pallet',
label: '所在托盘号',
type: 4,
values: '',
width: '150',
checkarr: [],
fixed: false,
search: false,
head: true,
},
{
prop: 'positionCode',
label: '货区-货架-货位',
@ -1201,7 +1233,7 @@ const contrast = ref([
head: true,
},
{
prop: 'updateUser',
prop: 'inventoryPerson',
label: '盘点人',
type: 4,
values: '',
@ -1212,7 +1244,7 @@ const contrast = ref([
head: true,
},
{
prop: 'updateTime',
prop: 'inventoryDate',
label: '盘点时间',
type: 4,
values: '',
@ -1244,28 +1276,7 @@ const contrast = ref([
search: false,
head: true,
},
{
prop: 'trayCode',
label: '托盘码',
type: 4,
values: '',
width: '150',
checkarr: [],
fixed: false,
search: false,
head: true,
},
{
prop: 'trayName',
label: '托盘名称',
type: 4,
values: '',
width: '150',
checkarr: [],
fixed: false,
search: false,
head: true,
},
{
prop: 'groundingPositionCode',
label: '新货位',
@ -1420,57 +1431,57 @@ const InputSo = val => {
let data = {};
data.current = TccurrentPage.value;
data.size = TcpageSize.value;
if (val.prop == 'categoryName') {
//
data.name = val.values;
$_materialList(data).then(res => {
console.log(res, '查询的返回值');
if (res.data.data.records.length) {
Tctotal.value = res.data.data.total;
res.data.data.records.forEach(item => {
item.Checkbox = true;
});
TcPdloading.value = false;
console.log(res, '明细返回值');
TcPD.value = res.data.data.records;
} else {
Statusjudgment.value = true; //
TcPD.value = res.data.data.records;
ElMessage({
message: '暂未查询到内容',
type: 'warning',
});
}
});
// if (val.prop == 'categoryName') {
// //
// data.name = val.values;
// $_materialList(data).then(res => {
// console.log(res, '');
// if (res.data.data.records.length) {
// Tctotal.value = res.data.data.total;
// res.data.data.records.forEach(item => {
// item.Checkbox = true;
// });
// TcPdloading.value = false;
// console.log(res, '');
// TcPD.value = res.data.data.records;
// } else {
// Statusjudgment.value = true; //
// TcPD.value = res.data.data.records;
// ElMessage({
// message: '',
// type: 'warning',
// });
// }
// });
return;
}
if (val.prop == 'materialCode') {
//
data.sku = val.values;
$_materialList(data).then(res => {
console.log(res, '查询的返回值');
if (res.data.data.records.length) {
Tctotal.value = res.data.data.total;
res.data.data.records.forEach(item => {
item.Checkbox = true;
});
TcPdloading.value = false;
console.log(res, '明细返回值');
TcPD.value = res.data.data.records;
} else {
Statusjudgment.value = true; //
TcPD.value = res.data.data.records;
ElMessage({
message: '暂未查询到内容',
type: 'warning',
});
}
});
return;
}
// return;
// }
// if (val.prop == 'materialCode') {
// //
// data.sku = val.values;
// $_materialList(data).then(res => {
// console.log(res, '');
// if (res.data.data.records.length) {
// Tctotal.value = res.data.data.total;
// res.data.data.records.forEach(item => {
// item.Checkbox = true;
// });
// TcPdloading.value = false;
// console.log(res, '');
// TcPD.value = res.data.data.records;
// } else {
// Statusjudgment.value = true; //
// TcPD.value = res.data.data.records;
// ElMessage({
// message: '',
// type: 'warning',
// });
// }
// });
// return;
// }
if (val.prop != 'categoryName' || val.prop != 'materialCode') {
// if (val.prop != 'categoryName' || val.prop != 'materialCode') {
let dataS = {
questNum: row.value.questNum,
questId: row.value.id,
@ -1483,12 +1494,13 @@ const InputSo = val => {
Tctotal.value = res.data.data.total;
res.data.data.records.forEach(item => {
item.Checkbox = true;
item.wLinputState=false;
});
TcPdloading.value = false;
console.log(res, '明细返回值222');
TcPD.value = res.data.data.records;
});
}
// }
};
//
const TcAddData = () => {
@ -1594,6 +1606,7 @@ const extension = val => {
//
const BatchDelete = () => {};
//
const InventoryDate = () => {
console.log(TcData.value, '延期');
@ -1617,6 +1630,7 @@ const InventoryDate = () => {
//
const InventoryModification = () => {
console.log(Tcrow.value,'Tcrow.value');
if (!Tcrow.value) {
ElMessage({
showClose: true,
@ -1637,17 +1651,18 @@ const InventoryModification = () => {
questNum: row.value.questNum,
});
});
$_updateDetailInfo(data).then(res => {
TcViewEvent(row.value); //
console.log(res, '修改成功之后的返回值');
if (res.data.code == 200) {
ElMessage({
showClose: true,
message: res.data.msg,
type: 'success',
});
}
});
console.log(data, '要提交的数据');
// $_updateDetailInfo(data).then(res => {
// TcViewEvent(row.value); //
// console.log(res, '');
// if (res.data.code == 200) {
// ElMessage({
// showClose: true,
// message: res.data.msg,
// type: 'success',
// });
// }
// });
};
//
const comparativeData = val => {
@ -1686,6 +1701,7 @@ const TcViewEvent = (val,Inso) => {
Tctotal.value = res.data.data.total;
res.data.data.records.forEach(item => {
item.Checkbox = true;
item.wLinputState=false;
});
TcPdloading.value = false;
console.log(res, '明细返回值');
@ -1727,6 +1743,7 @@ const NotCountedFn = (row,Inso) => {
console.log(res, '未盘点明细返回值');
res.data.data.records.forEach(item => {
item.Checkbox = true;
item.wLinputState=false;
});
TcPD.value = res.data.data.records;
Tctotal.value = res.data.data.total; //
@ -1994,7 +2011,6 @@ const StatusDetermination = () => {
const optionss = ref([])
const loadings = ref(false)
const list = ref([])
const remoteMethod = (query) => {
if (query !== '') {
@ -2020,6 +2036,55 @@ const Tclist = val => {
}
console.log(TcReaJoin.value, '处理好的数据');
};
//
const Wllist = ref([])
const WLCode = (query) => {
if (query !== '') {
optionss.value = Wllist.value.filter((item) => {
return item.label.toLowerCase().includes(query.toLowerCase())
})
} else {
optionss.value = []
}
}
//
const Wloptions = ref([])
//
const wLcheng=(val,info)=>{
console.log(val.undefined);
console.log(info,'信息');
$_materialList({
name:val.undefined
}).then(res=>{
console.log(res,'物料查询');
if(!res.data.data.records.length){
ElMessageBox.confirm('暂无数据是否新增?')
.then(() => {
TcDataaddition.value=true
})
.catch(() => {
// catch error
})
}else{
// productCode
// wLinputState.value=true;//
info.wLinputState=true;
// Wloptions.value
res.data.data.records.forEach(item=>{
Wloptions.value.push(
{
label:item.name,
value:item.id
}
)
})
}
})
}
//
const InventoryEditing = val => {
$_getList({
@ -2165,6 +2230,7 @@ const TcChenge = (event, val) => {
Tctotal.value = res.data.data.total;
res.data.data.records.forEach(item => {
item.Checkbox = true;
item.wLinputState=false;
});
TcPdloading.value = false;
console.log(res, '明细返回值');

Loading…
Cancel
Save