Accept Merge Request #685: (feature/制造代码优化 -> develop)

Merge Request: 修改机床链接模块,优化规范代码

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/685?initial=true
This commit is contained in:
马广威
2023-11-22 14:24:35 +08:00
committed by Coding
9 changed files with 87 additions and 85 deletions

View File

@@ -13,9 +13,9 @@ class CustomKanbanController extends KanbanController {
async setup() {
super.setup();
console.log('99999999111');
// console.log('99999999111');
this.workOrders = await this.getAllWorkOrders();
this.workOrdersNew = this.workOrders;
// this.workOrdersNew = this.workOrders;
// console.log('lines222222222', this.workOrders);
//
// console.log(typeof this.workOrders);
@@ -39,14 +39,14 @@ class CustomKanbanController extends KanbanController {
const id = button.getAttribute('data-id');
console.log('true_id', id);
const context = {production_line_show: 'shengchanxian1'}
// const context = {production_line_show: 'shengchanxian1'}
this.env.services.rpc('/web/dataset/call_kw', {
model: 'mrp.workcenter',
method: 'search_read',
args: [[], ['id']],
kwargs: {}
}).then((records) => {
console.log(records)
// console.log(records)
const ids = records.map(record => record.id);
const context = {production_line_show: id};
this.env.services.rpc('/web/dataset/call_kw', {
@@ -55,7 +55,7 @@ class CustomKanbanController extends KanbanController {
args: [ids, context],
kwargs: {}
}).then((response) => {
console.log('response', response);
// console.log('response', response);
location.reload();
window.onload = function () {
button.classList.add('choose')
@@ -77,7 +77,7 @@ class CustomKanbanController extends KanbanController {
// args: [],
// kwargs: {},
// });
console.log('response', response);
// console.log('response', response);
// console.log('response1', response1);
// 你可以在这里处理响应,例如将其存储在控制器的状态中
return response;