Commit 13aefdbb authored by hubaoshan's avatar hubaoshan

wcp

parent 5db4c0ce
......@@ -90,77 +90,88 @@
<el-dialog class="pdDel" :title="title" :visible.sync="openDel" width="1300px" append-to-body @close="handleDialogClose">
<div class="top">
<div class="oneButtion">
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === '无' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('无')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>无</span>-->
<!-- <span style="color: red">({{ total0 }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- ref="buttonAAAA"-->
<!-- :class="selectedButton === 'A' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('A')"-->
<!-- >-->
<!-- <div class="buttonText">-->
<!-- <span>A</span>-->
<!-- <span style="color: red">({{ totalA }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === 'B' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('B')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>B</span>-->
<!-- <span style="color: red">({{ totalB }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === 'C' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('C')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>C</span>-->
<!-- <span style="color: red">({{ totalC }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === 'D' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('D')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>D</span>-->
<!-- <span style="color: red">({{ totalD }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === 'E' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('E')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>E</span>-->
<!-- <span style="color: red">({{ totalE }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- id="primary_del"-->
<!-- :class="selectedButton === 'F' ? 'button_rowBtn_action' : ''"-->
<!-- @click="handleButton('F')"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>F</span>-->
<!-- <span style="color: red">({{ totalF }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<div class="button-container">
<el-button
id="primary_del"
:class="selectedButton === '无' ? 'button_rowBtn_action' : ''"
@click="handleButton('无')"
>
<div class="buttionText">
<span></span>
<span style="color: red">({{ total0 }})</span>
</div>
</el-button>
<el-button
id="primary_del"
ref="buttonAAAA"
:class="selectedButton === 'A' ? 'button_rowBtn_action' : ''"
@click="handleButton('A')"
>
<div class="buttionText">
<span>A</span>
<span style="color: red">({{ totalA }})</span>
</div>
</el-button>
<el-button
id="primary_del"
:class="selectedButton === 'B' ? 'button_rowBtn_action' : ''"
@click="handleButton('B')"
>
<div class="buttionText">
<span>B</span>
<span style="color: red">({{ totalB }})</span>
</div>
</el-button>
<el-button
id="primary_del"
:class="selectedButton === 'C' ? 'button_rowBtn_action' : ''"
@click="handleButton('C')"
>
<div class="buttionText">
<span>C</span>
<span style="color: red">({{ totalC }})</span>
</div>
</el-button>
<el-button
id="primary_del"
:class="selectedButton === 'D' ? 'button_rowBtn_action' : ''"
@click="handleButton('D')"
>
<div class="buttionText">
<span>D</span>
<span style="color: red">({{ totalD }})</span>
</div>
</el-button>
<el-button
id="primary_del"
:class="selectedButton === 'E' ? 'button_rowBtn_action' : ''"
@click="handleButton('E')"
v-for="item in palletList"
:key="item.dictValue"
:type="buttonLable(pallet) === item.dictLabel ? 'primary' : 'default'"
style="width: 60px;margin-bottom: 10px;margin-left: 10px"
@click="handleButtonNew(item.dictLabel)"
>
<div class="buttionText">
<span>E</span>
<span style="color: red">({{ totalE }})</span>
</div>
{{ item.dictLabel }}<span style="color: red">({{ totalPd[item.dictValue] }})</span>
</el-button>
<el-button
id="primary_del"
:class="selectedButton === 'F' ? 'button_rowBtn_action' : ''"
@click="handleButton('F')"
>
<div class="buttionText">
<span>F</span>
<span style="color: red">({{ totalF }})</span>
</div>
</el-button>
</div>
</div>
<br>
......@@ -233,6 +244,7 @@ export default {
dialogVisible: false,
pallet: '0',
palletList: [],
totalPd: [],
listA: [],
listB: [],
listC: [],
......@@ -343,76 +355,22 @@ export default {
rows: this.queryPd.rows,
pallet: ''
}
const count = [0, 1, 2, 3, 4, 5, 6]
for (let i = 0; i < count.length; i++) {
const item = count[i]
for (let i = 0; i < this.palletList.length; i++) {
const item = this.palletList[i].dictValue
queryParams.pallet = item
await getDelList(queryParams).then(response => {
switch (item) {
case 0:
this.listZero.push(response.data.records)
this.total0 = Number(response.data.total)
break
case 1:
this.listA.push(response.data.records)
this.totalA = Number(response.data.total)
break
case 2:
this.listB.push(response.data.records)
this.totalB = Number(response.data.total)
break
case 3:
this.listC.push(response.data.records)
this.totalC = Number(response.data.total)
break
case 4:
this.listD.push(response.data.records)
this.totalD = Number(response.data.total)
break
case 5:
this.listE.push(response.data.records)
this.totalE = Number(response.data.total)
break
case 6:
this.listF.push(response.data.records)
this.totalF = Number(response.data.total)
break
}
this.totalPd[item] = Number(response.data.total)
if (Number(response.data.total) > 0) {
if (!this.selectedButton) {
this.selectedButton = String(this.buttonLable(item))
this.queryPdDel.PdDelList = response.data.records
} else if (this.selectedButton) {
return this.selectedButton
}
}
})
}
switch (this.selectedButton) {
case '无':
this.queryPdDel.PdDelList = this.listZero[0]
break
case 'A':
this.queryPdDel.PdDelList = this.listA[0]
break
case 'B':
this.queryPdDel.PdDelList = this.listB[0]
break
case 'C':
this.queryPdDel.PdDelList = this.listC[0]
break
case 'D':
this.queryPdDel.PdDelList = this.listD[0]
break
case 'E':
this.queryPdDel.PdDelList = this.listE[0]
break
case 'F':
this.queryPdDel.PdDelList = this.listF[0]
break
default:
this.queryPdDel.PdDelList = []
break
}
this.title = '删除'
this.openDel = true
},
......@@ -440,8 +398,7 @@ export default {
})
})
},
handleButton(buttonName) {
console.log('buttonName', buttonName)
handleButtonNew(buttonName) {
this.selectedButton = buttonName
const queryParams = {
businessId: this.userNew,
......@@ -449,27 +406,42 @@ export default {
rows: this.queryPdDel.rows,
pallet: ''
}
queryParams.pallet = this.buttonValue(buttonName)
queryParams.pallet = this.buttonValue(this.selectedButton)
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total
if (queryParams.pallet === '0') {
this.total0 = response.data.total
} else if (queryParams.pallet === '1') {
this.totalA = response.data.total
} else if (queryParams.pallet === '2') {
this.totalB = response.data.total
} else if (queryParams.pallet === '3') {
this.totalC = response.data.total
} else if (queryParams.pallet === '4') {
this.totalD = response.data.total
} else if (queryParams.pallet === '5') {
this.totalE = response.data.total
} else if (queryParams.pallet === '6') {
this.totalF = response.data.total
}
this.totalPd[queryParams.pallet] = response.data.total
})
},
// handleButton1(buttonName) {
// console.log('buttonName', buttonName)
// this.selectedButton = buttonName
// const queryParams = {
// businessId: this.userNew,
// page: this.queryPdDel.page,
// rows: this.queryPdDel.rows,
// pallet: ''
// }
// queryParams.pallet = this.buttonValue(buttonName)
// getDelList(queryParams).then(response => {
// this.queryPdDel.PdDelList = response.data.records
// this.total = response.data.total
// if (queryParams.pallet === '0') {
// this.total0 = response.data.total
// } else if (queryParams.pallet === '1') {
// this.totalA = response.data.total
// } else if (queryParams.pallet === '2') {
// this.totalB = response.data.total
// } else if (queryParams.pallet === '3') {
// this.totalC = response.data.total
// } else if (queryParams.pallet === '4') {
// this.totalD = response.data.total
// } else if (queryParams.pallet === '5') {
// this.totalE = response.data.total
// } else if (queryParams.pallet === '6') {
// this.totalF = response.data.total
// }
// })
// },
getList() {
getInfo().then(response => {
const data = {
......
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