//此处是对表单的方法,组件,权限操作按钮等进行任意扩展(方法扩展可参照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;
|