add:库存管理新增编辑
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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")+"'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -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()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user