diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java index f18b210700..7313ad6aa0 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclereturn/ScmVehicleReturnFlowQuery.java @@ -1,9 +1,14 @@ package com.yxt.anrui.scm.api.scmvehiclereturn; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.yxt.anrui.scm.api.scmvehiclereturndetails.ScmVehicleReturnDetailssVo; import com.yxt.common.core.query.Query; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.ArrayList; +import java.util.List; import java.util.Map; /** @@ -35,5 +40,20 @@ public class ScmVehicleReturnFlowQuery implements Query { * 业务参数,按需传递 */ private Map formVariables; + @ApiModelProperty(value = "申请编号") + private String applicationCode; + @ApiModelProperty(value = "申请人") + private String name; + @ApiModelProperty(value = "申请日期") + private String createTime; + @ApiModelProperty(value = "退库原因") + private String reason; + @ApiModelProperty(value = "费用") + @JsonSerialize(using = ToStringSerializer.class) + private String money; + @ApiModelProperty(value = "车辆列表") + private List voList = new ArrayList<>(); + @ApiModelProperty(value = "费用说明") + private String remarks; } diff --git a/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js b/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js index d0cea75ac7..e9a64a668c 100644 --- a/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js +++ b/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js @@ -23,7 +23,8 @@ export default { return request({ url: '/base/baseoutsourcingapplication/delBySids', method: 'post', - data: params + data: params, + headers: { 'Content-Type': 'application/json' } }) }, // 通过sid查询一条记录 diff --git a/anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js b/anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js index c21740bf00..5e412dd35d 100644 --- a/anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js +++ b/anrui-scm/anrui-scm-ui/src/api/supplychain/purchasereturntowarehouse.js @@ -36,7 +36,7 @@ export default { delBySids: function(data) { return request({ url: '/scm/v1/scmvehiclereturn/delete', - method: 'DELETE', + method: 'delete', data: data, headers: { 'Content-Type': 'application/json' diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue index d4d607af99..d0397bcd45 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplication.vue @@ -134,7 +134,8 @@ export default { orgSid: '' // 部门sid } }, - multipleSelection: [] + multipleSelection: [], + row:{} } }, created() { @@ -173,22 +174,24 @@ export default { this.$refs['divadd'].showAdd() }, toEdit() { - if (this.multipleSelection.length === 0) { + if (this.sids.length === 0) { this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' }) return } - if (this.multipleSelection.length > 1) { + if (this.sids.length > 1) { this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' }) return } - this.multipleSelection.forEach(row => { - if(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请')){ + this.dataList.forEach(row => { + if(row.sid === this.sids[0] && (row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){ this.viewState = 3 - const row = this.multipleSelection[0] + const row = this.sids[0] this.$refs['divadd'].showEdit(row) - }else{ + }else if(row.sid === this.sids[0]){ alert('已经发起的审批业务数据不能进行编辑。'); return false; + }else{ + } }) @@ -225,38 +228,31 @@ export default { });*/ }, doDel(row) { - - if (this.multipleSelection.length === 0) { - this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) - return - } - const _this = this - const sids = [] + if (this.sids.length === 0) { + this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'}) + return + } + var b=false; this.multipleSelection.forEach(row => { - if(row.nodeState=='待提交'||(row.nodeState!='待提交'&&row.nodeState=='外采申请')){ - sids.push(row.sid) - }else{ - alert('已经发起的审批业务数据不能进行删除。'); - sids = []; + if(!(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请'))){ + b=true } }) - const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?' - this.$confirm(tip, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }) + if(b){ + this.$message({showClose: true, type: 'error', message: '提交流程审批的记录不能进行删除!'}) + return + } + const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' + this.$confirm(tip, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) .then(() => { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) + const _this = this req - .delBySids(sids) + .delBySids(this.sids) .then(resp => { - loading.close() if (resp.success) { _this.$message({ type: 'success', message: resp.msg, showClose: true }) this.queryParams.current = 1 @@ -338,8 +334,13 @@ export default { _this.tableLoading = false }) }, - handleSelectionChange(val) { - this.multipleSelection = val + handleSelectionChange(row) { + this.multipleSelection = row + const aa = [] + row.forEach((element) => { + aa.push(element.sid) + }) + this.sids = aa }, // 序号 indexMethod(index) { diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue index 2255f9ab7e..27bf4f4bfd 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue @@ -359,15 +359,15 @@ export default { }) this.viewTitle = '【新增】外采申请表' }, - showEdit(row) { + showEdit(sid) { this.$nextTick(() => { this.$refs['form_obj'].clearValidate() }) this.viewTitle = '【修改】外采申请表' const _this = this - _this.formobj.sid = row.sid // SID + _this.formobj.sid = sid // SID req - .fetchBySid(row.sid) + .fetchBySid(sid) .then(resp => { if (resp.success) { const vdata = resp.data @@ -394,7 +394,7 @@ export default { } }) .catch(e => { - this.formobj = row + this.formobj = sid }) }, handleClose() { diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue index 0f2fabc685..8084be4f2d 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue @@ -6,7 +6,6 @@
外采申请表详情
- {{formobj.userSid}} 同 意 驳 回 终 止 diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue index 94e0c76f08..2f538d5e99 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuiku.vue @@ -167,15 +167,19 @@ export default { } }, // 获取数据sid - handleSelectionChange(val) { - this.multipleSelection = val + handleSelectionChange(row) { + this.multipleSelection = row + const aa = [] + row.forEach((element) => { + aa.push(element.sid) + }) + this.sids = aa }, toAdd(row) { this.viewState = 2 this.$refs['divadd'].showAdd() }, toEdit(row) { - console.log(this.multipleSelection); if (this.multipleSelection.length !== 1) { this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) return @@ -247,8 +251,19 @@ export default { }, // 删除 doDel(row) { - if (this.multipleSelection.length === 0) { - this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) + if (this.sids.length === 0) { + this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'}) + return + } + console.log(this.multipleSelection); + var b=false; + this.multipleSelection.forEach(row => { + if(!(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='采购退库申请'))){ + b=true + } + }) + if(b){ + this.$message({showClose: true, type: 'error', message: '提交流程审批的记录不能进行删除!'}) return } const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?' @@ -257,28 +272,11 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) const _this = this - var sids=""; - this.multipleSelection.forEach(row => { - if(row.nodeState == '待提交' || (row.nodeState!='待提交'&&row.nodeState=='外采申请')){ - sids=sids+row.sid+","; - }else{ - alert('已经发起的审批业务数据不能进行编辑。'); - return false; - } - }) - req.delBySids(sids).then(resp => { - loading.close() + req.delBySids(this.sids).then(resp => { _this.$message({ type: 'success', message: resp.msg, showClose: true }) _this.loadList() }).catch(e => { - loading.close() }) }).catch(() => { }) diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue index d64699db2d..902f62cf95 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue @@ -244,6 +244,7 @@ if (resp.success) { const data = resp.data this.formobj = data + this.formobj.sid=sid this.formobj.userSid= window.sessionStorage.getItem('userSid'), // 用户人sid this.formobj.orgSid=window.sessionStorage.getItem('orgSid'), // 部门sid this.formobj.staffSid=window.sessionStorage.getItem('staffSid'), diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuInfo.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuInfo.vue index bd881fee3d..1e8ab17c27 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuInfo.vue @@ -7,8 +7,6 @@
车辆采购退库申请
- 提交 - 打印 返回
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue index a72d8d0919..b8d6180c1d 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuiku.vue @@ -48,7 +48,7 @@ - + {{ formobj.remarks }} @@ -61,7 +61,7 @@