Commit 3fb78d9b authored by jingnan's avatar jingnan 👀

卷内序号编辑保存

parent bd3f17f9
......@@ -45,10 +45,11 @@ export default {
created() {
},
methods: {
handleChange() {
handleChange(val) {
if (!this.form.belongingCaseFile) return this.$utils.showMessageWarning('请先编辑所属案件信息!')
this.$emit('input', this.volumeNumber)
this.$set(this.form, 'archiveNumber', this.generateArchiveNumber(this.form.belongingCaseFile, this.volumeNumber))
this.saveData(val)
},
generateArchiveNumber(caseNumber, sequenceNumber) {
// 检查序号是否包含'-'且'-'后可能跟随括号或其他内容
......@@ -89,23 +90,41 @@ export default {
},
// 示例用法同上
changeAmount(val) {
saveData(val) {
/**
* 入参是对象。
id; //linkID
/**
* 所属案卷
*
private String belongingCaseFile;
/**
* 卷内序号
*
private String volumeNumber;
/**
* 保管年限
*
private String storagePeriod;
/**
* 归档号
*
private String archiveNumber;
*/
const params = {
...this.form,
volumeNumber: this.volumeNumber,
operator: 'MODIFY'
id: this.form.id,
belongingCaseFile: this.form.belongingCaseFile,
storagePeriod: this.form.storagePeriod,
archiveNumber: this.form.archiveNumber,
volumeNumber: this.volumeNumber
}
post(`InStorageRequestItem/inStorageRequestItem/update`, params).then(res => {
this.$message({
type: 'success',
message: '数量编辑成功!'
})
if (res.items && res.items.inventoryJobResponses) {
const allocatedAmount = this.$utils.sumArray(res.items.inventoryJobResponses, 'allocatedAmount')
this.$set(this.scope.row, 'allocatedAmount', allocatedAmount)
this.$bus.$emit('changeAllocatedAmount', { index: this.scope.$index, allocatedAmount, inventoryJobResponses: res.items.inventoryJobResponses })
}
post(`ExtTransferDocLink/saveExtTransferDocLink`, params).then(res => {
this.$utils.showMessageSuccess(res.message)
}).catch((err) => {
this.form.volumeNumber = ''
this.form.archiveNumber = ''
this.volumeNumber = ''
console.log(err)
})
}
......
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