Browse Source

原材料字段变更

laoyao 3 years ago
parent
commit
ae0d0b76bc

+ 513 - 465
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/draftOrder/index.vue

@@ -1,465 +1,513 @@
-<template>
-  <div class="app-container">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span>
-    		<span>{{$t("runCenter.searchForm.bomName")}}:</span>
-    		<el-input v-model="queryParams.model.custDesc" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("runCenter.searchForm.orderNo")}}:</span>
-    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
-    	</span>
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("runCenter.searchForm.deliveryTime")}}:</span>
-    		<el-date-picker
-		      v-model="queryParams.timeRange"
-		      type="daterange"
-		      :picker-options="pickerOptions"
-		      :range-separator='$t("common.separator")'
-		      :start-placeholder='$t("common.startTime")'
-		      :end-placeholder='$t("common.endTime")'
-		      format="yyyy-MM-dd"
-			    value-format="yyyy-MM-dd"
-		      align="right">
-		    </el-date-picker>
-    	</span>
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-
-    <!-- 功能按钮 -->
-    <el-row class="filter-container">
-    	<el-col>
-    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['order:add']" @click="add">{{ $t("common.add") }}</el-button>
-	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['order:update']" @click="editOne">
-	        {{ $t("common.edit") }}
-	      </el-button>
-	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['order:delete']" @click="batchDelete">
-	        {{ $t("table.delete") }}
-	      </el-button>
-	      <el-button type="primary" icon="el-icon-thumb" size="medium" v-has-permission="['order:pushaudit']" @click="audioStatu('1')">{{$t("common.audio.addAudio")}}</el-button>
-    	</el-col>
-    </el-row>
-
-		<!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-	      <template slot-scope="scope">
-	        <div>
-	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-	        </div>
-	      </template>
-      </el-table-column>
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <!-- 订单编号 -->
-      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 订单名称 -->
-      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 简称 -->
-      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true"></el-table-column>-->
-      <!-- 来源 -->
-      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" width="80px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.source == '1'">{{$t("runCenter.common.source.self")}}</el-tag>
-					<el-tag v-if="row.source == '2'" type="success">{{$t("runCenter.common.source.out")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 交货日期 -->
-      <el-table-column prop="deliveryTime" :label='$t("runCenter.table.oder.deliveryTime")' :show-overflow-tooltip="true"></el-table-column>
-      <!-- 启用状态 -->
-      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' align="center" width="90px">
-      	<template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <!-- 下单日期 -->
-      <el-table-column prop="orderTime" :label='$t("runCenter.table.oder.orderTime")' width="180px"></el-table-column>
-      <!-- 创建时间 -->
-      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' width="180px"></el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="60px"
-      >
-        <template slot-scope="{ row }">
-        	<el-tooltip class="item" :content='$t("runCenter.buttons.viewOrder")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-view table-operation"
-	            style="color: #87d068;"
-	            @click="view(row)"
-	          />
-          </el-tooltip>
-          <!--<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-edit table-operation"
-	            style="color: #2db7f5;"
-	            @click="edit(row)"
-	          />
-          </el-tooltip>
-          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
-	          <i
-	            class="el-icon-delete table-operation"
-	            style="color: #f50;"
-	            @click="singleDelete(row)"
-	          />
-          </el-tooltip>-->
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      :title='$t("common.preview")'
-      width="80%"
-      top="50px"
-      :visible.sync="preview.isVisible"
-    >
-      <el-scrollbar>
-        <div v-html="preview.context" />
-      </el-scrollbar>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	import TenantEdit from "./components/Edit"
-	import TenantView from "./components/View"
-	// 【订单管理】-API
-	import orderMgrApi from "@/api/runManageCenter/orderMgr"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
-	import axios from 'axios'
-	export default {
-	  name: "DraftOrder",
-	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView },
-	  props: {
-	  },
-	  data () {
-	    return {
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-	      tenantViewVisible: false,
-	      tableKey: 0,
-	      queryParams: initQueryParams({}),
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-	      dicts: {
-          NATION: {}
-        },
-	      enums: {
-	        TenantTypeEnum: {},
-	        TenantStatusEnum: {}
-	      },
-	      pickerOptions: {
-          shortcuts: [{
-            text: this.$t("common.timeArea.lastWeek"),
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: this.$t("common.timeArea.lastMonth"),
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit('pick', [start, end]);
-            }
-          }, {
-            text: this.$t("common.timeArea.lastThreeMonth"),
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit('pick', [start, end]);
-            }
-          }]
-        }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 加载列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	  	// 【提交审核】按钮-事件
-	    audioStatu(status){
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	// if (this.selection.length > 1) {
-	      //   this.$message({
-	      //     message: this.$t("tips.mustOne"),
-	      //     type: "warning"
-	      //   })
-	      //   return
-	      // }
-
-        const ids = []
-        this.selection.forEach(item => {
-          ids.push(item.id)
-        })
-
-	    	// 确认【提交审核】
-	    	this.$confirm(this.$t("tips.audioTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	// 调用API
-
-	    		this.audio(ids,status)
-	      }).catch(() => {})
-	    },
-	    // 【审核通过/审核不通过】接口-事件
-	    audio(ids,status){
-	    	if(!status){
-	    		status =  this.audioVal
-	    	}
-	    	// 赋值
-	    	this.selection[0].status = status
-	    	let msg = this.$t("common.audio.addAudioTips")
-	    	if(status == "2"){
-	    		msg = this.$t("common.audio.audioOk")+"!"
-	    	}
-	    	if(status == "3"){
-	    		msg = this.$t("common.audio.aduioFail")+"!"
-	    	}
-	    	orderMgrApi.updateStatus({ ids: ids, auditStatus: status}).then(response => {
-	        if (response.status == 200) {
-	        	// 如果是审核,成功后,关闭弹出框
-	        	if(status == '2' || status == '3'){
-	        		this.audioIsVisible = false
-	        		// 审核成功后,改成默认值
-	        		this.audioVal = '2'
-	        	}
-	          this.$message({
-	            message: msg,
-	            type: "success"
-	          })
-	          // 重新查询列表数据
-	          this.search()
-	          // 通知父组件,相关设置
-	          this.$emit("audioStatus", status)
-	          // 清除table的选择状态
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    viewClose () {
-	      this.tenantViewVisible = false
-	    },
-	    editClose () {
-	      this.dialog.isVisible = false
-	    },
-	    editSuccess () {
-	      this.search()
-	    },
-	    onSelectChange (selection) {
-	      this.selection = selection
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
-	    },
-	    reset () {
-	      this.queryParams = initQueryParams({})
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    add () {
-	      this.$refs.edit.type = "add"
-	      this.$refs.edit.setTenant(false, this.dicts)
-	      this.dialog.title = this.$t("common.add")
-	      this.dialog.isVisible = true
-	    },
-	    singleDelete (row) {
-	      this.$refs.table.clearSelection()
-	      this.$refs.table.toggleRowSelection(row, true)
-	      this.batchDelete()
-	    },
-	    batchDelete () {
-	      if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      this.$confirm(this.$t("runCenter.tips.orderTips"), this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	const ids = []
-		      this.selection.forEach(item => {
-		        ids.push(item.id)
-		      })
-		      this.delete(ids)
-	      }).catch(() => {})
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    delete (ids) {
-	      orderMgrApi.remove({ ids: ids }).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.$message({
-	            message: this.$t("tips.deleteSuccess"),
-	            type: "success"
-	          })
-	          this.search()
-	          // 清理已经删除的数据
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    /*view (row) {
-	      this.$refs.view.setTenant(row)
-	      this.tenantViewVisible = true
-	    },*/
-	    // 【修改】表头上Btn-事件
-	    editOne() {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.edit(this.selection[0]);
-	    },
-	    view (row) {
-	    	this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "view"
-	      this.dialog.title = this.$t("common.view")
-	      this.dialog.isVisible = true
-	    },
-	    edit (row) {
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "edit"
-	      this.dialog.title = this.$t("common.edit")
-	      this.dialog.isVisible = true
-	    },
-	    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.deliveryTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.deliveryTime_ed = this.queryParams.timeRange[1]
-	      }
-
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      // 查询必须参数-草稿:orderstatus = 1 and source = 1
-	      this.queryParams.model.orderStatus = '1'
-	      this.queryParams.model.source = '1'
-	      orderMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab4')
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-	    cellClick (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      this.selection.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table.toggleRowSelection(row)
-	        }
-	      })
-
-	      if (!flag) {
-	        this.$refs.table.toggleRowSelection(row, true)
-	      }
-	    }
-	  }
-	}
-</script>
-<style lang="scss" scoped></style>
+<template>
+  <div class="app-container">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>{{$t("runCenter.searchForm.bomName")}}:</span>
+    		<el-input v-model="queryParams.model.custDesc" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("runCenter.searchForm.orderNo")}}:</span>
+    		<el-input v-model="queryParams.model.orderNo" :placeholder='$t("common.pleaseEnter")' style="width: 120px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("runCenter.searchForm.deliveryTime")}}:</span>
+    		<el-date-picker
+		      v-model="queryParams.timeRange"
+		      type="daterange"
+		      :picker-options="pickerOptions"
+		      :range-separator='$t("common.separator")'
+		      :start-placeholder='$t("common.startTime")'
+		      :end-placeholder='$t("common.endTime")'
+		      format="yyyy-MM-dd"
+			    value-format="yyyy-MM-dd"
+		      align="right">
+		    </el-date-picker>
+    	</span>
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+
+    <!-- 功能按钮 -->
+    <el-row class="filter-container">
+    	<el-col>
+    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['order:add']" @click="add">{{ $t("common.add") }}</el-button>
+	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['order:update']" @click="editOne">
+	        {{ $t("common.edit") }}
+	      </el-button>
+	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['order:delete']" @click="orderDelete">
+	        {{ $t("table.delete") }}
+	      </el-button>
+	      <el-button type="primary" icon="el-icon-thumb" size="medium" v-has-permission="['order:pushaudit']" @click="audioStatu('1')">{{$t("common.audio.addAudio")}}</el-button>
+    	</el-col>
+    </el-row>
+
+		<!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+	      <template slot-scope="scope">
+	        <div>
+	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+	        </div>
+	      </template>
+      </el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <!-- 订单编号 -->
+      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 订单名称 -->
+      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 简称 -->
+      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true"></el-table-column>-->
+      <!-- 来源 -->
+      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" width="80px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.source == '1'">{{$t("runCenter.common.source.self")}}</el-tag>
+					<el-tag v-if="row.source == '2'" type="success">{{$t("runCenter.common.source.out")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 交货日期 -->
+      <el-table-column prop="deliveryTime" :label='$t("runCenter.table.oder.deliveryTime")' :show-overflow-tooltip="true"></el-table-column>
+      <!-- 启用状态 -->
+      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' align="center" width="90px">
+      	<template slot-scope="{ row }">
+          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
+          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!-- 下单日期 -->
+      <el-table-column prop="orderTime" :label='$t("runCenter.table.oder.orderTime")' width="180px"></el-table-column>
+      <!-- 创建时间 -->
+      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' width="180px"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="60px"
+      >
+        <template slot-scope="{ row }">
+        	<el-tooltip class="item" :content='$t("runCenter.buttons.viewOrder")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-view table-operation"
+	            style="color: #87d068;"
+	            @click="view(row)"
+	          />
+          </el-tooltip>
+          <!--<el-tooltip class="item" :content='$t("common.edit")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-edit table-operation"
+	            style="color: #2db7f5;"
+	            @click="edit(row)"
+	          />
+          </el-tooltip>
+          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-delete table-operation"
+	            style="color: #f50;"
+	            @click="singleDelete(row)"
+	          />
+          </el-tooltip>-->
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      :title='$t("common.preview")'
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	import TenantEdit from "./components/Edit"
+	import TenantView from "./components/View"
+	// 【订单管理】-API
+	import orderMgrApi from "@/api/runManageCenter/orderMgr"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	import axios from 'axios'
+	export default {
+	  name: "DraftOrder",
+	  directives: { elDragDialog },
+	  components: { Pagination, TenantEdit, TenantView },
+	  props: {
+	  },
+	  data () {
+	    return {
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      dicts: {
+          NATION: {}
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      },
+	      pickerOptions: {
+          shortcuts: [{
+            text: this.$t("common.timeArea.lastWeek"),
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: this.$t("common.timeArea.lastMonth"),
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: this.$t("common.timeArea.lastThreeMonth"),
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 加载列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	  	// 【提交审核】按钮-事件
+	    audioStatu(status){
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	// if (this.selection.length > 1) {
+	      //   this.$message({
+	      //     message: this.$t("tips.mustOne"),
+	      //     type: "warning"
+	      //   })
+	      //   return
+	      // }
+
+        const ids = []
+        this.selection.forEach(item => {
+          ids.push(item.id)
+        })
+
+	    	// 确认【提交审核】
+	    	this.$confirm(this.$t("tips.audioTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	// 调用API
+
+	    		this.audio(ids,status)
+	      }).catch(() => {})
+	    },
+	    // 【审核通过/审核不通过】接口-事件
+	    audio(ids,status){
+	    	if(!status){
+	    		status =  this.audioVal
+	    	}
+	    	// 赋值
+	    	this.selection[0].status = status
+	    	let msg = this.$t("common.audio.addAudioTips")
+	    	if(status == "2"){
+	    		msg = this.$t("common.audio.audioOk")+"!"
+	    	}
+	    	if(status == "3"){
+	    		msg = this.$t("common.audio.aduioFail")+"!"
+	    	}
+	    	orderMgrApi.updateStatus({ ids: ids, auditStatus: status}).then(response => {
+	        if (response.status == 200) {
+	        	// 如果是审核,成功后,关闭弹出框
+	        	if(status == '2' || status == '3'){
+	        		this.audioIsVisible = false
+	        		// 审核成功后,改成默认值
+	        		this.audioVal = '2'
+	        	}
+	          this.$message({
+	            message: msg,
+	            type: "success"
+	          })
+	          // 重新查询列表数据
+	          this.search()
+	          // 通知父组件,相关设置
+	          this.$emit("audioStatus", status)
+	          // 清除table的选择状态
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    viewClose () {
+	      this.tenantViewVisible = false
+	    },
+      // 验证是否选中数据-函数
+      checkData(){
+        let flag = true
+        if (!this.selection.length) {
+          this.$message({
+            message: this.$t("tips.noDataSelected"),
+            type: "warning"
+          })
+          flag = false
+        }
+        if (this.selection.length > 1) {
+          this.$message({
+            message: this.$t("tips.mustOne"),
+            type: "warning"
+          })
+          flag = false
+        }
+        return flag
+      },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+	    editSuccess () {
+	      this.search()
+	    },
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.$refs.edit.setTenant(false, this.dicts)
+	      this.dialog.title = this.$t("common.add")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("runCenter.tips.orderTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      this.selection.forEach(item => {
+		        ids.push(item.id)
+		      })
+		      this.delete(ids)
+	      }).catch(() => {})
+	    },
+
+
+      orderDelete(){
+        if(this.checkData()){
+          this.$confirm(this.$t("runCenter.tips.orderTips"), this.$t("common.tips"), {
+            distinguishCancelAndClose: true,
+            confirmButtonText: this.$t("common.confirm"),
+            cancelButtonText: this.$t("common.cancel"),
+            type: "warning"
+          }).then(() => {
+            let obj = {
+              id: this.selection[0].id
+            }
+            orderMgrApi.delete(obj).then(res => {
+              res = res.data
+              if (res.isSuccess) {
+                this.$message({
+                  message: this.$t('tips.optionSuccess'),
+                  type: 'success'
+                })
+                // 更新列表
+                this.search()
+                // 清理Table的选择数据
+                this.$refs.table.clearSelection()
+              }
+            })
+          }).catch(() => {})
+        }
+      },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      orderMgrApi.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    /*view (row) {
+	      this.$refs.view.setTenant(row)
+	      this.tenantViewVisible = true
+	    },*/
+	    // 【修改】表头上Btn-事件
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
+	    },
+	    view (row) {
+	    	this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "view"
+	      this.dialog.title = this.$t("common.view")
+	      this.dialog.isVisible = true
+	    },
+	    edit (row) {
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "edit"
+	      this.dialog.title = this.$t("common.edit")
+	      this.dialog.isVisible = true
+	    },
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.deliveryTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.deliveryTime_ed = this.queryParams.timeRange[1]
+	      }
+
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+	      // 查询必须参数-草稿:orderstatus = 1 and source = 1
+	      this.queryParams.model.orderStatus = '1'
+	      this.queryParams.model.source = '1'
+	      orderMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.total, 'tab4')
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    }
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>