Admin
5 天以前 bd6818fc9d40f343547bafca0743658f3c0379dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//此处是对表单的方法,组件,权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
let extension = {
    components: {//动态扩充组件或组件路径
        //表单header、content、footer对应位置扩充的组件
        gridHeader: '',//{ template: "<div>扩展组xx件</div>" },
        gridBody: '',
        gridFooter: '',
        //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
        modelHeader: '',
        modelBody: '',
        modelFooter: ''
    },
    buttons: { view: [], box: [], detail: [] },//扩展的按钮
    methods: {//事件扩展
        onInit() {
 
            this.searchFormFields.outorderdtl_state = "24";
            this.buttons.forEach(element => {
                if (element.name == "查 询" || element.name == "高级查询") {
                    element.hidden = true;//vue3版本改为直接设置:x.hidden=true
                }
            });
            // for (let index = 0; index < this.columns.length; index++) {
            //     const row = this.columns[index];
            //     if (row.field != 'outorderdtl_createtime') { continue; }
            //     //参数配置见文档VolTable组件中columns的属性
            //     let options = {
            //         field: 'oper', title: '操作',
            //         type: 'text', width: 100,
            //         //返回一个标签
            //         formatter: (row) => {
            //             return '<span style=" cursor: pointer;padding: 3px 7px;'+
            //             'border-radius:3px;background-color: #f0f9eb;color: #6fd23e;'+
            //             'font-size: 13px;border: 1px solid #9bea74;">查看明细1</span>'
            //         },
            //         //触发事件,可以在此事件再打开一个弹出框等操作
            //         click: (row, column, event) => {
            //             this.edit([row]);
            //         }
            //     };
            //     //在Title(标题)列后添加一行
            //     this.columns.splice(index + 1, 0, options)
            // }
            // this.buttons.splice(2,0,{
            //     name: "释放指定出库",
            //     icon: 'md-freed',
            //     hidden: false,
            //     value:"Add",
            //     type: 'info',
            //     onClick: function () {
            //         let rows = this.$refs.table.getSelected();
            //         if (rows.length == 0) return this.$error("请选择要释放的行!");
            //         debugger;
            //         this.$refs.gridHeader.open1(rows[0].number_plate,rows[0].outorderdtl_id);
 
            //         // this.$confirm('确认要释放选择的指定出库吗 是否继续?', '提示', {
            //         //     confirmButtonText: '确定',
            //         //     cancelButtonText: '取消',
            //         //     type: 'warning'
            //         //   }).then(()=>{
            //         //     let param = {
            //         //         MainData: {number_plate: rows[0].number_plate,task_outstation:3,outorderdtl_id:rows[0].outorderdtl_id},
            //         //         DetailData: null,
            //         //         DelKeys: null
            //         //     };
            //         //     this.http.post("/api/ToWCS/FreedWave", param, "正在释放....").then(x => {
            //         //         if (!x.status) return this.$error(x.message);
            //         //         this.$Message.success("释放指定出库成功!");
            //         //         this.refresh();
            //         //     });
            //         //   }).catch(()=>{
            //         //     this.$Message.error("选择错误");
            //         //   })
            //     }
            // });
        },
        onInited() {
            this.singleSearch = null;
        }
    }
};
export default extension;