|
<template lang="">
|
<div class="page-list-container">
|
<!-- 数据Table -->
|
<yrt-data-list :ref="dataListRef" :editor-ref="editorRef" :data-options="dataOptions" :fields.sync="dataListOptions.fields" :buttons="dataListOptions.buttons" :button-click="buttonClick" :data-list-selections.sync="dataListSelections" :auth-nodes="authNodes">
|
<template slot="common-column-slot" slot-scope="{ row, col }">
|
</template>
|
</yrt-data-list>
|
<!--数据编辑器Editor-->
|
<yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :use-detail-slot="[ 'photo']" :action.sync="editorOptions.action" :top.sync="editorOptions.top" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes" :btn-read-only="btnReadOnly" before-close-on-change="onChange :before-close=">
|
<template slot="detail-column-slot" slot-scope="{ row, col, formData }">
|
<template v-if="col.prop === 'photo'">
|
<el-image :src="row.photo" :fit="fit" style="width: 140px; height: 100px"></el-image>
|
</template>
|
</template>
|
</yrt-editor>
|
|
<create-emptye-quipment-dialog ref="childData" :visible.sync="createDistConfig.isShowDialog" :config="createDistConfig" >
|
</create-emptye-quipment-dialog>
|
</div>
|
</template>
|
<script>
|
import baseLayout from "@/components/common/base-layout.vue";
|
import CreateEmptyeQuipmentDialog from "./components/create-emptye-quipment-dialog";
|
export default {
|
name: "inbound-purchase-emptye-quipment",
|
components: { CreateEmptyeQuipmentDialog },
|
mixins: [baseLayout],
|
data() {
|
return {
|
createDistConfig: {
|
// 显示新建页面对话框
|
isShowDialog: false,
|
title: "空器具出库任务"
|
}
|
};
|
},
|
mounted() {},
|
methods: {
|
// 权限按钮点击事件
|
buttonClick(authNode) {
|
if (authNode === "add") {
|
this.createDistConfig.isShowDialog = true;
|
return true;
|
}
|
switch (authNode) {
|
case "equipmentOrder":
|
this.equipmentOrder();
|
return true;
|
}
|
},
|
|
// 出库指令
|
equipmentOrder() {
|
// 获得已选中的ID
|
const ids = this.dataListSelections.map((item, index, Array) => {
|
return item.emptyEquipment_Id;
|
});
|
if (ids.length !== 1) {
|
this.$message({
|
message: "请选中一行!",
|
type: "warning"
|
});
|
return;
|
}
|
const ref = this.dataList;
|
var id = ids[0];
|
const url = "/api/inbound/emptyEquipment/equipmentOrder";
|
const params = { id: id };
|
var callback = res => {
|
this.common.showMsg(res);
|
if (res.result) {
|
ref.loadData();
|
}
|
};
|
this.common.ajax(url, params, callback, true);
|
}
|
}
|
};
|
</script>
|