Commit 5d974337 authored by hubaoshan's avatar hubaoshan

wcp

parent 5736583e
...@@ -267,6 +267,7 @@ export default { ...@@ -267,6 +267,7 @@ export default {
return item ? item.dictValue : '' return item ? item.dictValue : ''
}, },
async handleDel() { async handleDel() {
this.queryPdDel.page = 1
const queryParams = { const queryParams = {
businessId: this.userNew, businessId: this.userNew,
page: this.queryPdDel.page, page: this.queryPdDel.page,
...@@ -277,22 +278,19 @@ export default { ...@@ -277,22 +278,19 @@ export default {
getDelListCount(queryParams).then(response => { getDelListCount(queryParams).then(response => {
for (let i = 0; i < this.palletList.length; i++) { for (let i = 0; i < this.palletList.length; i++) {
const item = this.palletList[i].dictValue const item = this.palletList[i].dictValue
console.log(item, 'item') const data = this.palletList[i].dictLabel
for (let j = 0; j < response.data.length; j++) { for (let j = 0; j < response.data.length; j++) {
if (item === response.data[j].pallet) { if (item === response.data[j].pallet) {
this.totalPd[item] = Number(response.data[j].count) this.totalPd[item] = Number(response.data[j].count)
console.log('Number(response.data[j].count)', Number(response.data[j].count))
if (Number(response.data[j].count) > 0) { if (Number(response.data[j].count) > 0) {
if (this.palletDel === '') { if (this.palletDel === '') {
this.selectedButton = item this.selectedButton = data
this.palletDel = Number(item) this.palletDel = Number(item)
queryParams.pallet = response.data[j].pallet queryParams.pallet = response.data[j].pallet
getDelList(queryParams).then(response => { getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total this.total = response.data.total
}) })
} else if (this.palletDel !== '') {
return this.palletDel
} }
} }
} }
...@@ -312,7 +310,8 @@ export default { ...@@ -312,7 +310,8 @@ export default {
businessId: response.data.user.businessId, businessId: response.data.user.businessId,
page: this.queryPdDel.page, page: this.queryPdDel.page,
rows: this.queryPdDel.rows, rows: this.queryPdDel.rows,
pallet: this.selectedButton orderSn: this.moveSn,
pallet: this.buttonValue(this.selectedButton)
} }
getDelList(queryParams).then(response => { getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records this.queryPdDel.PdDelList = response.data.records
...@@ -323,6 +322,7 @@ export default { ...@@ -323,6 +322,7 @@ export default {
handleButtonNew(buttonName) { handleButtonNew(buttonName) {
this.selectedButton = buttonName this.selectedButton = buttonName
this.palletDel = this.buttonValue(buttonName) this.palletDel = this.buttonValue(buttonName)
this.queryPdDel.page = 1
const queryParams = { const queryParams = {
businessId: this.userNew, businessId: this.userNew,
page: this.queryPdDel.page, page: this.queryPdDel.page,
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
orderSn: this.moveSn, orderSn: this.moveSn,
pallet: '' pallet: ''
} }
queryParams.pallet = this.selectedButton queryParams.pallet = this.buttonValue(this.selectedButton)
this.$confirm('是否确认操作?', '提示', { this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment