|
|
@ -94,13 +94,13 @@ |
|
|
label="库位" |
|
|
label="库位" |
|
|
width="100"> |
|
|
width="100"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
|
|
|
|
|
|
<!-- <el-table-column |
|
|
prop="arriveQty" |
|
|
prop="arriveQty" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
label="到货数量" |
|
|
label="到货数量" |
|
|
width="100"> |
|
|
width="100"> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column>--> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="qtyReceived" |
|
|
prop="qtyReceived" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
@ -143,19 +143,20 @@ |
|
|
label="状态" |
|
|
label="状态" |
|
|
width="100"> |
|
|
width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag v-if="scope.row.status === 'RECEIVED'" type="success">已接收</el-tag> |
|
|
|
|
|
<el-tag v-else-if="scope.row.status === 'CANCELLED'" type="danger">已取消</el-tag> |
|
|
|
|
|
<el-tag v-else type="info">{{ scope.row.status }}</el-tag> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.status === 'RECEIVED'" type="success">已接收</span> |
|
|
|
|
|
<span v-else-if="scope.row.status === 'CANCEL'" type="danger">已取消</span> |
|
|
|
|
|
<span v-else-if="scope.row.status === 'ARRIVED'" type="warning">已到货</span> |
|
|
|
|
|
<span v-else type="info">{{ scope.row.status }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
fixed="right" |
|
|
|
|
|
|
|
|
fixed="left" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="150" |
|
|
|
|
|
|
|
|
width="80" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button @click="cancelSingleReceipt(scope.row)" type="text" size="small" :disabled="scope.row.status !== 'RECEIVED'">取消</el-button> |
|
|
|
|
|
|
|
|
<a @click="cancelSingleReceipt(scope.row)" type="text" size="small" :disabled="scope.row.status !== 'RECEIVED'">取消</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -180,14 +181,12 @@ |
|
|
<el-form :model="cancelForm" :rules="cancelRules" ref="cancelForm" label-width="100px"> |
|
|
<el-form :model="cancelForm" :rules="cancelRules" ref="cancelForm" label-width="100px"> |
|
|
<el-form-item label="取消原因" prop="cancelReason"> |
|
|
<el-form-item label="取消原因" prop="cancelReason"> |
|
|
<el-input |
|
|
<el-input |
|
|
type="textarea" |
|
|
|
|
|
:rows="4" |
|
|
|
|
|
placeholder="请输入取消原因" |
|
|
placeholder="请输入取消原因" |
|
|
v-model="cancelForm.cancelReason"> |
|
|
v-model="cancelForm.cancelReason"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 80px"> |
|
|
<el-button @click="cancelDialogVisible = false">取 消</el-button> |
|
|
<el-button @click="cancelDialogVisible = false">取 消</el-button> |
|
|
<el-button type="primary" @click="confirmCancel" :loading="cancelLoading">确 定</el-button> |
|
|
<el-button type="primary" @click="confirmCancel" :loading="cancelLoading">确 定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
@ -204,12 +203,12 @@ export default { |
|
|
favorite: false, |
|
|
favorite: false, |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
pageIndex: 1, |
|
|
pageIndex: 1, |
|
|
pageSize: 10, |
|
|
|
|
|
|
|
|
pageSize: 20, |
|
|
totalPage: 0, |
|
|
totalPage: 0, |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
dataListSelections: [], |
|
|
dataListSelections: [], |
|
|
queryHeaderData: { |
|
|
queryHeaderData: { |
|
|
site: '', |
|
|
|
|
|
|
|
|
site: localStorage.getItem('site'), |
|
|
receiptNo: '', |
|
|
receiptNo: '', |
|
|
partNo: '', |
|
|
partNo: '', |
|
|
batchNo: '', |
|
|
batchNo: '', |
|
|
@ -276,9 +275,19 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 取消单个接收记录 |
|
|
// 取消单个接收记录 |
|
|
cancelSingleReceipt (row) { |
|
|
cancelSingleReceipt (row) { |
|
|
|
|
|
// 显示确认提示 |
|
|
|
|
|
this.$confirm(`确认要取消接收单号 ${row.receiptNo} 的记录吗?`, '确认取消', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
this.currentCancelRecords = [row] |
|
|
this.currentCancelRecords = [row] |
|
|
this.cancelForm.cancelReason = '' |
|
|
|
|
|
this.cancelDialogVisible = true |
|
|
|
|
|
|
|
|
this.cancelForm.cancelReason = ' ' |
|
|
|
|
|
//this.cancelDialogVisible = true |
|
|
|
|
|
this.confirmCancel() |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
// 用户取消操作 |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 批量取消接收记录 |
|
|
// 批量取消接收记录 |
|
|
cancelSelectedReceipts () { |
|
|
cancelSelectedReceipts () { |
|
|
@ -286,14 +295,23 @@ export default { |
|
|
this.$message.warning('请选择要取消的记录') |
|
|
this.$message.warning('请选择要取消的记录') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 显示确认提示 |
|
|
|
|
|
this.$confirm(`确认要取消选中的 ${this.dataListSelections.length} 条接收记录吗?`, '确认取消', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
this.currentCancelRecords = this.dataListSelections |
|
|
this.currentCancelRecords = this.dataListSelections |
|
|
this.cancelForm.cancelReason = '' |
|
|
|
|
|
this.cancelDialogVisible = true |
|
|
|
|
|
|
|
|
this.cancelForm.cancelReason = ' ' |
|
|
|
|
|
//this.cancelDialogVisible = true |
|
|
|
|
|
this.confirmCancel() |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
// 用户取消操作 |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 确认取消 |
|
|
// 确认取消 |
|
|
confirmCancel () { |
|
|
confirmCancel () { |
|
|
this.$refs.cancelForm.validate((valid) => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
this.cancelLoading = true |
|
|
this.cancelLoading = true |
|
|
const promises = this.currentCancelRecords.map(record => { |
|
|
const promises = this.currentCancelRecords.map(record => { |
|
|
return cancelReceipt({ |
|
|
return cancelReceipt({ |
|
|
@ -332,8 +350,6 @@ export default { |
|
|
this.$message.error('取消操作失败') |
|
|
this.$message.error('取消操作失败') |
|
|
this.cancelLoading = false |
|
|
this.cancelLoading = false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 重置查询 |
|
|
// 重置查询 |
|
|
resetQuery () { |
|
|
resetQuery () { |
|
|
|