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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
| <template>
| <div ref="container" 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 v-if="col.prop=='statusText'">
| <el-tag :color="setStatusBgColor(row[col.prop])" :style="setStatusColor(row[col.prop])">
| {{ row[col.prop] }}
| </el-tag>
| </template>
| <!--连接字段-->
| <template v-else-if="col.prop==dataOptions.linkColumn">
| <el-link type="primary" @click.native="()=>{linkEditor(row[dataOptions.idField]);}">{{ row[col.prop] }}</el-link>
| </template>
| <template v-else>
| {{ row[col.prop] }}
| </template>
| </template>
| </yrt-data-list>
|
| <!--数据编辑器Editor-->
| <yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :action.sync="editorOptions.action" :top.sync="editorOptions.top" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes" :default-value="defaultValue">
| </yrt-editor>
|
| <!--明细选择器-->
| <yrt-selector ref="selector-dialog" :config="selectorConfig" :visible.sync="selectorConfig.visible" @on-selected="onSelected"></yrt-selector>
| </div>
| </template>
| <script>
| import baseLayout from "@/components/common/base-layout.vue";
| import yrtSelector from "@/components/common/yrtSelector.vue";
|
| export default {
| name: "inbound-check-qualityCheck",
| components: {
| yrtSelector
| },
| mixins: [baseLayout],
| data() {
| return {
| selectorConfig: {
| title: "物料选择器",
| width: "1000px",
| visible: false,
| // 配置路由
| router: "/selector/s-product-selector"
| },
| // 表单默认值,新建时用
| defaultValue: {
| statusID: 1,
| statusText: "新建"
| },
| // 入库记录状态值
| statusValueList: [
| {
| status: "取消入库",
| bgColor: "#ff00cc",
| color: "#fff"
| },
| {
| status: "确认入库",
| bgColor: "#5353ff",
| color: "#fff"
| },
| {
| status: "部分上架",
| bgColor: "#cc66ff",
| color: "#fff"
| },
| {
| status: "完全上架",
| bgColor: "#00ccff",
| color: "#fff"
| }
| ]
| };
| },
| methods: {
| // 明细按钮点击事件
| detailButtonClick(authNode) {
| switch (authNode) {
| case "add":
| // 明细添加
| this.selectorConfig.visible = true;
| return true;
| }
| },
| // 将选择器选择中的数据填充到明细表中
| onSelected(rows) {
| this.$refs[this.editorRef].addDetailDataRow(rows);
| this.selectorConfig.visible = false;
| }
| }
| };
| </script>
|
|