From 7b68850e07220c1be5982a47963e9a907adc0703 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Tue, 28 Nov 2023 10:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checkInventoryTask/createTask.vue | 294 +++++++++++------- 1 file changed, 180 insertions(+), 114 deletions(-) diff --git a/src/views/distribution/checkInventoryTask/createTask.vue b/src/views/distribution/checkInventoryTask/createTask.vue index 3ab59402..1761db8b 100644 --- a/src/views/distribution/checkInventoryTask/createTask.vue +++ b/src/views/distribution/checkInventoryTask/createTask.vue @@ -239,7 +239,7 @@ @@ -288,7 +288,7 @@ }} - + + + + + + + + +
@@ -602,7 +621,6 @@ width: 宽度 prop: 数据字段 --> - { 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, '明细返回值');