Commit 3fb78d9b authored by jingnan's avatar jingnan 👀

卷内序号编辑保存

parent bd3f17f9
...@@ -45,10 +45,11 @@ export default { ...@@ -45,10 +45,11 @@ export default {
created() { created() {
}, },
methods: { methods: {
handleChange() { handleChange(val) {
if (!this.form.belongingCaseFile) return this.$utils.showMessageWarning('请先编辑所属案件信息!') if (!this.form.belongingCaseFile) return this.$utils.showMessageWarning('请先编辑所属案件信息!')
this.$emit('input', this.volumeNumber) this.$emit('input', this.volumeNumber)
this.$set(this.form, 'archiveNumber', this.generateArchiveNumber(this.form.belongingCaseFile, this.volumeNumber)) this.$set(this.form, 'archiveNumber', this.generateArchiveNumber(this.form.belongingCaseFile, this.volumeNumber))
this.saveData(val)
}, },
generateArchiveNumber(caseNumber, sequenceNumber) { generateArchiveNumber(caseNumber, sequenceNumber) {
// 检查序号是否包含'-'且'-'后可能跟随括号或其他内容 // 检查序号是否包含'-'且'-'后可能跟随括号或其他内容
...@@ -89,23 +90,41 @@ export default { ...@@ -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 = { const params = {
...this.form, id: this.form.id,
volumeNumber: this.volumeNumber, belongingCaseFile: this.form.belongingCaseFile,
operator: 'MODIFY' storagePeriod: this.form.storagePeriod,
archiveNumber: this.form.archiveNumber,
volumeNumber: this.volumeNumber
} }
post(`InStorageRequestItem/inStorageRequestItem/update`, params).then(res => { post(`ExtTransferDocLink/saveExtTransferDocLink`, params).then(res => {
this.$message({ this.$utils.showMessageSuccess(res.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 })
}
}).catch((err) => { }).catch((err) => {
this.form.volumeNumber = ''
this.form.archiveNumber = ''
this.volumeNumber = ''
console.log(err) 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