Commit c2170953 authored by hubaoshan's avatar hubaoshan

wcp

parent 5b5a34c4
......@@ -40,6 +40,14 @@ export function getDelList(query) {
})
}
export function getDelListCount(query) {
return request({
url: '/wcporderlistpd/getDelListCount',
method: 'get',
params: query
})
}
export function delPd(data) {
return request({
url: '/wcporderlistpd/delPd',
......
......@@ -90,77 +90,6 @@
<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
v-for="item in palletListDel"
......@@ -235,7 +164,7 @@
</template>
<script>
import { getInfo } from '@/api/login'
import { delPd, getDelList, getDicts, getPdList, getViewList, updatePd } from '@/api/materialInventory'
import { delPd, getDelList, getDelListCount, getDicts, getPdList, getViewList, updatePd } from '@/api/materialInventory'
export default {
name: 'Inventory',
......@@ -340,29 +269,42 @@ export default {
async handleDel() {
const queryParams = {
businessId: this.userNew,
page: this.queryPd.page,
rows: this.queryPd.rows,
page: this.queryPdDel.page,
rows: this.queryPdDel.rows,
orderSn: this.moveSn,
pallet: ''
}
for (let i = 0; i < this.palletList.length; i++) {
const item = this.palletList[i].dictValue
queryParams.pallet = item
await getDelList(queryParams).then(response => {
this.totalPd[item] = Number(response.data.total)
if (Number(response.data.total) > 0) {
if (!this.palletDel) {
this.selectedButton = item
this.palletDel = Number(item)
this.queryPdDel.PdDelList = response.data.records
} else if (this.palletDel) {
return this.palletDel
getDelListCount(queryParams).then(response => {
for (let i = 0; i < this.palletList.length; i++) {
const item = this.palletList[i].dictValue
console.log(item, 'item')
for (let j = 0; j < response.data.length; j++) {
if (item === response.data[j].pallet) {
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 (this.palletDel === '') {
this.selectedButton = item
this.palletDel = Number(item)
queryParams.pallet = response.data[j].pallet
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total
})
} else if (this.palletDel !== '') {
return this.palletDel
}
}
}
}
})
this.title = '删除'
this.openDel = true
}
})
if (this.openDel === false) {
this.palletDel = ''
this.queryPdDel.PdDelList = []
}
this.title = '删除'
this.openDel = true
},
handlePa() {
getInfo().then(response => {
......@@ -392,6 +334,7 @@ export default {
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.totalPd[queryParams.pallet] = response.data.total
this.total = response.data.total
})
},
getList() {
......@@ -460,7 +403,7 @@ export default {
this.queryPdDel.PdDelList = []
this.openDel = false
this.getList()
// this.handleDel()
this.totalPd = []
this.move()
})
},
......
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