add:库存管理新增编辑

This commit is contained in:
2023-11-30 13:44:45 +08:00
parent f35cd4e614
commit 0b2f5e9610
6 changed files with 44 additions and 1 deletions

View File

@@ -99,4 +99,12 @@ public class StructivtController {
structivtService.download(map, response, product_area,ivt_flag);
}
@PostMapping("/save")
@Log("保存")
@ApiOperation("保存")
public ResponseEntity<Object> save(@RequestBody JSONObject whereJson){
structivtService.save(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -73,4 +73,6 @@ public interface StructivtService {
JSONArray getUnits();
void download(Map map, HttpServletResponse response,String[] product_area,String[] ivt_flag) throws IOException;
void save(JSONObject whereJson);
}

View File

@@ -304,4 +304,13 @@ public class StructivtServiceImpl implements StructivtService {
FileUtil.downloadExcel(list, response);
}
@Override
@Transactional
public void save(JSONObject whereJson) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("remark", whereJson.getString("remark"));
WQLObject.getWQLObject("st_ivt_structivt").update(jsonObject,"stockrecord_id = '"+whereJson.getString("stockrecord_id")+"'");
}
}

View File

@@ -200,6 +200,16 @@
<el-table-column prop="paper_type" label="管件类型" min-width="150" />
<el-table-column prop="paper_code" label="管件编码" min-width="150" />
<el-table-column prop="paper_name" label="管件描述" min-width="250" />
<el-table-column prop="remark" label="备注" min-width="250">
<template scope="scope">
<el-input v-model="scope.row.remark" style="width: 200px" />
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click.native.prevent="save(scope.row)" />
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
@@ -302,6 +312,12 @@ export default {
crud.downloadLoading = false
})
}
},
save(row) {
crudStructivt.save(row).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
}
}
}

View File

@@ -46,4 +46,12 @@ export function getUnits() {
})
}
export default { add, edit, del, getStruct, getStructById, getUnits }
export function save(data) {
return request({
url: 'api/structivt/save',
method: 'post',
data: data
})
}
export default { add, edit, del, getStruct, getStructById, getUnits, save }