diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue index 908a4b2d51..e34cd3f368 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigou.vue @@ -51,7 +51,7 @@ @@ -88,6 +88,20 @@ + + + + + + + + + + + 确 定 + 取 消 + + @@ -117,6 +131,7 @@ export default { viewState: 1, // 1、列表 2、添加 3、修改 4、查看 isSearchShow: false, // 显示隐藏 tableLoading: false, + dialogVisible: false, // 下拉框 billType_list: [], // 单据类型 // 列表数据 @@ -149,7 +164,10 @@ export default { orgPath: '' } }, - row: {} + formobj: { + sid: '', + cancalRemarks: '' + } } }, created() { @@ -178,18 +196,21 @@ export default { this.$refs['divadd'].showEdit(row) }, handleCancellation(row) { - const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' - this.$confirm(tip, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - req.cancal({ sid: row.sid }).then((res) => { - if (res.success) { - this.$message({ showClose: true, type: 'success', message: '操作成功' }) - this.loadList() - } - }) + this.dialogVisible = true + this.cancalRemarks = '' + this.formobj.sid = row.sid + }, + handleConfirm() { + if (this.formobj.cancalRemarks === '') { + this.$message({ showClose: true, type: 'error', message: '请填写作废说明' }) + return + } + req.cancal(this.formobj).then((res) => { + if (res.success) { + this.dialogVisible = false + this.$message({ showClose: true, type: 'success', message: '操作成功' }) + this.loadList() + } }) }, handleLooK(row) { diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue index d733998022..7d02411f6f 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue @@ -44,7 +44,7 @@ @@ -85,6 +85,20 @@ + + + + + + + + + + + 确 定 + 取 消 + + @@ -118,6 +132,7 @@ export default { viewState: 1, // 1、列表 2、添加 3、修改 4、查看 isSearchShow: false, // 显示隐藏 tableLoading: false, + dialogVisible: false, // 列表数据 dataList: [], btnList: [ @@ -132,7 +147,6 @@ export default { multipleSelection: [], // sid数组 sids: [], // 用于导出的时候保存已选择SID - sides: '', // 一条数据的sid queryParams: { current: 1, size: 10, @@ -147,7 +161,10 @@ export default { pcApplicationCode: '' } }, - row: {} + formobj: { + sid: '', + cancalRemarks: '' + } } }, created() { @@ -213,8 +230,6 @@ export default { aa.push(element.sid) }) this.sids = aa - this.row = row - this.sides = this.sids.join() // 将sid数组的元素转化成字符串 console.log('获取sids数组', this.sids) }, toEdit(row) { @@ -229,18 +244,21 @@ export default { this.$refs['divinfo'].showInfo(sid, row) }, toTermination(row) { - const tip = '请确认是否终止该记录?' - this.$confirm(tip, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - req.cancal({ sid: row.sid }).then((res) => { - if (res.success) { - this.$message({ showClose: true, type: 'success', message: '操作成功' }) - this.loadList() - } - }) + this.dialogVisible = true + this.formobj.sid = row.sid + this.formobj.cancalRemarks = '' + }, + handleConfirm() { + if (this.formobj.cancalRemarks === '') { + this.$message({ showClose: true, type: 'error', message: '请填写终止说明' }) + return + } + req.cancal(this.formobj).then((res) => { + if (res.success) { + this.$message({ showClose: true, type: 'success', message: '操作成功' }) + this.dialogVisible = false + this.loadList() + } }) }, hangleLook(row) { @@ -272,16 +290,19 @@ export default { }, // 加载分页列表 loadList() { - const _this = this this.tableLoading = true req.listPage(this.queryParams).then(resp => { - console.log('查询列表', resp) - _this.tableLoading = false - const data = resp.data - _this.queryParams.total = data.total - _this.dataList = data.records + this.tableLoading = false + if (resp.success) { + const data = resp.data + this.queryParams.total = data.total + this.dataList = data.records + } else { + this.queryParams.total = 0 + this.dataList = [] + } }).catch(() => { - _this.tableLoading = false + this.tableLoading = false }) }, // 序号 diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue index 79631ef3d6..2eb4757493 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/changjiaxitong/manufacturers.vue @@ -113,6 +113,20 @@ + + + + + + + + + + + 确 定 + 取 消 + + @@ -150,7 +164,7 @@ export default { isSearchShow: false, searchxianshitit: '显示查询条件', dialogImgVisible: false, - dialogFileVisible: false, + dialogVisible: false, // 查询条件 ----------- tableKey: 0, list: [], @@ -202,6 +216,10 @@ export default { }, dialogImageUrl: '', imgList: [], + formobj: { + sid: '', + cancalRemarks: '' + }, rules: {} } }, @@ -307,18 +325,21 @@ export default { }) }, handCancellation(row) { - const tip = '请确认是否作废该记录?' - this.$confirm(tip, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - req.cancel({ sid: row.sid }).then((res) => { - if (res.success) { - this.$message({ showClose: true, type: 'success', message: '操作成功' }) - this.getList() - } - }) + this.dialogVisible = true + this.cancalRemarks = '' + this.formobj.sid = row.sid + }, + handleConfirm() { + if (this.formobj.cancalRemarks === '') { + this.$message({ showClose: true, type: 'error', message: '请填写作废说明' }) + return + } + req.cancel(this.formobj).then((res) => { + if (res.success) { + this.dialogVisible = false + this.$message({ showClose: true, type: 'success', message: '操作成功' }) + this.getList() + } }) }, handleGetCheck(row) {