Commit c2170953 authored by hubaoshan's avatar hubaoshan

wcp

parent 5b5a34c4
...@@ -40,6 +40,14 @@ export function getDelList(query) { ...@@ -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) { export function delPd(data) {
return request({ return request({
url: '/wcporderlistpd/delPd', url: '/wcporderlistpd/delPd',
......
...@@ -90,77 +90,6 @@ ...@@ -90,77 +90,6 @@
<el-dialog class="pdDel" :title="title" :visible.sync="openDel" width="1300px" append-to-body @close="handleDialogClose"> <el-dialog class="pdDel" :title="title" :visible.sync="openDel" width="1300px" append-to-body @close="handleDialogClose">
<div class="top"> <div class="top">
<div class="oneButtion"> <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"> <div class="button-container">
<el-button <el-button
v-for="item in palletListDel" v-for="item in palletListDel"
...@@ -235,7 +164,7 @@ ...@@ -235,7 +164,7 @@
</template> </template>
<script> <script>
import { getInfo } from '@/api/login' 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 { export default {
name: 'Inventory', name: 'Inventory',
...@@ -340,29 +269,42 @@ export default { ...@@ -340,29 +269,42 @@ export default {
async handleDel() { async handleDel() {
const queryParams = { const queryParams = {
businessId: this.userNew, businessId: this.userNew,
page: this.queryPd.page, page: this.queryPdDel.page,
rows: this.queryPd.rows, rows: this.queryPdDel.rows,
orderSn: this.moveSn, orderSn: this.moveSn,
pallet: '' pallet: ''
} }
for (let i = 0; i < this.palletList.length; i++) { getDelListCount(queryParams).then(response => {
const item = this.palletList[i].dictValue for (let i = 0; i < this.palletList.length; i++) {
queryParams.pallet = item const item = this.palletList[i].dictValue
await getDelList(queryParams).then(response => { console.log(item, 'item')
this.totalPd[item] = Number(response.data.total) for (let j = 0; j < response.data.length; j++) {
if (Number(response.data.total) > 0) { if (item === response.data[j].pallet) {
if (!this.palletDel) { this.totalPd[item] = Number(response.data[j].count)
this.selectedButton = item console.log('Number(response.data[j].count)', Number(response.data[j].count))
this.palletDel = Number(item) if (Number(response.data[j].count) > 0) {
this.queryPdDel.PdDelList = response.data.records if (this.palletDel === '') {
} else if (this.palletDel) { this.selectedButton = item
return this.palletDel 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() { handlePa() {
getInfo().then(response => { getInfo().then(response => {
...@@ -392,6 +334,7 @@ export default { ...@@ -392,6 +334,7 @@ export default {
getDelList(queryParams).then(response => { getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records this.queryPdDel.PdDelList = response.data.records
this.totalPd[queryParams.pallet] = response.data.total this.totalPd[queryParams.pallet] = response.data.total
this.total = response.data.total
}) })
}, },
getList() { getList() {
...@@ -460,7 +403,7 @@ export default { ...@@ -460,7 +403,7 @@ export default {
this.queryPdDel.PdDelList = [] this.queryPdDel.PdDelList = []
this.openDel = false this.openDel = false
this.getList() this.getList()
// this.handleDel() this.totalPd = []
this.move() 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