Commit 942407cf authored by hubaoshan's avatar hubaoshan

wcp

parent 6e124cce
...@@ -25,8 +25,14 @@ ...@@ -25,8 +25,14 @@
<span>{{ queryForm.endCount }}</span> <span>{{ queryForm.endCount }}</span>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item>
<template>
<span v-if="values" :class="valuePd">{{ values }}</span>
</template>
</el-form-item>
<el-form-item label="pallet" prop="pallet"> <el-form-item label="pallet" prop="pallet">
<el-input <el-input
ref="pallet"
v-model="queryForm.pallet" v-model="queryForm.pallet"
clearable clearable
placeholder="请输入pallet" placeholder="请输入pallet"
...@@ -44,7 +50,6 @@ ...@@ -44,7 +50,6 @@
@keyup.enter.native="handleEnd" @keyup.enter.native="handleEnd"
/> />
</el-form-item> </el-form-item>
<!-- <div><hr></div>-->
<div class="buttonRegion"> <div class="buttonRegion">
<el-button class="button_rowBtn" type="primary" @click="handleView">查看</el-button> <el-button class="button_rowBtn" type="primary" @click="handleView">查看</el-button>
<el-button style="float: right" class="button_rowBtn" type="primary" @click="handleDel">删除</el-button> <el-button style="float: right" class="button_rowBtn" type="primary" @click="handleDel">删除</el-button>
...@@ -59,27 +64,16 @@ ...@@ -59,27 +64,16 @@
{{ scope.row.orderId || '-' }} {{ scope.row.orderId || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="custCode" prop="custCode" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.custCode || '-' }}
</template>
</el-table-column>
<el-table-column label="packingList" prop="packingList" :show-overflow-tooltip="true"> <el-table-column label="packingList" prop="packingList" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.packingList || '-' }} {{ scope.row.packingList || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="quantity" prop="quantity" :show-overflow-tooltip="true"> <el-table-column label="quantity" prop="quantity" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.quantity || '-' }} {{ scope.row.quantity || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="pdCode" prop="pdCode" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.pdCode || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="subCode" prop="subCode" :show-overflow-tooltip="true"> <el-table-column label="subCode" prop="subCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.subCode || '-' }} {{ scope.row.subCode || '-' }}
...@@ -99,31 +93,34 @@ ...@@ -99,31 +93,34 @@
<div class="top"> <div class="top">
<div class="oneButtion"> <div class="oneButtion">
<el-button <el-button
id="primary_del"
ref="buttonAAAA" ref="buttonAAAA"
:class="selectedButton === 'AAAA' ? 'button_rowBtn_action' : ''" :class="selectedButton === 'AAAA' ? 'button_rowBtn_action' : ''"
type="primary"
@click="handleButton('AAAA')" @click="handleButton('AAAA')"
> >
<div class="buttionText"> <div class="buttionText">
<span>AAAA</span> <span>AAAA</span>
<span v-if="totalA" style="color: red">({{ totalA }})</span>
</div> </div>
</el-button> </el-button>
<el-button <el-button
id="primary_del"
:class="selectedButton === 'BBBB' ? 'button_rowBtn_action' : ''" :class="selectedButton === 'BBBB' ? 'button_rowBtn_action' : ''"
type="primary"
@click="handleButton('BBBB')" @click="handleButton('BBBB')"
> >
<div class="buttionText"> <div class="buttionText">
<span>BBBB</span> <span>BBBB</span>
<span v-if="totalB" style="color: red">({{ totalB }})</span>
</div> </div>
</el-button> </el-button>
<el-button <el-button
id="primary_del"
:class="selectedButton === 'CCCC' ? 'button_rowBtn_action' : ''" :class="selectedButton === 'CCCC' ? 'button_rowBtn_action' : ''"
type="primary"
@click="handleButton('CCCC')" @click="handleButton('CCCC')"
> >
<div class="buttionText"> <div class="buttionText">
<span>CCCC</span> <span>CCCC</span>
<span v-if="totalC" style="color: red">({{ totalC }})</span>
</div> </div>
</el-button> </el-button>
</div> </div>
...@@ -131,7 +128,7 @@ ...@@ -131,7 +128,7 @@
<br> <br>
<!-- 确认删除按钮 --> <!-- 确认删除按钮 -->
<div class="clearRegion"> <div class="clearRegion">
<el-button class="button_rowBtn" type="primary" @click="deletePd">删除</el-button> <el-button class="button_rowBtn_del" type="primary" @click="deletePd">删除</el-button>
</div> </div>
<br> <br>
<el-table v-loading="loading" class="queryTable" border :data="queryPdDel.PdDelList" :row-class-name="rowClassName"> <el-table v-loading="loading" class="queryTable" border :data="queryPdDel.PdDelList" :row-class-name="rowClassName">
...@@ -232,9 +229,9 @@ ...@@ -232,9 +229,9 @@
v-show="total>0" v-show="total>0"
class="page" class="page"
:total="total" :total="total"
:page.sync="queryPd.page" :page.sync="queryPdDel.page"
:limit.sync="queryPd.rows" :limit.sync="queryPdDel.rows"
@pagination="handleView" @pagination="handlePa"
/> />
</el-dialog> </el-dialog>
</div> </div>
...@@ -246,6 +243,7 @@ export default { ...@@ -246,6 +243,7 @@ export default {
name: 'Inventory', name: 'Inventory',
data() { data() {
return { return {
valuePd: 'bacc-red',
selectedButton: '', selectedButton: '',
loading: false, loading: false,
queryPd: { queryPd: {
...@@ -260,6 +258,9 @@ export default { ...@@ -260,6 +258,9 @@ export default {
}, },
Pdtotal: undefined, Pdtotal: undefined,
total: undefined, total: undefined,
totalA: undefined,
totalB: undefined,
totalC: undefined,
open: false, open: false,
openDel: false, openDel: false,
title: '', title: '',
...@@ -270,6 +271,7 @@ export default { ...@@ -270,6 +271,7 @@ export default {
endCount: '', endCount: '',
totalCount: '' totalCount: ''
}, },
values: '',
userIdNew: '', userIdNew: '',
// 表单校验 // 表单校验
rules: { rules: {
...@@ -297,6 +299,10 @@ export default { ...@@ -297,6 +299,10 @@ export default {
this.open = true this.open = true
}) })
}) })
if (this.open === false) {
this.queryPd.page = 1
this.Pdtotal = ''
}
}, },
handleDel() { handleDel() {
this.selectedButton = 'AAAA' this.selectedButton = 'AAAA'
...@@ -305,35 +311,43 @@ export default { ...@@ -305,35 +311,43 @@ export default {
businessId: response.data.user.businessId, businessId: response.data.user.businessId,
page: this.queryPd.page, page: this.queryPd.page,
rows: this.queryPd.rows, rows: this.queryPd.rows,
pallet: '' pallet: 'AAAA'
}
switch (this.selectedButton) {
case 'AAAA':
queryParams.pallet = 'AAAA'
break
case 'BBBB':
queryParams.pallet = 'BBBB'
break
case 'CCCC':
queryParams.pallet = 'CCCC'
break
} }
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
this.totalA = response.data.total
this.title = '删除' this.title = '删除'
this.openDel = true this.openDel = true
if (this.openDel === false) {
this.selectedButton = ''
}
}) })
}) })
this.getList() this.getList()
}, },
handlePa() {
getInfo().then(response => {
const queryParams = {
businessId: response.data.user.businessId,
page: this.queryPdDel.page,
rows: this.queryPdDel.rows,
pallet: this.selectedButton
}
getDelList(queryParams).then(response => {
this.queryPdDel.PdDelList = response.data.records
this.total = response.data.total
})
})
this.queryPdDel.PdDelList = []
},
handleButton(buttonName) { handleButton(buttonName) {
this.selectedButton = buttonName this.selectedButton = buttonName
getInfo().then(response => { getInfo().then(response => {
const queryParams = { const queryParams = {
businessId: response.data.user.businessId, businessId: response.data.user.businessId,
page: this.queryPd.page, page: this.queryPdDel.page,
rows: this.queryPd.rows, rows: this.queryPdDel.rows,
pallet: '' pallet: ''
} }
switch (this.selectedButton) { switch (this.selectedButton) {
...@@ -350,10 +364,20 @@ export default { ...@@ -350,10 +364,20 @@ export default {
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
if (queryParams.pallet === 'AAAA') {
this.totalA = response.data.total
} else if (queryParams.pallet === 'BBBB') {
this.totalB = response.data.total
} else if (queryParams.pallet === 'CCCC') {
this.totalC = response.data.total
}
}) })
}) })
this.getList() this.getList()
this.queryPdDel.PdDelList = [] this.queryPdDel.PdDelList = []
this.totalA = ''
this.totalB = ''
this.totalC = ''
}, },
getList() { getList() {
getInfo().then(response => { getInfo().then(response => {
...@@ -373,28 +397,27 @@ export default { ...@@ -373,28 +397,27 @@ export default {
this.$refs.input1.focus() this.$refs.input1.focus()
}) })
}, },
movePallet() {
this.$nextTick().then(() => {
this.$refs.pallet.focus()
})
},
handleEnd() { handleEnd() {
const data = { this.values = this.queryForm.value
pdCode: this.queryForm.value, const values = this.queryForm.value.split('-')
const obj = {
packingList: values[0],
subCode: values[1],
userId: this.userIdNew, userId: this.userIdNew,
pdCode: this.queryForm.orderSn,
pallet: this.queryForm.pallet pallet: this.queryForm.pallet
} }
if (this.queryForm.orderSn !== this.queryForm.value) { updatePd(obj).then(res => {
this.$message.error({ this.valuePd = res.code === 200 ? 'bacc-green' : ''
message: 'orderSn' + this.queryForm.orderSn + '和' + this.queryForm.value + '不相等',
duration: 2000
}) })
} else {
updatePd(data)
this.queryForm.pallet = ''
this.queryForm.value = '' this.queryForm.value = ''
}
this.getList() this.getList()
}, },
// this.$message.success({
// message: '盘点完成',
// duration: 2000
// })
deletePd() { deletePd() {
getInfo().then(response => { getInfo().then(response => {
const queryParams = { const queryParams = {
...@@ -414,12 +437,25 @@ export default { ...@@ -414,12 +437,25 @@ export default {
queryParams.pallet = 'CCCC' queryParams.pallet = 'CCCC'
break break
} }
delPd(queryParams) this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return delPd(queryParams)
}).then(() => {
this.getList()
this.$message({
message: '删除成功',
type: 'success'
})
}).catch(function() {
})
}) })
this.handleDel() this.handleDel()
}, },
rowClassName({ row }) { rowClassName({ row }) {
return row.status === '1' ? 'orange-row' : '' return row.status === '2' ? 'orange-row' : ''
} }
} }
} }
...@@ -427,7 +463,7 @@ export default { ...@@ -427,7 +463,7 @@ export default {
<style scoped> <style scoped>
.pagination{ .pagination{
width: 100px; width: 350px!important;
} }
.top{ .top{
position: relative; position: relative;
...@@ -436,7 +472,7 @@ export default { ...@@ -436,7 +472,7 @@ export default {
} }
.clearRegion{ .clearRegion{
position: relative; position: relative;
left: 100px; left: 150px;
width: 150px; width: 150px;
} }
.queryTable{ .queryTable{
...@@ -448,7 +484,9 @@ export default { ...@@ -448,7 +484,9 @@ export default {
position: relative; position: relative;
bottom: initial; bottom: initial;
} }
.oneButtion{
width: 300px;
}
.buttonRegion { .buttonRegion {
margin-top: 20px; margin-top: 20px;
justify-content: space-between justify-content: space-between
...@@ -457,10 +495,25 @@ export default { ...@@ -457,10 +495,25 @@ export default {
font-size: 17px; font-size: 17px;
width: 120px; width: 120px;
} }
.button_rowBtn_del {
font-size: 17px;
width: 80px;
}
.button_rowBtn_action{ .button_rowBtn_action{
background-color: blue !important; background-color: #46bcf3 !important;
}
#primary_del{
color: black;
background-color: #ecf9fe;
border-color:#46bcf3;
} }
::v-deep .el-table .orange-row { ::v-deep .el-table .orange-row {
background-color: red !important; background-color: #abfaff !important;
}
.bacc-green{
color: green;
}
.bacc-red{
color: red;
} }
</style> </style>
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
// 处理 // 盘点
handleDispose(item) { handleDispose(item) {
this.$router.push({ this.$router.push({
path: '/setup/inventory', path: '/setup/inventory',
......
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