Browse Source

档案盘点 搜索

master
x_ying 3 years ago
parent
commit
e889ef7546
  1. 58
      src/views/archivesManage/archivesCheck/index.vue
  2. 5
      src/views/archivesManage/archivesCheck/module/addCheck.vue

58
src/views/archivesManage/archivesCheck/index.vue

@ -12,7 +12,7 @@
>删除</el-button>
<el-button size="mini" icon="el-icon-tickets" :disabled="!(selections.length===1 && selections[0].checkState === 1) " @click="handleCalc">结算</el-button>
<el-button :loading="btnLoading" size="mini" :disabled="!(selections.length ===1)" icon="el-icon-download" @click="handleExport">导出</el-button>
<el-select v-model="stateVal" class="filter-item" style="width: 90px;height:30px;margin:0 10px 0 10px">
<el-select v-model="stateVal" class="filter-item" style="width: 90px;height:30px;margin:0 10px 0 10px" @change="crud.toQuery">
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input
@ -154,15 +154,15 @@ export default {
keyWord: '',
stateVal: 0,
stateOptions: [
{ value: 0, label: '全部' },
{ value: 1, label: '待执行' },
{ value: 2, label: '执行中' },
{ value: 3, label: '已执行' }
{ value: -1, label: '全部' },
{ value: 0, label: '待执行' },
{ value: 1, label: '执行中' },
{ value: 2, label: '已执行' }
],
cateSearch: 1,
cateSearch: 'region',
cateSearchOptions: [
{ value: 1, label: '区域' },
{ value: 2, label: '盘点单号' }
{ value: 'region', label: '区域' },
{ value: 'id', label: '盘点单号' }
],
deleteVisible: false,
source: null
@ -173,16 +173,24 @@ export default {
'baseApi'
])
},
created() {
this.getData()
},
methods: {
getData() {
console.log(this.crud, '--crud')
//
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.checkState = null
this.crud.query.id = null
this.crud.query.region = null
if (this.stateVal > -1) {
this.crud.query.checkState = this.stateVal
}
// todo
if (this.cateSearch === 'region') {
this.crud.query.region = this.keyWord
} else if (this.searchVal === 'id') {
this.crud.query.id = this.keyWord
}
},
//
handleDel() {
console.log(this.selections)
const bool = this.selections.every(item => item.checkState === 0)
if (bool) {
this.deleteVisible = true
@ -195,9 +203,7 @@ export default {
},
handleDelConfirm() {
const ids = this.selections.map(item => { return item.id })
console.log(ids)
checkDel(ids).then(res => {
console.log(res, '删除成功')
if (res) {
this.crud.refresh()
this.$message({
@ -212,16 +218,13 @@ export default {
},
//
handleCalc() {
console.log(this.selections)
const calcDom = this.$refs.calcDom
calcDom.calcVisible = true
calcDom.stepActive = 2
const params = {
'orderId': this.selections[0].id
}
console.log(params, '--params')
settlement(params).then(res => {
console.log(res, '结算成功')
if (res) {
calcDom.stepActive = 3
calcDom.res = 1
@ -268,43 +271,26 @@ export default {
},
//
handleDbClick(row) {
// this.$refs.table.clearSelection()
// console.log(row.id)
const checkDetailDom = this.$refs.checkDetailDom
const params = {
orderNo: row.id
}
getArrange(params).then(res => {
console.log(res, 'res')
checkDetailDom.rowData.push(res)
console.log(checkDetailDom.rowData, '盘点单信息')
})
getArrangeDetailes(params).then(res => {
console.log(res, '盘点单详细信息')
checkDetailDom.tableData = res.content
})
checkDetailDom.detailVisible = true
// const arr = data1.rows.filter(item => item.checkNum === row.checkNum)
// checkDetailDom.tableData = arr
//
// if (row.checkState === '') {
// checkDetailDom.classLend = 'have-clear'
// } else if (row.checkState === '') {
// checkDetailDom.classLend = 'fail-clear'
// } else if (row.checkState === '') {
// checkDetailDom.classLend = 'no-clear'
// }
},
//
handleExport() {
this.btnLoading = true
// console.log(this.selections, '')
const id = this.selections[0].id
const params = {
'orderNo': id
}
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false }))
console.log(params)
this.btnLoading = false
}

5
src/views/archivesManage/archivesCheck/module/addCheck.vue

@ -200,10 +200,8 @@ export default {
},
handleSave() {
const params = this.getParams()
console.log(params, '---')
//
addArrange(params).then(res => {
console.log(res, '新增成功')
// this.tableData = res.detaills
if (res) {
this.crud.refresh()
@ -245,14 +243,12 @@ export default {
'deviceIds': deviceIds,
'region': region
}
// console.log(params)
return params
}
},
//
doPreArrange(params) {
previewArrange(params).then(res => {
console.log(res, '---预盘点')
this.tableData = res.content
this.page.total = res.totalElements
})
@ -277,7 +273,6 @@ export default {
},
//
selectChange(val) {
// console.log(val)
const allCategory = JSON.parse(JSON.stringify(this.allCategory))
if (val[val.length - 1] === 0) { //
this.categoryValue = allCategory

Loading…
Cancel
Save