|
@ -12,7 +12,7 @@ |
|
|
>删除</el-button> |
|
|
>删除</el-button> |
|
|
<el-button size="mini" icon="el-icon-tickets" :disabled="!(selections.length===1 && selections[0].checkState === 1) " @click="handleCalc">结算</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-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-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-input |
|
|
<el-input |
|
@ -154,15 +154,15 @@ export default { |
|
|
keyWord: '', |
|
|
keyWord: '', |
|
|
stateVal: 0, |
|
|
stateVal: 0, |
|
|
stateOptions: [ |
|
|
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: [ |
|
|
cateSearchOptions: [ |
|
|
{ value: 1, label: '区域' }, |
|
|
|
|
|
{ value: 2, label: '盘点单号' } |
|
|
|
|
|
|
|
|
{ value: 'region', label: '区域' }, |
|
|
|
|
|
{ value: 'id', label: '盘点单号' } |
|
|
], |
|
|
], |
|
|
deleteVisible: false, |
|
|
deleteVisible: false, |
|
|
source: null |
|
|
source: null |
|
@ -173,16 +173,24 @@ export default { |
|
|
'baseApi' |
|
|
'baseApi' |
|
|
]) |
|
|
]) |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
|
|
|
this.getData() |
|
|
|
|
|
}, |
|
|
|
|
|
methods: { |
|
|
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() { |
|
|
handleDel() { |
|
|
console.log(this.selections) |
|
|
|
|
|
const bool = this.selections.every(item => item.checkState === 0) |
|
|
const bool = this.selections.every(item => item.checkState === 0) |
|
|
if (bool) { |
|
|
if (bool) { |
|
|
this.deleteVisible = true |
|
|
this.deleteVisible = true |
|
@ -195,9 +203,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleDelConfirm() { |
|
|
handleDelConfirm() { |
|
|
const ids = this.selections.map(item => { return item.id }) |
|
|
const ids = this.selections.map(item => { return item.id }) |
|
|
console.log(ids) |
|
|
|
|
|
checkDel(ids).then(res => { |
|
|
checkDel(ids).then(res => { |
|
|
console.log(res, '删除成功') |
|
|
|
|
|
if (res) { |
|
|
if (res) { |
|
|
this.crud.refresh() |
|
|
this.crud.refresh() |
|
|
this.$message({ |
|
|
this.$message({ |
|
@ -212,16 +218,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 结算 |
|
|
// 结算 |
|
|
handleCalc() { |
|
|
handleCalc() { |
|
|
console.log(this.selections) |
|
|
|
|
|
const calcDom = this.$refs.calcDom |
|
|
const calcDom = this.$refs.calcDom |
|
|
calcDom.calcVisible = true |
|
|
calcDom.calcVisible = true |
|
|
calcDom.stepActive = 2 |
|
|
calcDom.stepActive = 2 |
|
|
const params = { |
|
|
const params = { |
|
|
'orderId': this.selections[0].id |
|
|
'orderId': this.selections[0].id |
|
|
} |
|
|
} |
|
|
console.log(params, '--params') |
|
|
|
|
|
settlement(params).then(res => { |
|
|
settlement(params).then(res => { |
|
|
console.log(res, '结算成功') |
|
|
|
|
|
if (res) { |
|
|
if (res) { |
|
|
calcDom.stepActive = 3 |
|
|
calcDom.stepActive = 3 |
|
|
calcDom.res = 1 |
|
|
calcDom.res = 1 |
|
@ -268,43 +271,26 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 双击详情 |
|
|
// 双击详情 |
|
|
handleDbClick(row) { |
|
|
handleDbClick(row) { |
|
|
// this.$refs.table.clearSelection() |
|
|
|
|
|
// console.log(row.id) |
|
|
|
|
|
const checkDetailDom = this.$refs.checkDetailDom |
|
|
const checkDetailDom = this.$refs.checkDetailDom |
|
|
const params = { |
|
|
const params = { |
|
|
orderNo: row.id |
|
|
orderNo: row.id |
|
|
} |
|
|
} |
|
|
getArrange(params).then(res => { |
|
|
getArrange(params).then(res => { |
|
|
console.log(res, 'res') |
|
|
|
|
|
checkDetailDom.rowData.push(res) |
|
|
checkDetailDom.rowData.push(res) |
|
|
console.log(checkDetailDom.rowData, '盘点单信息') |
|
|
|
|
|
}) |
|
|
}) |
|
|
getArrangeDetailes(params).then(res => { |
|
|
getArrangeDetailes(params).then(res => { |
|
|
console.log(res, '盘点单详细信息') |
|
|
|
|
|
checkDetailDom.tableData = res.content |
|
|
checkDetailDom.tableData = res.content |
|
|
}) |
|
|
}) |
|
|
checkDetailDom.detailVisible = true |
|
|
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() { |
|
|
handleExport() { |
|
|
this.btnLoading = true |
|
|
this.btnLoading = true |
|
|
// console.log(this.selections, '导出') |
|
|
|
|
|
const id = this.selections[0].id |
|
|
const id = this.selections[0].id |
|
|
const params = { |
|
|
const params = { |
|
|
'orderNo': id |
|
|
'orderNo': id |
|
|
} |
|
|
} |
|
|
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false })) |
|
|
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false })) |
|
|
console.log(params) |
|
|
|
|
|
this.btnLoading = false |
|
|
this.btnLoading = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|