|
|
|
@ -31,6 +31,8 @@
|
|
|
|
|
</el-icon> |
|
|
|
|
创建盘点任务</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" @click="discard"> 废弃</el-button> |
|
|
|
|
<el-button type="primary" @click="DelayButton"> 延期</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="Refresh" circle></el-button> |
|
|
|
@ -90,40 +92,17 @@
|
|
|
|
|
<template #default="props"> |
|
|
|
|
<img :src="props.row[item.prop]" class="el-Img" v-if="item.type === 2" /> |
|
|
|
|
|
|
|
|
|
<div :class="ElBtnClass" v-if="item.type == 3"> |
|
|
|
|
<el-button |
|
|
|
|
|
|
|
|
|
@click="ViewEvent(props.row)" |
|
|
|
|
>已盘点明细</el-button |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
|
|
@click="DetailsNotCounted(props.row)" |
|
|
|
|
>未盘点明细</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
|
|
|
|
|
@click="Discard(props.row)" |
|
|
|
|
>废弃</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
|
|
|
|
|
@click="extension(props.row)" |
|
|
|
|
>延期</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
<div class="ElBtnClass" v-if="item.type == 3"> |
|
|
|
|
<el-button @click="ViewEvent(props.row)">已盘点明细</el-button> |
|
|
|
|
|
|
|
|
|
@click="comparativeData(props.row)" |
|
|
|
|
>对比数据</el-button |
|
|
|
|
> |
|
|
|
|
<el-button @click="DetailsNotCounted(props.row)">未盘点明细</el-button> |
|
|
|
|
<!-- <el-button @click="Discard(props.row)">废弃</el-button> |
|
|
|
|
<el-button @click="extension(props.row)">延期</el-button> --> |
|
|
|
|
<el-button @click="comparativeData(props.row)">对比数据</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.type == 5 && item.prop == 'questNum'"> |
|
|
|
|
{{ |
|
|
|
|
props.row[item.prop] ? props.row[item.prop] : '/' |
|
|
|
|
}} |
|
|
|
|
{{ props.row[item.prop] ? props.row[item.prop] : '/' }} |
|
|
|
|
<span class="el-exDc" @click="ExportDC(props.row)">导出</span> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<span v-if="item.type == 7">{{ |
|
|
|
|
props.row[item.prop] == 1 ? '全部' : props.row[item.prop] == 2 ? '全仓' : '/' |
|
|
|
@ -163,7 +142,13 @@
|
|
|
|
|
</div> |
|
|
|
|
<!-- 弹窗详情 --> |
|
|
|
|
|
|
|
|
|
<el-dialog v-model="PopupDetails" :title="!InventoryState?'盘点数据':'未盘点数据'" width="80%" :before-close="handleClose" :fullscreen="fullScreen"> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="PopupDetails" |
|
|
|
|
:title="!InventoryState ? '盘点数据' : '未盘点数据'" |
|
|
|
|
width="80%" |
|
|
|
|
:before-close="handleClose" |
|
|
|
|
:fullscreen="fullScreen" |
|
|
|
|
> |
|
|
|
|
<div style="margin-bottom: 10px"> |
|
|
|
|
<div style="display: flex"> |
|
|
|
|
<!-- v-if="TcMInventoryStatus" --> |
|
|
|
@ -182,7 +167,6 @@
|
|
|
|
|
<div class="fullScreen" @click="BtnfullScreen"> |
|
|
|
|
<el-icon><FullScreen /></el-icon> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 表格开始 --> |
|
|
|
@ -250,6 +234,23 @@
|
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 日期搜索 --> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-if="item.type == 8" |
|
|
|
|
v-model="TcFrom[item.prop]" |
|
|
|
|
type="datetimerange" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始时间" |
|
|
|
|
end-placeholder="结束时间" |
|
|
|
|
@change="TcChenge($event, item)" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<template #default="props"> |
|
|
|
|
<span v-if="item.type == 6 && item.prop == 'questStatus'"> |
|
|
|
@ -289,7 +290,12 @@
|
|
|
|
|
|
|
|
|
|
<span v-if="item.type == 10 && item.prop == 'materialCode'"> |
|
|
|
|
<!-- 下拉搜索 --> |
|
|
|
|
<el-select v-if="props.row.wLinputState" v-model="props.row.Input" filterable placeholder="请输入物料编码" > |
|
|
|
|
<el-select |
|
|
|
|
v-if="props.row.wLinputState" |
|
|
|
|
v-model="props.row.Input" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请输入物料编码" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Wloptions" |
|
|
|
|
:key="item.value" |
|
|
|
@ -297,14 +303,14 @@
|
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
<el-input v-else |
|
|
|
|
@change='wLcheng(props.row,props.row)' |
|
|
|
|
<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 |
|
|
|
@ -443,8 +449,6 @@
|
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="新的货位"> |
|
|
|
|
<el-select-v2 |
|
|
|
|
v-model="WrapBarEditing.groundingPositionCode" |
|
|
|
@ -519,19 +523,14 @@
|
|
|
|
|
</el-dialog> |
|
|
|
|
</el-dialog> |
|
|
|
|
<!-- 创建盘点弹窗 --> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="InventoryPopup" |
|
|
|
|
title="创建盘点任务" |
|
|
|
|
width="30%" |
|
|
|
|
> |
|
|
|
|
<el-dialog v-model="InventoryPopup" title="创建盘点任务" width="30%"> |
|
|
|
|
<el-form :model="formInventory" label-width="120px"> |
|
|
|
|
<el-form-item label="商场名称"> |
|
|
|
|
<el-select |
|
|
|
|
multiple |
|
|
|
|
v-model="formInventory.scname" |
|
|
|
|
class="m-2" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请选择商场" |
|
|
|
|
size="large" |
|
|
|
|
@change="formInventoryChange" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
@ -543,11 +542,12 @@
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="品牌"> |
|
|
|
|
<el-input v-model="formInventory.brandName" disabled placeholder="品牌名称" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="盘点时间"> |
|
|
|
|
<el-form-item label="盘点时间" class="pdsj"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="formInventory.time" |
|
|
|
|
type="datetimerange" |
|
|
|
@ -674,7 +674,7 @@ import {
|
|
|
|
|
$_getList, |
|
|
|
|
$_postBatchDelete, |
|
|
|
|
} from '@/api/distribution/createTask'; |
|
|
|
|
import { ElMessageBox } from 'element-plus' |
|
|
|
|
import { ElMessageBox } from 'element-plus'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
@ -708,6 +708,7 @@ const Tcrow = ref(); //弹窗当前行
|
|
|
|
|
const WrapBarEditing = ref({}); //弹窗数据编辑 |
|
|
|
|
const PopupEditing = ref(false); //弹窗编辑 |
|
|
|
|
const ElBtnClass = ref(null); |
|
|
|
|
const DiskStatus=ref(true);//已盘、未盘状态 |
|
|
|
|
const UncountedDetails = ref(); //未盘点明细盘点必须参数 |
|
|
|
|
const contrastData = ref([]); //对比数据表格 |
|
|
|
|
const dialogcontrast = ref(false); //对比数据弹窗 |
|
|
|
@ -727,10 +728,12 @@ const TcReaJoin = ref([]); //零担库存品状态10,20,30...
|
|
|
|
|
const TcDataaddition = ref(false); //数据新增弹唱 |
|
|
|
|
const Fromnewlyadded = ref({}); //数据新增 |
|
|
|
|
const screenHeight = ref(0); // 屏幕高度 |
|
|
|
|
const HomepageDelay = ref(null); //首页延期 |
|
|
|
|
const eightyPercentHeight = ref(0); // 80% 高度 |
|
|
|
|
const Statusjudgment = ref(false); //新增按钮 |
|
|
|
|
const DbEx = ref(null); //对比明细导出 |
|
|
|
|
const fullScreen = ref(false); //是否全屏 |
|
|
|
|
const BatchAbandonment = ref([]); //首页废弃 |
|
|
|
|
const radioList = ref([ |
|
|
|
|
{ label: 0, txt: '在库', input: 'stockNum', disabled: true }, |
|
|
|
|
{ label: 1, txt: '破损', input: 'wornNum', disabled: true }, |
|
|
|
@ -835,6 +838,17 @@ const menuData = ref([
|
|
|
|
|
search: false, |
|
|
|
|
head: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'stockNum', |
|
|
|
|
label: '数量', |
|
|
|
|
type: 5, |
|
|
|
|
values: '', |
|
|
|
|
width: '260', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
search: true, |
|
|
|
|
head: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'questType', |
|
|
|
|
label: '类型', |
|
|
|
@ -862,7 +876,7 @@ const menuData = ref([
|
|
|
|
|
label: '操作', |
|
|
|
|
type: 3, |
|
|
|
|
values: '', |
|
|
|
|
width: '430', |
|
|
|
|
width: '230', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: 'right', |
|
|
|
|
search: false, |
|
|
|
@ -969,6 +983,17 @@ const InventoryDetails = ref([
|
|
|
|
|
search: true, |
|
|
|
|
head: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'stockNum', |
|
|
|
|
label: '数量', |
|
|
|
|
type: 5, |
|
|
|
|
values: '', |
|
|
|
|
width: '260', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
search: true, |
|
|
|
|
head: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'trayCode', |
|
|
|
|
label: '托盘码', |
|
|
|
@ -1005,9 +1030,9 @@ const InventoryDetails = ref([
|
|
|
|
|
{ |
|
|
|
|
prop: 'inventoryDate', |
|
|
|
|
label: '盘点时间', |
|
|
|
|
type: 5, |
|
|
|
|
type: 8, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
width: '350', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
search: false, |
|
|
|
@ -1240,9 +1265,9 @@ const contrast = ref([
|
|
|
|
|
{ |
|
|
|
|
prop: 'inventoryDate', |
|
|
|
|
label: '盘点时间', |
|
|
|
|
type: 4, |
|
|
|
|
type: 8, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
width: '350', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
search: false, |
|
|
|
@ -1337,11 +1362,11 @@ const ElButtonS = ref([
|
|
|
|
|
]); |
|
|
|
|
// 页面初始化请求 |
|
|
|
|
|
|
|
|
|
const IndexPd=(val)=>{ |
|
|
|
|
const IndexPd = val => { |
|
|
|
|
let Data = { |
|
|
|
|
current: currentPage.value, //页码 |
|
|
|
|
size: pageSize.value, //条数 |
|
|
|
|
...val |
|
|
|
|
...val, |
|
|
|
|
}; |
|
|
|
|
getTaskQuestPage(Data).then(res => { |
|
|
|
|
console.log(res, '获取盘点列表'); |
|
|
|
@ -1359,11 +1384,11 @@ const IndexPd=(val)=>{
|
|
|
|
|
ElData.value = res.data.data.records; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 弹窗全屏 |
|
|
|
|
const BtnfullScreen = () => { |
|
|
|
|
fullScreen.value = !fullScreen.value; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function onLoad() { |
|
|
|
|
// 在组件挂载后获取屏幕高度 |
|
|
|
@ -1385,7 +1410,7 @@ function onLoad() {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
loading.value = true; //开启表格加载 |
|
|
|
|
IndexPd() |
|
|
|
|
IndexPd(); |
|
|
|
|
// let Data = { |
|
|
|
|
// current: currentPage.value, //页码 |
|
|
|
|
// size: pageSize.value, //条数 |
|
|
|
@ -1411,21 +1436,19 @@ function onLoad() {
|
|
|
|
|
// 调用页面初始化获取数据 |
|
|
|
|
onLoad(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 首页搜索框 |
|
|
|
|
const InInputSo = (values, val) => { |
|
|
|
|
console.log(values, val); |
|
|
|
|
let data = { |
|
|
|
|
[val.prop]:values |
|
|
|
|
} |
|
|
|
|
[val.prop]: values, |
|
|
|
|
}; |
|
|
|
|
console.log(data); |
|
|
|
|
IndexPd(data) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IndexPd(data); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 搜索框 |
|
|
|
|
const InputSo = val => { |
|
|
|
|
TcPdloading.value=true |
|
|
|
|
TcPdloading.value = true; |
|
|
|
|
console.log(val, '搜索框接收的值'); |
|
|
|
|
let data = {}; |
|
|
|
|
console.log(row.value, 'row.value'); |
|
|
|
@ -1495,7 +1518,7 @@ const InputSo = val => {
|
|
|
|
|
res.data.data.records.forEach(item => { |
|
|
|
|
item.Checkbox = true; |
|
|
|
|
item.wLinputState = false; |
|
|
|
|
item.Input=null |
|
|
|
|
item.Input = null; |
|
|
|
|
}); |
|
|
|
|
TcPdloading.value = false; |
|
|
|
|
console.log(res, '明细返回值222'); |
|
|
|
@ -1508,27 +1531,26 @@ const TcAddData = () => {
|
|
|
|
|
TcDataaddition.value = true; //新增弹窗显示 |
|
|
|
|
}; |
|
|
|
|
// 对比数据导出公共函数 |
|
|
|
|
const DbExTc=(data)=>{ |
|
|
|
|
const DbExTc = data => { |
|
|
|
|
$_exportGetContrastInfo({ |
|
|
|
|
id: data.id, |
|
|
|
|
questNum:data.questNum |
|
|
|
|
questNum: data.questNum, |
|
|
|
|
}).then(res => { |
|
|
|
|
console.log(res, '导出'); |
|
|
|
|
downloadXls(res.data, `${data.questNum}对比明细.xlsx`) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
downloadXls(res.data, `${data.questNum}对比明细.xlsx`); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 盘点对比导出 |
|
|
|
|
const ExportDC = (val) => { |
|
|
|
|
const ExportDC = val => { |
|
|
|
|
// 触发下载函数 |
|
|
|
|
console.log(val); |
|
|
|
|
DbExTc(val) |
|
|
|
|
DbExTc(val); |
|
|
|
|
}; |
|
|
|
|
// 对比数据导出 |
|
|
|
|
const MXexport = () => { |
|
|
|
|
// 触发下载函数 |
|
|
|
|
DbExTc(DbEx.value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DbExTc(DbEx.value); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 新增任务按钮(搜索不到出现此按钮) |
|
|
|
|
const TcDataadditionsubmit = () => { |
|
|
|
@ -1565,10 +1587,11 @@ const TcDataadditionsubmit = () => {
|
|
|
|
|
Statusjudgment.value = false; //点击确定之后关闭按钮 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 盘点任务单选 |
|
|
|
|
const selectChange = (select, val) => { |
|
|
|
|
console.log('触发了选择'); |
|
|
|
|
HomepageDelay.value = val; //首页延期 |
|
|
|
|
console.log('首页触发了选择'); |
|
|
|
|
BatchAbandonment.value = select; //批量废弃 |
|
|
|
|
console.log(select, val); |
|
|
|
|
PdRow.value = select; |
|
|
|
|
}; |
|
|
|
@ -1607,13 +1630,19 @@ const extension = val => {
|
|
|
|
|
// 批量删除盘点任务 |
|
|
|
|
const BatchDelete = () => {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 延期提交 |
|
|
|
|
const InventoryDate = () => { |
|
|
|
|
if (!HomepageDelay.value) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择需要延期的数据(单选操作)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(TcData.value, '延期'); |
|
|
|
|
$_updateDate({ |
|
|
|
|
id: row.value.id, |
|
|
|
|
startTime: row.value.startTime, |
|
|
|
|
id: HomepageDelay.value.id, |
|
|
|
|
startTime: HomepageDelay.value.startTime, |
|
|
|
|
endTime: TcData.value, |
|
|
|
|
}).then(res => { |
|
|
|
|
dialogTabData.value = false; |
|
|
|
@ -1651,7 +1680,7 @@ const InventoryModification = () => {
|
|
|
|
|
questId: item.questId, |
|
|
|
|
questNum: row.value.questNum, |
|
|
|
|
name: item.Input, |
|
|
|
|
questStatus: 1 |
|
|
|
|
questStatus: 1, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
console.log(data, '要提交的数据'); |
|
|
|
@ -1697,7 +1726,7 @@ const TcViewEvent = (val,Inso) => {
|
|
|
|
|
current: TccurrentPage.value, //页码 |
|
|
|
|
size: TcpageSize.value, //条数 |
|
|
|
|
questStatus: 1, |
|
|
|
|
...Inso |
|
|
|
|
...Inso, |
|
|
|
|
}; |
|
|
|
|
console.log(data, '要提交的数据'); |
|
|
|
|
|
|
|
|
@ -1706,7 +1735,7 @@ const TcViewEvent = (val,Inso) => {
|
|
|
|
|
res.data.data.records.forEach(item => { |
|
|
|
|
item.Checkbox = true; |
|
|
|
|
item.wLinputState = false; |
|
|
|
|
item.Input=null |
|
|
|
|
item.Input = null; |
|
|
|
|
}); |
|
|
|
|
TcPdloading.value = false; |
|
|
|
|
console.log(res, '明细返回值'); |
|
|
|
@ -1715,9 +1744,10 @@ const TcViewEvent = (val,Inso) => {
|
|
|
|
|
}; |
|
|
|
|
// 点击详情按钮 |
|
|
|
|
const ViewEvent = val => { |
|
|
|
|
DiskStatus.value=true;//表示当前在已盘点列表 |
|
|
|
|
InventoryDetails.value.forEach(item => { |
|
|
|
|
item.values=null |
|
|
|
|
}) |
|
|
|
|
item.values = null; |
|
|
|
|
}); |
|
|
|
|
InventoryState.value = false; //修改标题(盘点数据) |
|
|
|
|
TccurrentPage.value = 1; //重置页码 |
|
|
|
|
NotCounted.value = false; //关闭未盘点 |
|
|
|
@ -1733,11 +1763,11 @@ const ViewEvent = val => {
|
|
|
|
|
TcViewEvent(row.value); |
|
|
|
|
}; |
|
|
|
|
// 废弃按钮 |
|
|
|
|
const Discard=(val)=>{ |
|
|
|
|
const Discard = val => { |
|
|
|
|
console.log(val); |
|
|
|
|
let data=[] |
|
|
|
|
data.push(val.id) |
|
|
|
|
let ids = data.join(',') |
|
|
|
|
let data = []; |
|
|
|
|
data.push(val.id); |
|
|
|
|
let ids = data.join(','); |
|
|
|
|
console.log(data); |
|
|
|
|
ElMessageBox.confirm('是否废弃该盘点任务?') |
|
|
|
|
.then(() => { |
|
|
|
@ -1747,18 +1777,15 @@ const Discard=(val)=>{
|
|
|
|
|
ElMessage({ |
|
|
|
|
message: '删除成功.', |
|
|
|
|
type: 'success', |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
IndexPd() |
|
|
|
|
}) |
|
|
|
|
IndexPd(); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
// catch error |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 未盘点数据请求 |
|
|
|
|
const NotCountedFn = (row, Inso, type = 0) => { |
|
|
|
|
TcPdloading.value = true; |
|
|
|
@ -1768,14 +1795,14 @@ const NotCountedFn = (row,Inso,type=0) => {
|
|
|
|
|
questId: row.id, |
|
|
|
|
current: TccurrentPage.value, //页码 |
|
|
|
|
size: TcpageSize.value, //条数 |
|
|
|
|
...Inso |
|
|
|
|
...Inso, |
|
|
|
|
}).then(res => { |
|
|
|
|
TcPdloading.value = false; |
|
|
|
|
console.log(res, '未盘点明细返回值'); |
|
|
|
|
res.data.data.records.forEach(item => { |
|
|
|
|
item.Checkbox = true; |
|
|
|
|
item.wLinputState = false; |
|
|
|
|
item.Input=null |
|
|
|
|
item.Input = null; |
|
|
|
|
}); |
|
|
|
|
TcPD.value = res.data.data.records; |
|
|
|
|
Tctotal.value = res.data.data.total; //总页码 |
|
|
|
@ -1784,9 +1811,10 @@ const NotCountedFn = (row,Inso,type=0) => {
|
|
|
|
|
|
|
|
|
|
// 未盘点明细 |
|
|
|
|
const DetailsNotCounted = row => { |
|
|
|
|
DiskStatus.value=false;//表示当前在未盘点列表 |
|
|
|
|
InventoryDetails.value.forEach(item => { |
|
|
|
|
item.values=null |
|
|
|
|
}) |
|
|
|
|
item.values = null; |
|
|
|
|
}); |
|
|
|
|
UncountedDetails.value = row; |
|
|
|
|
InventoryState.value = true; //修改弹窗标题(未盘点数据), |
|
|
|
|
TcFrom.value = {}; //重置搜索 |
|
|
|
@ -1801,14 +1829,6 @@ const DetailsNotCounted = row => {
|
|
|
|
|
console.log(row.value, '未盘点明细存储值'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 未盘点转已盘点按钮 |
|
|
|
|
const NotInventoried = val => { |
|
|
|
|
if (!Tcrow.value) { |
|
|
|
@ -2051,18 +2071,17 @@ const StatusDetermination = () => {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const optionss = ref([]) |
|
|
|
|
const list = ref([]) |
|
|
|
|
const remoteMethod = (query) => { |
|
|
|
|
const optionss = ref([]); |
|
|
|
|
const list = ref([]); |
|
|
|
|
const remoteMethod = query => { |
|
|
|
|
if (query !== '') { |
|
|
|
|
optionss.value = list.value.filter((item) => { |
|
|
|
|
return item.label.toLowerCase().includes(query.toLowerCase()) |
|
|
|
|
}) |
|
|
|
|
optionss.value = list.value.filter(item => { |
|
|
|
|
return item.label.toLowerCase().includes(query.toLowerCase()); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
optionss.value = [] |
|
|
|
|
} |
|
|
|
|
optionss.value = []; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 多选数据状态处理 |
|
|
|
|
const Tclist = val => { |
|
|
|
|
console.log(val); |
|
|
|
@ -2080,34 +2099,34 @@ const Tclist = val => {
|
|
|
|
|
}; |
|
|
|
|
// 物料编码 |
|
|
|
|
|
|
|
|
|
const Wllist = ref([]) |
|
|
|
|
const WLCode = (query) => { |
|
|
|
|
const Wllist = ref([]); |
|
|
|
|
const WLCode = query => { |
|
|
|
|
if (query !== '') { |
|
|
|
|
optionss.value = Wllist.value.filter((item) => { |
|
|
|
|
return item.label.toLowerCase().includes(query.toLowerCase()) |
|
|
|
|
}) |
|
|
|
|
optionss.value = Wllist.value.filter(item => { |
|
|
|
|
return item.label.toLowerCase().includes(query.toLowerCase()); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
optionss.value = [] |
|
|
|
|
} |
|
|
|
|
optionss.value = []; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 物料列表 |
|
|
|
|
const Wloptions = ref([]) |
|
|
|
|
const Wloptions = ref([]); |
|
|
|
|
// 物料信息搜索 |
|
|
|
|
const wLcheng = (val, info) => { |
|
|
|
|
console.log(val.undefined); |
|
|
|
|
console.log(info, '信息'); |
|
|
|
|
$_materialList({ |
|
|
|
|
name:val.undefined |
|
|
|
|
name: val.undefined, |
|
|
|
|
}).then(res => { |
|
|
|
|
console.log(res, '物料查询'); |
|
|
|
|
if (!res.data.data.records.length) { |
|
|
|
|
ElMessageBox.confirm('暂无数据是否新增?') |
|
|
|
|
.then(() => { |
|
|
|
|
TcDataaddition.value=true |
|
|
|
|
TcDataaddition.value = true; |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
// catch error |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// productCode |
|
|
|
|
// wLinputState.value=true;//开启下拉选择 |
|
|
|
@ -2115,17 +2134,14 @@ const wLcheng=(val,info)=>{
|
|
|
|
|
info.wLinputState = true; |
|
|
|
|
// Wloptions.value 下拉选择变量 |
|
|
|
|
res.data.data.records.forEach(item => { |
|
|
|
|
Wloptions.value.push( |
|
|
|
|
{ |
|
|
|
|
Wloptions.value.push({ |
|
|
|
|
label: item.name, |
|
|
|
|
value:item.name |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
value: item.name, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 盘点详情编辑 |
|
|
|
|
const InventoryEditing = val => { |
|
|
|
@ -2137,13 +2153,12 @@ const InventoryEditing = val => {
|
|
|
|
|
console.log(res); |
|
|
|
|
|
|
|
|
|
if (res.data.data.records) { |
|
|
|
|
list.value= res.data.data.records.map((item) => { |
|
|
|
|
return { value:`${item.id}`, label: `${item.qrCode}` } |
|
|
|
|
}) |
|
|
|
|
list.value = res.data.data.records.map(item => { |
|
|
|
|
return { value: `${item.id}`, label: `${item.qrCode}` }; |
|
|
|
|
}); |
|
|
|
|
console.log(list.value); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
counting.value = {}; //重置数据值对象 |
|
|
|
|
WrapBarEditing.value.radio = null; |
|
|
|
@ -2199,7 +2214,7 @@ const InformationEditing = () => {
|
|
|
|
|
let val = list.value.find(obj => obj.value == WrapBarEditing.value.groundingPositionCode); |
|
|
|
|
console.log(data, '货位处理好的数据'); |
|
|
|
|
data[0].groundingAllocationId = val.value; |
|
|
|
|
data[0].groundingPositionCode=val.label |
|
|
|
|
data[0].groundingPositionCode = val.label; |
|
|
|
|
} |
|
|
|
|
if (!TcStateSwitching.value) { |
|
|
|
|
//为假表示当前走定制品规则 |
|
|
|
@ -2252,12 +2267,15 @@ const InformationEditing = () => {
|
|
|
|
|
|
|
|
|
|
// 弹窗品类搜索 |
|
|
|
|
const TcChenge = (event, val) => { |
|
|
|
|
// 开始时间 startTime |
|
|
|
|
// 结束时间 EndTime |
|
|
|
|
event[0] |
|
|
|
|
console.log(event, val); |
|
|
|
|
TcPdloading.value = true; |
|
|
|
|
console.log(row.value, '必须参数'); |
|
|
|
|
console.log(row.value.questNum, 'questNum'); |
|
|
|
|
let quest=row.value.questNum |
|
|
|
|
let qstId=row.value.id |
|
|
|
|
let quest = row.value.questNum; |
|
|
|
|
let qstId = row.value.id; |
|
|
|
|
let data = { |
|
|
|
|
current: TccurrentPage.value, //页码 |
|
|
|
|
size: TcpageSize.value, //条数 |
|
|
|
@ -2265,15 +2283,22 @@ const TcChenge = (event, val) => {
|
|
|
|
|
questNum: quest, |
|
|
|
|
questId: qstId, |
|
|
|
|
}; |
|
|
|
|
data.startTime=event[0] |
|
|
|
|
data.EndTime=event[1] |
|
|
|
|
delete data.inventoryDate |
|
|
|
|
if ( DiskStatus.value) { |
|
|
|
|
data.questStatus = 1; |
|
|
|
|
}else{ |
|
|
|
|
data.questStatus = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(data, '要提交的数据'); |
|
|
|
|
|
|
|
|
|
$_getDetailInfo(data).then(res => { |
|
|
|
|
Tctotal.value = res.data.data.total; |
|
|
|
|
res.data.data.records.forEach(item => { |
|
|
|
|
item.Checkbox = true; |
|
|
|
|
item.wLinputState = false; |
|
|
|
|
item.Input=null |
|
|
|
|
item.Input = null; |
|
|
|
|
}); |
|
|
|
|
TcPdloading.value = false; |
|
|
|
|
console.log(res, '明细返回值'); |
|
|
|
@ -2351,7 +2376,8 @@ const Refresh = () => {
|
|
|
|
|
|
|
|
|
|
// 创建盘点任务 |
|
|
|
|
const InventoryTask = () => { |
|
|
|
|
formInventory.value={} |
|
|
|
|
formInventory.value = {}; |
|
|
|
|
formInventory.value.scname = []; |
|
|
|
|
let select = []; |
|
|
|
|
InventoryPopup.value = true; //开启创建盘点任务弹窗 |
|
|
|
|
getDictList().then(res => { |
|
|
|
@ -2407,6 +2433,7 @@ const InventorySubmit = () => {
|
|
|
|
|
// 创建提交表单 |
|
|
|
|
let SubData = {}; |
|
|
|
|
SubData.list = []; |
|
|
|
|
console.log(formInventory.value.scname, 'formInventory.value.scname.length'); |
|
|
|
|
if (!formInventory.value.scname.length && !formInventory.value.brandName) { |
|
|
|
|
// |
|
|
|
|
SubData.list = []; |
|
|
|
@ -2450,10 +2477,57 @@ const InventorySubmit = () => {
|
|
|
|
|
SubData.startTime = formInventory.value.time[0]; |
|
|
|
|
console.log(SubData, '处理好要提交的数据'); |
|
|
|
|
InventoryPopup.value = false; //关闭创建盘点任务弹窗 |
|
|
|
|
// postAddtaskQuest(SubData).then(res => { |
|
|
|
|
// console.log(res, '盘点计划提交成功'); |
|
|
|
|
// onLoad(); //体积之后初始化页面 |
|
|
|
|
// }); |
|
|
|
|
postAddtaskQuest(SubData).then(res => { |
|
|
|
|
console.log(res, '盘点计划提交成功'); |
|
|
|
|
onLoad(); //体积之后初始化页面 |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 顶部废弃按钮 |
|
|
|
|
const discard = () => { |
|
|
|
|
if (!BatchAbandonment.value.length) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择废弃盘点任务(可批量)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log('废弃按钮'); |
|
|
|
|
let ids = []; |
|
|
|
|
BatchAbandonment.value.forEach(item => { |
|
|
|
|
ids.push(item.id); |
|
|
|
|
}); |
|
|
|
|
ids = ids.join(','); |
|
|
|
|
ElMessageBox.confirm('是否废弃该盘点任务?') |
|
|
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
console.log(ids, '处理好的数据'); |
|
|
|
|
$_postBatchDelete({ ids }).then(res => { |
|
|
|
|
console.log(res, '删除成功'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '删除成功.', |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
IndexPd(); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
// catch error |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 顶部延期(延期只能单个延期) |
|
|
|
|
const DelayButton = () => { |
|
|
|
|
if (!HomepageDelay.value) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择需要延期的数据(单选操作)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log('延期'); |
|
|
|
|
dialogTabData.value = true; |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -2497,8 +2571,6 @@ const InventorySubmit = () => {
|
|
|
|
|
padding: 0 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.demo-pagination-block { |
|
|
|
|
flex: 1; |
|
|
|
|
display: flex; |
|
|
|
@ -2536,7 +2608,6 @@ const InventorySubmit = () => {
|
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-end; |
|
|
|
|
margin-top: 80px; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.Tcstate { |
|
|
|
@ -2614,9 +2685,20 @@ const InventorySubmit = () => {
|
|
|
|
|
} |
|
|
|
|
:deep(.el-input__wrapper) { |
|
|
|
|
height: 30px; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
:deep(.el-input__inner) { |
|
|
|
|
height: 100% !important; |
|
|
|
|
} |
|
|
|
|
.pdsj { |
|
|
|
|
:deep(.el-input__wrapper) { |
|
|
|
|
height: 30px !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.ElBtnClass { |
|
|
|
|
.el-button { |
|
|
|
|
padding: 0; |
|
|
|
|
border: none; |
|
|
|
|
background-color: transparent; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|