222
schangxiang@126.com
2025-06-13 6a8393408d8cefcea02b7a598967de8dc1e565c2
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 class="page-list-container">
    <!-- 数据Table -->
    <yrt-data-list :fixed-where="fixedwhere" :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=='auditing'">
          <template>
            <el-tag v-if="row[col.prop]==0" color="#ffff33" style="color:black;border:0">
              {{ $refs[dataListRef].translateText(col.prop, row[col.prop], col.dropdown_Id) }}
            </el-tag>
            <el-tag v-else-if="row[col.prop]==1" color="#ff0033" style="color:white;border:0">
              {{ $refs[dataListRef].translateText(col.prop, row[col.prop], col.dropdown_Id) }}
            </el-tag>
            <el-tag v-else-if="row[col.prop]==2" color="#33cc33" style="color:black;border:0;color:#fff;">
              {{ $refs[dataListRef].translateText(col.prop, row[col.prop], col.dropdown_Id) }}
            </el-tag>
            <span v-else>
              {{ row[col.prop] }}
            </span>
          </template>
        </template>
        <!-- 状态 颜色 -->
        <template v-else-if="col.prop=='orderStatus','wayBillType'">
          <template>
            <el-tag v-if="row[col.prop]=='待中转'" color="#ffff33" style="color:black;border:0">
              {{ row[col.prop] }}
            </el-tag>
            <el-tag v-else-if="row[col.prop]=='已入库'" color="#00cc00" style="color:white;border:0">
              {{ row[col.prop] }}
            </el-tag>
            <el-tag v-else-if="row[col.prop]=='仓配单'" color="#00cc00" style="color:white;border:0">
              {{ row[col.prop] }}
            </el-tag>
          </template>
        </template>
      </template>
    </yrt-data-list>
    <!--数据编辑器Editor-->
    <yrt-editor :ref="editorRef" :edit-button-click="editButtonClick" :use-detail-slot="['statsDetail']" :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" :btn-read-only="btnReadOnly" @on-edit-load-after="onEditLoadAfter" @on-change="onChange">
      <!--自定义字段插槽-->
      <template slot="detail-column-slot" slot-scope="{ row, col }">
        <template v-if="col.prop == 'statsDetail'">
          <el-tag v-if="row[col.prop]=='待中转'" color="#ffff33" style="color:black;border:0">
            {{ row[col.prop] }}
          </el-tag>
          <el-tag v-else-if="row[col.prop]=='已入库'" color="#00cc00" style="color:white;border:0">
            {{ row[col.prop] }}
          </el-tag>
        </template>
      </template>
    </yrt-editor>
    <create-shipment-dialog :visible.sync="createDistConfig.isShowDialog" :config="createDistConfig">
    </create-shipment-dialog>
  </div>
</template>
<script>
import baseLayout from "@/components/common/base-layout.vue";
import CreateShipmentDialog from "./components/create-shipment-dialog";
export default {
  name: "tms-way-bill",
  components: { CreateShipmentDialog },
  mixins: [baseLayout],
  data() {
    return {
      fixedwhere: { orderStatus: ["待中转", "已入库"], vehicleGroupName: null, teamLeader: null },
      createDistConfig: {
        // 显示新建页面对话框
        isShowDialog: false,
        title: "分配月台"
      }
    };
  },
  methods: {
    buttonClick(authNode) {
      switch (authNode) {
        case "distribution":
          this.distribution();
          return true;
      }
    },
    distribution() {
      const ids = this.dataList.dataListSelections.map(item => item.wayBill_Id);
      if (!ids.length) {
        this.$message.error("至少选择一行!");
        return;
      }
      this.createDistConfig.isShowDialog = true;
    },
    editButtonClick(authNode) {},
    onChange(ref, val, field, formData) {},
    onEditLoadAfter(formData) {}
  }
};
</script>