常熟吴彦祖 4 days ago
parent
commit
8507ea01cd
  1. 69
      src/views/modules/automatedWarehouse/palletMergeQuery.vue

69
src/views/modules/automatedWarehouse/palletMergeQuery.vue

@ -4,16 +4,16 @@
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<el-form-item label="托盘类型" required>
<el-select
v-model="searchData.palletType"
placeholder="请选择托盘类型"
style="width: 200px"
<el-select
v-model="searchData.palletType"
placeholder="请选择托盘类型"
style="width: 200px"
clearable
@change="handlePalletTypeChange">
<el-option
v-for="item in palletTypeOptions"
:key="item.palletType"
:label="item.palletType + ' - ' + item.typeDesc"
<el-option
v-for="item in palletTypeOptions"
:key="item.palletType"
:label="item.palletType + ' - ' + item.typeDesc"
:value="item.palletType">
</el-option>
</el-select>
@ -26,10 +26,10 @@
<!-- 操作按钮行 - rqrq -->
<div style="margin-bottom: 10px;">
<el-button
type="primary"
class="yzzButtonAn"
@click="submitMerge()"
<el-button
type="primary"
class="yzzButtonAn"
@click="submitMerge()"
:disabled="submitLoading || selectedRows.length < 2"
:loading="submitLoading">
{{ submitLoading ? '提交中...' : '提交合托' }}
@ -247,13 +247,13 @@ export default {
this.$alert('请选择托盘类型', '提示', { confirmButtonText: '确定' })
return
}
this.dataListLoading = true
this.selectedRows = []
if (this.$refs.mainTable) {
this.$refs.mainTable.clearSelection()
}
searchPalletMergeList(this.searchData).then(({ data }) => {
this.dataListLoading = false
if (data && data.code == 0) {
@ -290,25 +290,32 @@ export default {
this.$alert('请至少选择2条数据进行合托', '提示', { confirmButtonText: '确定' })
return
}
this.submitLoading = true
// - rqrq
submitPalletMerge(this.selectedRows).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '提交成功',
type: 'success',
duration: 1500
})
// - rqrq
this.searchTable()
} else {
this.$alert(data.msg || '提交失败', '错误', { confirmButtonText: '确定' })
}
this.$confirm(`确定进行[合托]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// - rqrq
submitPalletMerge(this.selectedRows).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '提交成功',
type: 'success',
duration: 1500
})
// - rqrq
this.searchTable()
} else {
this.$alert(data.msg || '提交失败', '错误', {confirmButtonText: '确定'})
}
}).catch(() => {
this.$message.error('提交失败')
}).finally(() => {
this.submitLoading = false
})
}).catch(() => {
this.$message.error('提交失败')
}).finally(() => {
this.submitLoading = false
})
}

Loading…
Cancel
Save