Commit 942407cf authored by hubaoshan's avatar hubaoshan

wcp

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