初始化生成代码功能

This commit is contained in:
liuhanqing
2025-09-11 15:33:38 +08:00
parent 1b91f79326
commit fd797fe91d
4 changed files with 245 additions and 191 deletions

View File

@@ -356,7 +356,7 @@ export default {
handleAdd() {
this.reset()
this.open = true
this.title = this.$t('traycodeFormat.addTitle')
this.title = '新增条码格式'
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -365,7 +365,7 @@ export default {
getTraycodeFormat(id).then(response => {
this.form = response.data
this.open = true
this.title = this.$t('traycodeFormat.editTitle')
this.title = '修改条码格式'
})
},
/** 提交按钮 */
@@ -374,13 +374,13 @@ export default {
if (valid) {
if (this.form.id != null) {
updateTraycodeFormat(this.form).then(response => {
this.$modal.msgSuccess(this.$t('traycodeFormat.editSuccess'))
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addTraycodeFormat(this.form).then(response => {
this.$modal.msgSuccess(this.$t('traycodeFormat.addSuccess'))
this.$modal.msgSuccess('添加成功')
this.open = false
this.getList()
})
@@ -391,11 +391,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm(this.$t('traycodeFormat.deleteConfirm', { id: ids })).then(function() {
this.$modal.confirm('删除条码格式', { id: ids }).then(function() {
return delTraycodeFormat(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess(this.$t('traycodeFormat.deleteSuccess'))
this.$modal.msgSuccess('删除成功')
}).catch(() => {})
},
/** 导出按钮操作 */
@@ -422,11 +422,11 @@ export default {
};
if (Number(this.printForm.printCount)+Number(this.selectData[0].serialRule)-1>this.selectData[0].maxNum){
this.$modal.msgError(this.$t('traycodeFormat.printCountError'))
this.$modal.msgError('生成打印数据失败')
return
}
updateTraycodeFormat(printData).then(response => {
this.$modal.msgSuccess(this.$t('traycodeFormat.editSuccess'))
this.$modal.msgSuccess('生成打印数据成功')
this.printDialogVisible = false;
this.getList()
})

View File

@@ -147,7 +147,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>{{ }}</el-button>
>删除</el-button>
</template>
</el-table-column>
</el-table>