rev:原材料库存,桶标签优化
This commit is contained in:
@@ -4,20 +4,21 @@ package org.nl.wms.basedata.master.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.annotation.Log;
|
||||
import org.nl.wms.basedata.master.eum.RecordStatusEnum;
|
||||
import org.nl.wms.basedata.master.service.BucketrecordService;
|
||||
import org.nl.wms.basedata.master.service.dto.BucketrecordDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
@@ -97,4 +98,13 @@ public class BucketrecordController {
|
||||
public ResponseEntity<Object> getIvtList() {
|
||||
return new ResponseEntity<>(bucketrecordService.getIvtList(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping("/delIvt")
|
||||
@Log("删除库存")
|
||||
@ApiOperation("删除库存")
|
||||
//@PreAuthorize("@el.check('store:edit')")
|
||||
public ResponseEntity<Object> delIvt(@RequestBody JSONObject json) {
|
||||
bucketrecordService.delIvt(json);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.basedata.master.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.basedata.master.service.dto.BucketrecordDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -79,4 +80,10 @@ public interface BucketrecordService {
|
||||
* 获取库存等级
|
||||
*/
|
||||
JSONArray getIvtList();
|
||||
|
||||
/**
|
||||
* 删除库存
|
||||
* @param whereJson 入参
|
||||
*/
|
||||
void delIvt(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -214,4 +214,11 @@ wo.update(json);
|
||||
return jsonArr;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delIvt(JSONObject whereJson) {
|
||||
WQLObject.getWQLObject("st_ivt_structivt")
|
||||
.delete("stockrecord_id = '"+whereJson.getString("stockrecord_id")+"'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
ivt.frozen_qty,
|
||||
ivt.warehousing_qty,
|
||||
ivt.qty_unit_name,
|
||||
ivt.stockrecord_id,
|
||||
ivt.instorage_time
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
|
||||
@@ -52,4 +52,12 @@ export function getIvtList() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStatusList, getType, getQualityList, getIvtList }
|
||||
export function delIvt(data) {
|
||||
return request({
|
||||
url: 'api/bucketrecord/delIvt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStatusList, getType, getQualityList, getIvtList, delIvt }
|
||||
|
||||
@@ -323,9 +323,9 @@ export default {
|
||||
}
|
||||
},
|
||||
doDelete(rows) {
|
||||
if (rows.status !== '01') {
|
||||
/*if (rows.status !== '01') {
|
||||
return this.crud.notify('不为生成状态不可删除', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
}*/
|
||||
const msg = '删除此条记录,是否继续!'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
||||
@@ -181,6 +181,11 @@
|
||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="formatQty" min-width="100" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" min-width="100" />
|
||||
<el-table-column prop="instorage_time" label="入库时间" minwidth="140" />
|
||||
<el-table-column v-permission="['admin','stockrecord_id:edit','stockrecord_id:del']" fixed="right" label="操作" width="70px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="doDelete(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -203,6 +208,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import crudBucketrecord from '@/api/wms/basedata/master/bucketrecord'
|
||||
|
||||
export default {
|
||||
name: 'IvtQuery',
|
||||
@@ -330,6 +336,19 @@ export default {
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
doDelete(row) {
|
||||
const msg = '删除此条库存记录,是否继续!'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudBucketrecord.delIvt(row).then(res => {
|
||||
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user