姚云青 3 vuotta sitten
vanhempi
commit
0adc107b84

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

@@ -71,8 +71,8 @@
 	      </template>
       </el-table-column>
       <el-table-column align="center" type="selection" width="55px" :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="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>
       <!-- 简称 -->

+ 510 - 510
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/failAuditOrder/index.vue

@@ -1,510 +1,510 @@
-<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" @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" @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" style="width: 8%;"></el-table-column>
-      <!-- 订单名称 -->
-      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 10%;"></el-table-column>
-      <!-- 简称 -->
-      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
-      <!-- 来源 -->
-      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 8%;">
-      	<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" style="width: 12%;"></el-table-column>
-      <!-- 订单状态 -->
-      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 6%;">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
-	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 生产节拍 -->
-      <!--<el-table-column prop="rhythmType" :label='$t("runCenter.table.oder.rhythmType")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.rhythmType == '1'" type="success">{{$t("runCenter.common.rhythmType.auto")}}</el-tag>
-					<el-tag v-if="row.rhythmType == '2'">{{$t("runCenter.common.rhythmType.myself")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 计划 -->
-      <!--<el-table-column prop="planStatus" :label='$t("runCenter.table.oder.planStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.run")}}</el-tag>
-					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 排产 -->
-      <!--<el-table-column prop="schedulingStatus" :label='$t("runCenter.table.oder.schedulingStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.schedulingStatus == '1'" type="info">{{$t("runCenter.common.schedulingStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.schedulingStatus == '2'">{{$t("runCenter.common.schedulingStatus.run")}}</el-tag>
-					<el-tag v-if="row.schedulingStatus == '3'" type="success">{{$t("runCenter.common.schedulingStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 生产 -->
-      <!--<el-table-column prop="produceStatus" :label='$t("runCenter.table.oder.produceStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
-	      	<el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
-					<el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 审核状态 -->
-      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 8%;">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 启用状态 -->
-      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 10%;">
-      	<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")' style="width: 15%;"></el-table-column>
-      <!-- 创建时间 -->
-      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 15%;"></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 "../draftOrder/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("lineSide.tips.wareTips"), 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
-	      // 查询必须参数
-	      this.queryParams.model.auditStatus = '3'
-	      orderMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab3')
-	        }
-	        // 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" @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" @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" style="width: 8%;"></el-table-column>-->
+      <!-- 订单名称 -->
+      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 10%;"></el-table-column>
+      <!-- 简称 -->
+      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
+      <!-- 来源 -->
+      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 8%;">
+      	<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" style="width: 12%;"></el-table-column>
+      <!-- 订单状态 -->
+      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 6%;">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
+	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 生产节拍 -->
+      <!--<el-table-column prop="rhythmType" :label='$t("runCenter.table.oder.rhythmType")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.rhythmType == '1'" type="success">{{$t("runCenter.common.rhythmType.auto")}}</el-tag>
+					<el-tag v-if="row.rhythmType == '2'">{{$t("runCenter.common.rhythmType.myself")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 计划 -->
+      <!--<el-table-column prop="planStatus" :label='$t("runCenter.table.oder.planStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.run")}}</el-tag>
+					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 排产 -->
+      <!--<el-table-column prop="schedulingStatus" :label='$t("runCenter.table.oder.schedulingStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.schedulingStatus == '1'" type="info">{{$t("runCenter.common.schedulingStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.schedulingStatus == '2'">{{$t("runCenter.common.schedulingStatus.run")}}</el-tag>
+					<el-tag v-if="row.schedulingStatus == '3'" type="success">{{$t("runCenter.common.schedulingStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 生产 -->
+      <!--<el-table-column prop="produceStatus" :label='$t("runCenter.table.oder.produceStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
+	      	<el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
+					<el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 审核状态 -->
+      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 8%;">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 启用状态 -->
+      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 10%;">
+      	<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")' style="width: 15%;"></el-table-column>
+      <!-- 创建时间 -->
+      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 15%;"></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 "../draftOrder/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("lineSide.tips.wareTips"), 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
+	      // 查询必须参数
+	      this.queryParams.model.auditStatus = '3'
+	      orderMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.total, 'tab3')
+	        }
+	        // 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>

+ 3 - 3
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/finishedOrder/index.vue

@@ -65,8 +65,8 @@
 	      </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" style="width: 12%;"></el-table-column>
+      <!-- 订单编号
+      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>-->
       <!-- 订单名称 -->
       <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
       <!-- 交货日期 -->
@@ -522,7 +522,7 @@
           this.partsTracedBackCardVisible = false
       },
       //【工艺卡下载】按钮-事件
-      down(row){		  
+      down(row){
           this.planId = row.id
           this.rowData = row
           this.craftCardsVisible = true

+ 505 - 505
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/outNewOrder/index.vue

@@ -1,505 +1,505 @@
-<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" @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" @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="55px" :reserve-selection="true" />
-      <!-- 订单编号 -->
-      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
-      <!-- 订单名称 -->
-      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
-      <!-- 简称 -->
-      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
-      <!-- 来源 -->
-      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 8%;">
-      	<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" style="width: 12%;"></el-table-column>
-      <!-- 订单状态 -->
-      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 10%;">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
-	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 生产节拍 -->
-      <!--<el-table-column prop="rhythmType" :label='$t("runCenter.table.oder.rhythmType")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.rhythmType == '1'" type="success">{{$t("runCenter.common.rhythmType.auto")}}</el-tag>
-					<el-tag v-if="row.rhythmType == '2'">{{$t("runCenter.common.rhythmType.myself")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 计划 -->
-      <!--<el-table-column prop="planStatus" :label='$t("runCenter.table.oder.planStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.run")}}</el-tag>
-					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 排产 -->
-      <!--<el-table-column prop="schedulingStatus" :label='$t("runCenter.table.oder.schedulingStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.schedulingStatus == '1'" type="info">{{$t("runCenter.common.schedulingStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.schedulingStatus == '2'">{{$t("runCenter.common.schedulingStatus.run")}}</el-tag>
-					<el-tag v-if="row.schedulingStatus == '3'" type="success">{{$t("runCenter.common.schedulingStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 生产 -->
-      <!--<el-table-column prop="produceStatus" :label='$t("runCenter.table.oder.produceStatus")' :show-overflow-tooltip="true" width="100px">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
-	      	<el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
-					<el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
-					<el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
-				</template>
-      </el-table-column>-->
-      <!-- 审核状态 -->
-      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 8%;">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 启用状态 -->
-      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 8%;">
-      	<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")' style="width: 12%;"></el-table-column>
-      <!-- 创建时间 -->
-      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 12%;"></el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        style="width: 10%;"
-      >
-        <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 "../draftOrder/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
-	      }
-	    	// 确认【提交审核】
-	    	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(status)
-	      }).catch(() => {})
-	    },
-	    // 【审核通过/审核不通过】接口-事件
-	    audio(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({ id: this.selection[0].id, 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)
-	        }
-	      })
-	    },
-	    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("lineSide.tips.wareTips"), 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 = 2
-	      this.queryParams.model.orderStatus = '1'
-	      this.queryParams.model.source = '2'
-	      orderMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab5')
-	        }
-	        // 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" @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" @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="55px" :reserve-selection="true" />
+      <!-- 订单编号
+      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>-->
+      <!-- 订单名称 -->
+      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
+      <!-- 简称 -->
+      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
+      <!-- 来源 -->
+      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 8%;">
+      	<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" style="width: 12%;"></el-table-column>
+      <!-- 订单状态 -->
+      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 10%;">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
+	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 生产节拍 -->
+      <!--<el-table-column prop="rhythmType" :label='$t("runCenter.table.oder.rhythmType")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.rhythmType == '1'" type="success">{{$t("runCenter.common.rhythmType.auto")}}</el-tag>
+					<el-tag v-if="row.rhythmType == '2'">{{$t("runCenter.common.rhythmType.myself")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 计划 -->
+      <!--<el-table-column prop="planStatus" :label='$t("runCenter.table.oder.planStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.run")}}</el-tag>
+					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 排产 -->
+      <!--<el-table-column prop="schedulingStatus" :label='$t("runCenter.table.oder.schedulingStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.schedulingStatus == '1'" type="info">{{$t("runCenter.common.schedulingStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.schedulingStatus == '2'">{{$t("runCenter.common.schedulingStatus.run")}}</el-tag>
+					<el-tag v-if="row.schedulingStatus == '3'" type="success">{{$t("runCenter.common.schedulingStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 生产 -->
+      <!--<el-table-column prop="produceStatus" :label='$t("runCenter.table.oder.produceStatus")' :show-overflow-tooltip="true" width="100px">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.produceStatus == '0'" type="warning">{{$t("runCenter.common.produceStatus.panse")}}</el-tag>
+	      	<el-tag v-if="row.produceStatus == '1'" type="info">{{$t("runCenter.common.produceStatus.noStart")}}</el-tag>
+					<el-tag v-if="row.produceStatus == '2'">{{$t("runCenter.common.produceStatus.run")}}</el-tag>
+					<el-tag v-if="row.produceStatus == '3'" type="success">{{$t("runCenter.common.produceStatus.finished")}}</el-tag>
+				</template>
+      </el-table-column>-->
+      <!-- 审核状态 -->
+      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 8%;">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 启用状态 -->
+      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 8%;">
+      	<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")' style="width: 12%;"></el-table-column>
+      <!-- 创建时间 -->
+      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 12%;"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        style="width: 10%;"
+      >
+        <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 "../draftOrder/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
+	      }
+	    	// 确认【提交审核】
+	    	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(status)
+	      }).catch(() => {})
+	    },
+	    // 【审核通过/审核不通过】接口-事件
+	    audio(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({ id: this.selection[0].id, 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)
+	        }
+	      })
+	    },
+	    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("lineSide.tips.wareTips"), 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 = 2
+	      this.queryParams.model.orderStatus = '1'
+	      this.queryParams.model.source = '2'
+	      orderMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.total, 'tab5')
+	        }
+	        // 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>

+ 534 - 534
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/reviewedOrder/index.vue

@@ -1,534 +1,534 @@
-<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" @click="add">{{ $t("common.add") }}</el-button>
-	      <el-button type="success" icon="el-icon-edit" size="medium" @click="editOne">
-	        {{ $t("common.edit") }}
-	      </el-button>-->
-	      <!--<el-button type="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
-	        {{ $t("table.delete") }}
-	      </el-button>-->
-	      <el-button type="primary" icon="el-icon-suitcase" size="medium" v-has-permission="['order:audit']" @click="audioBtn">{{$t("common.audio.audio")}}</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="55px" :reserve-selection="true" />
-      <!-- 订单编号 -->
-      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 9%;"></el-table-column>
-      <!-- 订单名称 -->
-      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 9%;"></el-table-column>
-      <!-- 简称 -->
-      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
-      <!-- 来源 -->
-      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 9%;">
-      	<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" style="width: 9%;"></el-table-column>
-      <!-- 订单状态 -->
-      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 9%;">
-      	<template slot-scope="{ row }">
-      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
-	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
-					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 审核状态 -->
-      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 9%;">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
-					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 启用状态 -->
-      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 9%;">
-      	<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")' style="width: 9%;"></el-table-column>
-      <!-- 创建时间 -->
-      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 9%;"></el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        style="width: 10%;"
-      >
-        <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>
-
-    <!-- 【审核】弹出框 -->
-    <el-dialog
-      v-el-drag-dialog
-      :close-on-click-modal="false"
-      :close-on-press-escape="true"
-      :title='$t("prepare.buttons.audioBtn")'
-      width="400px"
-      top="150px"
-      :visible.sync="audioIsVisible"
-    >
-    	<template>
-    		<el-row>
-				  <el-radio v-model="audioVal" label="2">{{$t("common.audio.audioOk")}}</el-radio>
-				  <el-radio v-model="audioVal" label="3">{{$t("common.audio.aduioFail")}}</el-radio>
-			  </el-row>
-			  <el-row style="margin-top: 30px;text-align: center;">
-			  	<el-button plain type="primary" size="medium" @click="audioOk">
-		        {{ $t("common.confirm") }}
-		      </el-button>
-		      <el-button plain type="danger" size="medium" @click="colseAudio">
-		        {{ $t("common.cancel") }}
-		      </el-button>
-			  </el-row>
-			</template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	import TenantEdit from "../draftOrder/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 {
-	    	audioIsVisible: false,
-      	audioVal: '2', //默认【审核通过】
-	      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
-	      }
-	    	// 确认【提交审核】
-	    	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(status)
-	      }).catch(() => {})
-	    },
-	    // 【取消】审核按钮-事件
-	    colseAudio(){
-	    	this.audioIsVisible = false
-	    },
-	    // 【确定】审核按钮-事件
-	    audioOk(){
-	    	// 调用审核
-	    	this.audio(false)
-	    },
-	    // 【审核产品】-按钮事件
-	    audioBtn(){
-	    	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.audioIsVisible = true
-	    },
-	    // 【审核通过/审核不通过】接口-事件
-	    audio(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")+"!"
-	    	}
-        const ids = []
-        this.selection.forEach(item => {
-          ids.push(item.id)
-        })
-	    	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("lineSide.tips.wareTips"), 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
-	      // 查询必须参数
-	      this.queryParams.model.auditStatus = '1'
-	      orderMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab2')
-	        }
-	        // 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" @click="add">{{ $t("common.add") }}</el-button>
+	      <el-button type="success" icon="el-icon-edit" size="medium" @click="editOne">
+	        {{ $t("common.edit") }}
+	      </el-button>-->
+	      <!--<el-button type="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
+	        {{ $t("table.delete") }}
+	      </el-button>-->
+	      <el-button type="primary" icon="el-icon-suitcase" size="medium" v-has-permission="['order:audit']" @click="audioBtn">{{$t("common.audio.audio")}}</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="55px" :reserve-selection="true" />
+      <!-- 订单编号
+      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 9%;"></el-table-column>-->
+      <!-- 订单名称 -->
+      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 9%;"></el-table-column>
+      <!-- 简称 -->
+      <!--<el-table-column prop="custDesc" :label='$t("runCenter.table.oder.custDesc")' :show-overflow-tooltip="true" width="120px"></el-table-column>-->
+      <!-- 来源 -->
+      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" style="width: 9%;">
+      	<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" style="width: 9%;"></el-table-column>
+      <!-- 订单状态 -->
+      <el-table-column prop="orderStatus" :label='$t("runCenter.table.oder.orderStatus")' align="center" style="width: 9%;">
+      	<template slot-scope="{ row }">
+      		<el-tag v-if="row.orderStatus == '0'" type="info">{{$t("runCenter.common.orderStatus.zero")}}</el-tag>
+	      	<el-tag v-if="row.orderStatus == '1'" type="warn">{{$t("runCenter.common.orderStatus.one")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '2'" type="success">{{$t("runCenter.common.orderStatus.two")}}</el-tag>
+					<el-tag v-if="row.orderStatus == '3'" type="">{{$t("runCenter.common.orderStatus.three")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 审核状态 -->
+      <el-table-column prop="auditStatus" :label='$t("runCenter.table.oder.auditStatus")' align="center" style="width: 9%;">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.auditStatus == '1'" type="info">{{$t("common.audio.daiAudio")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '2'" type="success">{{$t("common.audio.audioOk")}}</el-tag>
+					<el-tag v-if="row.auditStatus == '3'" type="danger">{{$t("common.audio.aduioFail")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 启用状态 -->
+      <el-table-column prop="status" :label='$t("runCenter.table.oder.status")' :show-overflow-tooltip="true" style="width: 9%;">
+      	<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")' style="width: 9%;"></el-table-column>
+      <!-- 创建时间 -->
+      <el-table-column prop="createTime" :label='$t("runCenter.table.oder.createTime")' style="width: 9%;"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        style="width: 10%;"
+      >
+        <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>
+
+    <!-- 【审核】弹出框 -->
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      :title='$t("prepare.buttons.audioBtn")'
+      width="400px"
+      top="150px"
+      :visible.sync="audioIsVisible"
+    >
+    	<template>
+    		<el-row>
+				  <el-radio v-model="audioVal" label="2">{{$t("common.audio.audioOk")}}</el-radio>
+				  <el-radio v-model="audioVal" label="3">{{$t("common.audio.aduioFail")}}</el-radio>
+			  </el-row>
+			  <el-row style="margin-top: 30px;text-align: center;">
+			  	<el-button plain type="primary" size="medium" @click="audioOk">
+		        {{ $t("common.confirm") }}
+		      </el-button>
+		      <el-button plain type="danger" size="medium" @click="colseAudio">
+		        {{ $t("common.cancel") }}
+		      </el-button>
+			  </el-row>
+			</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	import TenantEdit from "../draftOrder/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 {
+	    	audioIsVisible: false,
+      	audioVal: '2', //默认【审核通过】
+	      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
+	      }
+	    	// 确认【提交审核】
+	    	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(status)
+	      }).catch(() => {})
+	    },
+	    // 【取消】审核按钮-事件
+	    colseAudio(){
+	    	this.audioIsVisible = false
+	    },
+	    // 【确定】审核按钮-事件
+	    audioOk(){
+	    	// 调用审核
+	    	this.audio(false)
+	    },
+	    // 【审核产品】-按钮事件
+	    audioBtn(){
+	    	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.audioIsVisible = true
+	    },
+	    // 【审核通过/审核不通过】接口-事件
+	    audio(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")+"!"
+	    	}
+        const ids = []
+        this.selection.forEach(item => {
+          ids.push(item.id)
+        })
+	    	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("lineSide.tips.wareTips"), 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
+	      // 查询必须参数
+	      this.queryParams.model.auditStatus = '1'
+	      orderMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.total, 'tab2')
+	        }
+	        // 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>

+ 508 - 508
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/PprogResource.vue

@@ -1,508 +1,508 @@
-<!-- 【订单管理-运行中-订单排产方案】 -->
-<template>
-	<div class="tabDiv">
-		<el-row>
-		  <el-col>
-		  	<!-- 时间,切换 -->
-		  	<div class="filter-container">
-		    	<span>
-		    		<span>{{$t("runCenter.searchForm.shuoming")}}:</span>
-		    		<el-radio-group v-model="cuurentDate" size="small">
-				      <el-radio-button label="week">{{$t("runCenter.common.week")}}</el-radio-button>
-				      <el-radio-button label="day">{{$t("runCenter.common.day")}}</el-radio-button>
-				    </el-radio-group>
-		    	</span>
-		    </div>
-		    <!-- 主要内容 -->
-		    <el-table
-		      :key="tableKey"
-		      ref="table"
-		      v-loading="loading"
-		      :data="tableData.data"
-		      fit
-		      class="noPaddingTable"
-		      style="width: 100%;"
-		    >
-		    	<el-table-column label="基础信息" align="center">
-			    	<!-- 序号 -->
-			    	<el-table-column :label='$t("common.serialNo")' width="50px" align="center">
-				      <template slot-scope="scope">
-				        <div>
-				          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-				        </div>
-				      </template>
-			      	</el-table-column>
-			      	<!-- 编号 -->
-			      	<el-table-column prop="code" label='编号' :show-overflow-tooltip="true" width="100px"></el-table-column>
-			      	<!-- 生产资源名称 -->
-			      	<el-table-column prop="name" label='生产资源名称' :show-overflow-tooltip="true" width="200px"></el-table-column>
-			    </el-table-column>
-		      	<el-table-column 
-		      		v-for="item in tableData.titleList" 
-		      		class-name="timeJD"
-		      		:key="item.id" 
-		      		:prop="item.field" 
-		      		:label='item.text' 
-		      		align="center" 
-		      		width="120px"
-		      	>
-				    <template slot-scope="{ row }">
-				    	<div v-for="obj in jsuanTime(row, item.text)">
-					    	<!-- 背景色条(10个)-->
-							<div class="timeDom">
-								<template v-for="child in obj.child">
-									<div v-if="child.isFull" class="timeItem tiActive"></div>
-									<div v-else class="timeItem"></div>
-								</template>
-							</div>
-							<!-- 备注文字 -->
-							<el-tooltip class="item" :content="obj.bomDesc +' / '+ obj.procedureNo +' / '+ obj.planTime" effect="dark" placement="top-start">
-								<div class="timeItemDesc" :style="{left: obj.leftNums+'%'}">
-									<div>{{ obj.bomDesc ? obj.bomDesc : '' }}</div>
-									<div>{{ obj.procedureNo ? obj.procedureNo : '' }}</div>
-									<div>{{ obj.planTime ? obj.planTime : '' }}</div>
-								</div>
-							</el-tooltip>
-						</div>
-						<!-- 中间虚线 -->
-						<div class="dashedDom"></div>
-				   </template>
-				</el-table-column>
-		    </el-table>
-		    
-		    <!-- 【分页】组件 -->
-		  	<pagination
-		      v-show="tableData.count > 0"
-		      :limit.sync="queryParams.size"
-		      :page.sync="queryParams.current"
-		      :total="Number(tableData.count)"
-		      @pagination="fetch"
-		    />
-		  </el-col>
-		</el-row>
-  	</div>
-</template>
-
-
-<script>
-// 【分页】组件
-import Pagination from "@/components/Pagination"
-// 【仓库类型管理】-API
-import warehouseTypeMgrApi from "@/api/modelingCenter/warehouseTypeMgr"
-// 【计划管理】-API
-import planMgrApi from "@/api/runManageCenter/planMgr"
-// 列表查询的共通参数
-import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'PprogTask',
-  components: { Pagination },
-  props: {
-  	type: String,
-  	orderData: Object,
-  },
-  data () {
-    return {
-    	titleData: [],  // table的动态表头数据
-    	qiyongStatus: [], //状态
-    	loading: false,
-    	tableKey: 0,
-    	cuurentDate: 'week',
-    	queryParams: initQueryParams({}),
-    	timeDomList: [], // 填充背景的时间数组
-      	tableData: {
-        	count: 0
-      	}
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  created() {
-  	// 初始化,填充数据
-  	this.initTimeDom();
-  	// 加载表头数据
-  	// this.creatTestData()
-  	// 加载列表数据
-  	// this.fetch()
-	},
-  computed: {
-  },
-  mounted () {
-  },
-  methods: {
-  	// 生产表头数据-函数
-  	creatTestData(){
-  		/*this.titleData = [
-    		{id: '100', text: '2020-10', 
-    			children: [
-    				{id: '10001' text: '1', weekObj: {id: '100001', field: 'week', text: '日'}},
-    				{id: '10002', text: '2', weekObj: {id: '100002', field: 'week2', text: '一'}},
-    				{id: '10003', text: '3', weekObj: {id: '100003', field: 'week3', text: '二'}},
-    				{id: '10004', text: '4', weekObj: {id: '100004', field: 'week4', text: '三'}},
-    				{id: '10005', text: '5', weekObj: {id: '100005', field: 'week5', text: '四'}},
-    				{id: '10006', text: '6', weekObj: {id: '100006', field: 'week6', text: '五'}},
-    				{id: '10007', text: '7', weekObj: {id: '100007', field: 'week7', text: '六'}},
-    				{id: '10008', text: '8', weekObj: {id: '100008', field: 'week8', text: '一'}},
-    				{id: '10009', text: '9', weekObj: {id: '100009', field: 'week9', text: '二'}},
-    				{id: '100010', text: '10', weekObj: {id: '1000010', field: 'week10', text: '三'}},
-    				{id: '100011', text: '11', weekObj: {id: '1000011', field: 'week11', text: '四'}},
-    				{id: '100012', text: '12', weekObj: {id: '1000012', field: 'week12', text: '五'}}
-    			]
-    		},
-    		{id: '102', text: '2020-11', 
-    			children: [
-    				{id: '10201' text: '1', weekObj: {id: '102001', field: 'week', text: '日'}},
-    				{id: '10202', text: '2', weekObj: {id: '102002', field: 'week2', text: '一'}},
-    				{id: '10203', text: '3', weekObj: {id: '102003', field: 'week3', text: '二'}},
-    				{id: '10204', text: '4', weekObj: {id: '102004', field: 'week4', text: '三'}},
-    				{id: '10205', text: '5', weekObj: {id: '102005', field: 'week5', text: '四'}},
-    				{id: '10206', text: '6', weekObj: {id: '102006', field: 'week6', text: '五'}},
-    				{id: '10207', text: '7', weekObj: {id: '102007', field: 'week7', text: '六'}},
-    				{id: '10208', text: '8', weekObj: {id: '102008', field: 'week8', text: '一'}},
-    				{id: '10209', text: '9', weekObj: {id: '102009', field: 'week9', text: '二'}},
-    				{id: '102010', text: '10', weekObj: {id: '1020010', field: 'week10', text: '三'}},
-    				{id: '102011', text: '11', weekObj: {id: '1020011', field: 'week11', text: '四'}},
-    				{id: '102012', text: '12', weekObj: {id: '1020012', field: 'week12', text: '五'}}
-    			]
-    		},
-    		{id: '103', text: '2020-12', 
-    			children: [
-    				{id: '10301' text: '1', weekObj: {id: '103001', field: 'week', text: '日'}},
-    				{id: '10302', text: '2', weekObj: {id: '103002', field: 'week2', text: '一'}},
-    				{id: '10303', text: '3', weekObj: {id: '103003', field: 'week3', text: '二'}},
-    				{id: '10304', text: '4', weekObj: {id: '103004', field: 'week4', text: '三'}},
-    				{id: '10305', text: '5', weekObj: {id: '103005', field: 'week5', text: '四'}},
-    				{id: '10306', text: '6', weekObj: {id: '103006', field: 'week6', text: '五'}},
-    				{id: '10307', text: '7', weekObj: {id: '103007', field: 'week7', text: '六'}},
-    				{id: '10308', text: '8', weekObj: {id: '103008', field: 'week8', text: '一'}},
-    				{id: '10309', text: '9', weekObj: {id: '103009', field: 'week9', text: '二'}},
-    				{id: '103010', text: '10', weekObj: {id: '1030010', field: 'week10', text: '三'}},
-    				{id: '103011', text: '11', weekObj: {id: '1030011', field: 'week11', text: '四'}},
-    				{id: '103012', text: '12', weekObj: {id: '1030012', field: 'week12', text: '五'}}
-    			]
-    		},
-    	],*/
-    	// 生产30条数据
-    	let list = []
-  		for(let i = 0; i < 3; i++){
-  			list.push({
-  				id: '100' + i,
-  				text: "2020-1" + i,
-  				children: []
-  			})
-  			for(let j = 1; j < 25; j++){
-  				let week = ""
-  				if(j == 1 || j%7 == 0){
-  					week = "日"
-  				}
-  				if(j == 2 || j%7 == 1){
-  					week = "一"
-  				}
-  				if(j == 3 || j%7 == 2){
-  					week = "二"
-  				}
-  				if(j == 4 || j%7 == 3){
-  					week = "三"
-  				}
-  				if(j == 5 || j%7 == 4){
-  					week = "四"
-  				}
-  				if(j == 6 || j%7 == 5){
-  					week = "五"
-  				}
-  				if(j == 7 || j%7 == 6){
-  					week = "六"
-  				}
-  				list[i].children.push({
-					id: '1000'+ j, 
-					text: ''+ j, 
-					weekObj: {
-						id: '10000'+ j, 
-						field: 'week'+ j, 
-						text: week
-					}
-  				})
-  			}
-  		}
-  		// 赋值
-  		this.titleData = list
-  		console.log("表头数据:", this.titleData)
-  	},
-  	
-  	// 初始化,填充数据
-  	initTimeDom() {
-  		for(let i = 0; i < 15; i++) {
-  			this.timeDomList.push({
-  				id: "WS"+ Math.random(),  // 随机数据
-  				isFull: false   // 是否填充颜色,默认不填充
-  				//planTime: '',  // 计划时间
-  				//procedureNo: '',  // 工序编码
-  				//bomDesc: '', // 零件的名称
-  			})
-  		}
-  	},
-  	
-  	/**
-  	 * [核心算法]-根据时间,技术模块
-  	 * row:数据
-  	 * time:时间节点
-  	 * */ 
-  	jsuanTime(row, time) {
-  		// 当前的时间
-  		// console.log("[核心算法]的数据feildTime: ",time);
-  		let arr = [{
-	  			planTime: '',  // 计划时间
-				procedureNo: '',  // 工序编码
-				bomDesc: '', // 零件的名称
-				leftNums: 6.66, // 文字偏移量
-				child: []
-			}
-  		]
-  		arr[0].child = JSON.parse(JSON.stringify(this.timeDomList));
-  		// let arr = JSON.parse(JSON.stringify(this.timeDomList));
-  		// 计算。该cell。是否需要,填充背景
-  		if(row.children && row.children.length > 0) {
-  			// 时间去。年月日部分"yyyy-MM-dd"
-  			let ymd = row.children[0].expectStartTime.substr(0,10);
-  			// cell的区间节点
-  			let filedTime = this.getHourSecend(ymd, time);
-  			row.children.map(item => {
-  				// 背景模块,开始时间
-  				let expectStartTime = this.getHourSecend(ymd, item.expectStartTime.substr(11,5));
-  				// 背景模块,截止时间
-  				let expectEndTime = this.getHourSecend(ymd, item.expectEndTime.substr(11,5));
-  				let flag = this.intervalInclusion([filedTime, filedTime + 30], [expectStartTime, expectEndTime]);
-  				// cell【包含-startEnd】在时间段中
-  				if(flag == '1') {
-  					// 文字偏移量
-  					let leftNums = 0;
-  					// console.log("时间点:",[filedTime, filedTime + 30], [expectStartTime, expectEndTime], flag, item);
-  					arr[0].child.forEach((obj, index) => {
-  						let modal = filedTime + (index+1)*2;
-						// 小模块,【被包含】在起止时间区间
-						if( modal <= expectEndTime && modal >= expectStartTime){
-							obj.isFull = true;
-							// 计算第一次值
-							if(!leftNums){
-								leftNums = index+1;
-							}
-						}
-					})
-  					arr[0].planTime = item.planTime;
-					arr[0].procedureNo = item.procedureNo;
-					arr[0].bomDesc = item.bomDesc;
-					arr[0].leftNums = leftNums*6.66;
-  				}
-  				// interval【有交集】终止点,在cell中,
-  				if(flag == '2') {
-  					arr[0].child.forEach((obj, index) => {
-						let modal = filedTime + (index+1)*2;
-						// 小模块,【有交集】终止点,在cell中,
-						if( modal <= expectEndTime){
-							obj.isFull = true;
-						}
-					})
-  				}
-  				
-  				// interval【有交集】起始点,在cell中
-  				if(flag == '3') {
-  					// 文字偏移量
-  					let leftNums = 0;
-  					arr[0].child.forEach((obj, index) => {
-						let modal = filedTime + (index+1)*2;
-						// 小模块,【有交集】起始点,在cell中
-						if( modal >= expectStartTime){
-							obj.isFull = true;
-							// 计算第一次值
-							if(!leftNums){
-								leftNums = index+1;
-							}
-						}
-					})
-					arr[0].planTime = item.planTime;
-					arr[0].procedureNo = item.procedureNo;
-					arr[0].bomDesc = item.bomDesc;
-					arr[0].leftNums = leftNums*6.66;
-  				}
-  				
-  				// cell【完全包含】,比cell大的多
-  				if(flag == '4') {
-  					arr[0].child.forEach((obj, index) => {
-						obj.isFull = true;
-					})
-  				}
-  			})
-  		}
-  		// console.log("[核心算法]的数据feildTime: ",objList);
-  		return arr;
-  	},
-  	
-  	
-	/**
-	 * 比较2个区间数据,是否包含
-	 * @param {Array} cell:需要检查的区间
-	 * @param {Array} startEnd:根区间。(startEnd是否包含于cell)
-	 * */
-	intervalInclusion(cell, startEnd){
-		// cell【包含-startEnd】,第二个参数,肯定是大于第一个参数的(固定)。
-		if (startEnd[0] >= cell[0] && startEnd[0] < cell[1] && startEnd[1] >cell[0] && startEnd[1] <=cell[1]) {
-			return "1";
-		} else {
-			// cell【有交集】终止点,在cell中,
-			if(startEnd[1] > cell[0] && startEnd[1] <= cell[1] && startEnd[0] < cell[0]) {
-				return "2";
-			} else if( startEnd[0] >= cell[0] && startEnd[0] < cell[1] && startEnd[1] > cell[1]){
-				// cell【有交集】起始点,在cell中
-				return "3";
-			} else if(cell[0] > startEnd[0] && cell[1] < startEnd[1]){
-				// cell【完全包含】,比cell大的多
-				return "4";
-			} else {
-				// cell【无关联】
-				return "0";
-			}
-		}
-	},
-
-  	// 获取当前时间的。小时和分钟
-  	getHourSecend(ymd, time) {
-  		let d = new Date(ymd+" "+time);
-  		// 把日期,统一转化成分钟数
-  		let seconds = d.getHours()*60 + d.getMinutes();
-  		return seconds;
-  	},
-  	
-    setTenant (val) {
-    	if(val){
-    		this.tenant = { ...val }
-    		// 加载列表数据
-    		this.fetch();
-    	}
-    },
-    // 当点击的时候,再加载,统计数据Echarts
-    setEcharts(){
-    	// 初始化统计数据
-    	this.$refs.echarts.echartsInit()
-    },
-    
-    fetch (params = {}) {
-      	this.loading = true
-      	if (this.queryParams.timeRange) {
-        	this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-        	this.queryParams.map.createTime_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
-      	// 参数
-	  	if(this.type == 'view'){
-	  		// 根据订单的id,查询数据
-      		this.queryParams.planId = this.tenant.id;
-	  	}else{
-	  		// 最新需求
-	  		this.queryParams.planIds = this.orderData.planIds;
-	  	}
-      
-      	planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	        	/*if(res.data.data && res.data.data.length > 0) {
-	        		res.data.data.forEach(item => {
-	        			item.id = 'wks'+ Math.random();
-	        		});
-	        	}*/
-	          	this.tableData = res.data;
-	          	// console.log("生产资源的数据-表头1245678:",this.tableData);
-	          	// this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
-	            // this.titleData = res.data.titleList;
-	        }
-        	// eslint-disable-next-line no-return-assign
-      	}).finally(() => this.loading = false)
-     
-    }
-  }
-}
-</script>
-
-<style>
-	/*计算时间的css-start*/
-	.el-table .timeJD .cell {
-		padding-top: 5px;
-		padding-left: 0;
-		padding-right: 0;
-	}
-	.el-table--border .timeJD.el-table__cell {
-		border-right: 0;
-	}
-	/*计算时间的css-end*/
-	.el-table.noPaddingTable th, .el-table.noPaddingTable td{
-		padding: 5px 0;
-	}
-	.el-table.noPaddingTable td.dateColumns{
-		vertical-align: bottom;
-	}
-	.el-table .dateColumns .cell{
-		padding: 0 3px;
-	}
-	.el-table--border td.dateColumns{
-		border-right: 2px dotted #AAAAAA;
-	}
-</style>
-
-<style lang="scss" scoped>
-	/*计算时间的css-start*/
-	.timeDom {
-		width: 100%;
-		.timeItem {
-			display: inline-block;
-			width: -moz-calc(100%/15);
-			width: -webkit-calc(100%/15);
-			width: calc(100%/15);
-			height: 70px;
-		}
-		.tiActive{
-			background: #CC9900;
-		}
-	}
-	.timeItemDesc {
-		position: absolute;
-		top: 18px;
-		left: 10px;
-		font-size: 12px;
-		line-height: 16px;
-		min-width: 120px;
-		color: white;
-		z-index: 999;
-		text-align: left;
-	}
-	.dashedDom {
-		position: absolute;
-		top: 0;
-		left: 50%;
-		height: 88px;
-		border-right: 1px dashed #1890ff;
-		z-index: 999;
-	}
-	/*计算时间的css-end*/
-	.tabDiv{
-		margin: 10px;
-	}
-	.bgDivCell{
-		width: 41px;
-		max-height: 100px;
-		overflow-y: scroll;
-	}
-	/*.srollDiv{
-		width: 40px;
-		height: 100%;
-		overflow-y: scroll;
-	}*/
-	.taskSpan{
-		display: block;
-		background: #13ae58;
-		width: 100%;
-		height: 10px;
-		margin: 2px 0;
-		-moz-border-radius: 5px;
-		-webkit-border-radius: 5px;
-		border-radius: 5px;
-	}
-</style>
+<!-- 【订单管理-运行中-订单排产方案】 -->
+<template>
+	<div class="tabDiv">
+		<el-row>
+		  <el-col>
+		  	<!-- 时间,切换 -->
+<!--		  	<div class="filter-container">-->
+<!--		    	<span>-->
+<!--		    		<span>{{$t("runCenter.searchForm.shuoming")}}:</span>-->
+<!--		    		<el-radio-group v-model="cuurentDate" size="small">-->
+<!--				      <el-radio-button label="week">{{$t("runCenter.common.week")}}</el-radio-button>-->
+<!--				      <el-radio-button label="day">{{$t("runCenter.common.day")}}</el-radio-button>-->
+<!--				    </el-radio-group>-->
+<!--		    	</span>-->
+<!--		    </div>-->
+		    <!-- 主要内容 -->
+		    <el-table
+		      :key="tableKey"
+		      ref="table"
+		      v-loading="loading"
+		      :data="tableData.data"
+		      fit
+		      class="noPaddingTable"
+		      style="width: 100%;"
+		    >
+		    	<el-table-column label="基础信息" align="center">
+			    	<!-- 序号 -->
+			    	<el-table-column :label='$t("common.serialNo")' width="50px" align="center">
+				      <template slot-scope="scope">
+				        <div>
+				          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+				        </div>
+				      </template>
+			      	</el-table-column>
+			      	<!-- 编号 -->
+			      	<el-table-column prop="code" label='编号' :show-overflow-tooltip="true" width="100px"></el-table-column>
+			      	<!-- 生产资源名称 -->
+			      	<el-table-column prop="name" label='生产资源名称' :show-overflow-tooltip="true" width="200px"></el-table-column>
+			    </el-table-column>
+		      	<el-table-column
+		      		v-for="item in tableData.titleList"
+		      		class-name="timeJD"
+		      		:key="item.id"
+		      		:prop="item.field"
+		      		:label='item.text'
+		      		align="center"
+		      		width="120px"
+		      	>
+				    <template slot-scope="{ row }">
+				    	<div v-for="obj in jsuanTime(row, item.text)">
+					    	<!-- 背景色条(10个)-->
+							<div class="timeDom">
+								<template v-for="child in obj.child">
+									<div v-if="child.isFull" class="timeItem tiActive"></div>
+									<div v-else class="timeItem"></div>
+								</template>
+							</div>
+							<!-- 备注文字 -->
+							<el-tooltip class="item" :content="obj.bomDesc +' / '+ obj.procedureNo +' / '+ obj.planTime" effect="dark" placement="top-start">
+								<div class="timeItemDesc" :style="{left: obj.leftNums+'%'}">
+									<div>{{ obj.bomDesc ? obj.bomDesc : '' }}</div>
+									<div>{{ obj.procedureNo ? obj.procedureNo : '' }}</div>
+									<div>{{ obj.planTime ? obj.planTime : '' }}</div>
+								</div>
+							</el-tooltip>
+						</div>
+						<!-- 中间虚线 -->
+						<div class="dashedDom"></div>
+				   </template>
+				</el-table-column>
+		    </el-table>
+
+		    <!-- 【分页】组件 -->
+		  	<pagination
+		      v-show="tableData.count > 0"
+		      :limit.sync="queryParams.size"
+		      :page.sync="queryParams.current"
+		      :total="Number(tableData.count)"
+		      @pagination="fetch"
+		    />
+		  </el-col>
+		</el-row>
+  	</div>
+</template>
+
+
+<script>
+// 【分页】组件
+import Pagination from "@/components/Pagination"
+// 【仓库类型管理】-API
+import warehouseTypeMgrApi from "@/api/modelingCenter/warehouseTypeMgr"
+// 【计划管理】-API
+import planMgrApi from "@/api/runManageCenter/planMgr"
+// 列表查询的共通参数
+import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'PprogTask',
+  components: { Pagination },
+  props: {
+  	type: String,
+  	orderData: Object,
+  },
+  data () {
+    return {
+    	titleData: [],  // table的动态表头数据
+    	qiyongStatus: [], //状态
+    	loading: false,
+    	tableKey: 0,
+    	cuurentDate: 'week',
+    	queryParams: initQueryParams({}),
+    	timeDomList: [], // 填充背景的时间数组
+      	tableData: {
+        	count: 0
+      	}
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+  	// 初始化,填充数据
+  	this.initTimeDom();
+  	// 加载表头数据
+  	// this.creatTestData()
+  	// 加载列表数据
+  	// this.fetch()
+	},
+  computed: {
+  },
+  mounted () {
+  },
+  methods: {
+  	// 生产表头数据-函数
+  	creatTestData(){
+  		/*this.titleData = [
+    		{id: '100', text: '2020-10',
+    			children: [
+    				{id: '10001' text: '1', weekObj: {id: '100001', field: 'week', text: '日'}},
+    				{id: '10002', text: '2', weekObj: {id: '100002', field: 'week2', text: '一'}},
+    				{id: '10003', text: '3', weekObj: {id: '100003', field: 'week3', text: '二'}},
+    				{id: '10004', text: '4', weekObj: {id: '100004', field: 'week4', text: '三'}},
+    				{id: '10005', text: '5', weekObj: {id: '100005', field: 'week5', text: '四'}},
+    				{id: '10006', text: '6', weekObj: {id: '100006', field: 'week6', text: '五'}},
+    				{id: '10007', text: '7', weekObj: {id: '100007', field: 'week7', text: '六'}},
+    				{id: '10008', text: '8', weekObj: {id: '100008', field: 'week8', text: '一'}},
+    				{id: '10009', text: '9', weekObj: {id: '100009', field: 'week9', text: '二'}},
+    				{id: '100010', text: '10', weekObj: {id: '1000010', field: 'week10', text: '三'}},
+    				{id: '100011', text: '11', weekObj: {id: '1000011', field: 'week11', text: '四'}},
+    				{id: '100012', text: '12', weekObj: {id: '1000012', field: 'week12', text: '五'}}
+    			]
+    		},
+    		{id: '102', text: '2020-11',
+    			children: [
+    				{id: '10201' text: '1', weekObj: {id: '102001', field: 'week', text: '日'}},
+    				{id: '10202', text: '2', weekObj: {id: '102002', field: 'week2', text: '一'}},
+    				{id: '10203', text: '3', weekObj: {id: '102003', field: 'week3', text: '二'}},
+    				{id: '10204', text: '4', weekObj: {id: '102004', field: 'week4', text: '三'}},
+    				{id: '10205', text: '5', weekObj: {id: '102005', field: 'week5', text: '四'}},
+    				{id: '10206', text: '6', weekObj: {id: '102006', field: 'week6', text: '五'}},
+    				{id: '10207', text: '7', weekObj: {id: '102007', field: 'week7', text: '六'}},
+    				{id: '10208', text: '8', weekObj: {id: '102008', field: 'week8', text: '一'}},
+    				{id: '10209', text: '9', weekObj: {id: '102009', field: 'week9', text: '二'}},
+    				{id: '102010', text: '10', weekObj: {id: '1020010', field: 'week10', text: '三'}},
+    				{id: '102011', text: '11', weekObj: {id: '1020011', field: 'week11', text: '四'}},
+    				{id: '102012', text: '12', weekObj: {id: '1020012', field: 'week12', text: '五'}}
+    			]
+    		},
+    		{id: '103', text: '2020-12',
+    			children: [
+    				{id: '10301' text: '1', weekObj: {id: '103001', field: 'week', text: '日'}},
+    				{id: '10302', text: '2', weekObj: {id: '103002', field: 'week2', text: '一'}},
+    				{id: '10303', text: '3', weekObj: {id: '103003', field: 'week3', text: '二'}},
+    				{id: '10304', text: '4', weekObj: {id: '103004', field: 'week4', text: '三'}},
+    				{id: '10305', text: '5', weekObj: {id: '103005', field: 'week5', text: '四'}},
+    				{id: '10306', text: '6', weekObj: {id: '103006', field: 'week6', text: '五'}},
+    				{id: '10307', text: '7', weekObj: {id: '103007', field: 'week7', text: '六'}},
+    				{id: '10308', text: '8', weekObj: {id: '103008', field: 'week8', text: '一'}},
+    				{id: '10309', text: '9', weekObj: {id: '103009', field: 'week9', text: '二'}},
+    				{id: '103010', text: '10', weekObj: {id: '1030010', field: 'week10', text: '三'}},
+    				{id: '103011', text: '11', weekObj: {id: '1030011', field: 'week11', text: '四'}},
+    				{id: '103012', text: '12', weekObj: {id: '1030012', field: 'week12', text: '五'}}
+    			]
+    		},
+    	],*/
+    	// 生产30条数据
+    	let list = []
+  		for(let i = 0; i < 3; i++){
+  			list.push({
+  				id: '100' + i,
+  				text: "2020-1" + i,
+  				children: []
+  			})
+  			for(let j = 1; j < 25; j++){
+  				let week = ""
+  				if(j == 1 || j%7 == 0){
+  					week = "日"
+  				}
+  				if(j == 2 || j%7 == 1){
+  					week = "一"
+  				}
+  				if(j == 3 || j%7 == 2){
+  					week = "二"
+  				}
+  				if(j == 4 || j%7 == 3){
+  					week = "三"
+  				}
+  				if(j == 5 || j%7 == 4){
+  					week = "四"
+  				}
+  				if(j == 6 || j%7 == 5){
+  					week = "五"
+  				}
+  				if(j == 7 || j%7 == 6){
+  					week = "六"
+  				}
+  				list[i].children.push({
+					id: '1000'+ j,
+					text: ''+ j,
+					weekObj: {
+						id: '10000'+ j,
+						field: 'week'+ j,
+						text: week
+					}
+  				})
+  			}
+  		}
+  		// 赋值
+  		this.titleData = list
+  		console.log("表头数据:", this.titleData)
+  	},
+
+  	// 初始化,填充数据
+  	initTimeDom() {
+  		for(let i = 0; i < 15; i++) {
+  			this.timeDomList.push({
+  				id: "WS"+ Math.random(),  // 随机数据
+  				isFull: false   // 是否填充颜色,默认不填充
+  				//planTime: '',  // 计划时间
+  				//procedureNo: '',  // 工序编码
+  				//bomDesc: '', // 零件的名称
+  			})
+  		}
+  	},
+
+  	/**
+  	 * [核心算法]-根据时间,技术模块
+  	 * row:数据
+  	 * time:时间节点
+  	 * */
+  	jsuanTime(row, time) {
+  		// 当前的时间
+  		// console.log("[核心算法]的数据feildTime: ",time);
+  		let arr = [{
+	  			planTime: '',  // 计划时间
+				procedureNo: '',  // 工序编码
+				bomDesc: '', // 零件的名称
+				leftNums: 6.66, // 文字偏移量
+				child: []
+			}
+  		]
+  		arr[0].child = JSON.parse(JSON.stringify(this.timeDomList));
+  		// let arr = JSON.parse(JSON.stringify(this.timeDomList));
+  		// 计算。该cell。是否需要,填充背景
+  		if(row.children && row.children.length > 0) {
+  			// 时间去。年月日部分"yyyy-MM-dd"
+  			let ymd = row.children[0].expectStartTime.substr(0,10);
+  			// cell的区间节点
+  			let filedTime = this.getHourSecend(ymd, time);
+  			row.children.map(item => {
+  				// 背景模块,开始时间
+  				let expectStartTime = this.getHourSecend(ymd, item.expectStartTime.substr(11,5));
+  				// 背景模块,截止时间
+  				let expectEndTime = this.getHourSecend(ymd, item.expectEndTime.substr(11,5));
+  				let flag = this.intervalInclusion([filedTime, filedTime + 30], [expectStartTime, expectEndTime]);
+  				// cell【包含-startEnd】在时间段中
+  				if(flag == '1') {
+  					// 文字偏移量
+  					let leftNums = 0;
+  					// console.log("时间点:",[filedTime, filedTime + 30], [expectStartTime, expectEndTime], flag, item);
+  					arr[0].child.forEach((obj, index) => {
+  						let modal = filedTime + (index+1)*2;
+						// 小模块,【被包含】在起止时间区间
+						if( modal <= expectEndTime && modal >= expectStartTime){
+							obj.isFull = true;
+							// 计算第一次值
+							if(!leftNums){
+								leftNums = index+1;
+							}
+						}
+					})
+  					arr[0].planTime = item.planTime;
+					arr[0].procedureNo = item.procedureNo;
+					arr[0].bomDesc = item.bomDesc;
+					arr[0].leftNums = leftNums*6.66;
+  				}
+  				// interval【有交集】终止点,在cell中,
+  				if(flag == '2') {
+  					arr[0].child.forEach((obj, index) => {
+						let modal = filedTime + (index+1)*2;
+						// 小模块,【有交集】终止点,在cell中,
+						if( modal <= expectEndTime){
+							obj.isFull = true;
+						}
+					})
+  				}
+
+  				// interval【有交集】起始点,在cell中
+  				if(flag == '3') {
+  					// 文字偏移量
+  					let leftNums = 0;
+  					arr[0].child.forEach((obj, index) => {
+						let modal = filedTime + (index+1)*2;
+						// 小模块,【有交集】起始点,在cell中
+						if( modal >= expectStartTime){
+							obj.isFull = true;
+							// 计算第一次值
+							if(!leftNums){
+								leftNums = index+1;
+							}
+						}
+					})
+					arr[0].planTime = item.planTime;
+					arr[0].procedureNo = item.procedureNo;
+					arr[0].bomDesc = item.bomDesc;
+					arr[0].leftNums = leftNums*6.66;
+  				}
+
+  				// cell【完全包含】,比cell大的多
+  				if(flag == '4') {
+  					arr[0].child.forEach((obj, index) => {
+						obj.isFull = true;
+					})
+  				}
+  			})
+  		}
+  		// console.log("[核心算法]的数据feildTime: ",objList);
+  		return arr;
+  	},
+
+
+	/**
+	 * 比较2个区间数据,是否包含
+	 * @param {Array} cell:需要检查的区间
+	 * @param {Array} startEnd:根区间。(startEnd是否包含于cell)
+	 * */
+	intervalInclusion(cell, startEnd){
+		// cell【包含-startEnd】,第二个参数,肯定是大于第一个参数的(固定)。
+		if (startEnd[0] >= cell[0] && startEnd[0] < cell[1] && startEnd[1] >cell[0] && startEnd[1] <=cell[1]) {
+			return "1";
+		} else {
+			// cell【有交集】终止点,在cell中,
+			if(startEnd[1] > cell[0] && startEnd[1] <= cell[1] && startEnd[0] < cell[0]) {
+				return "2";
+			} else if( startEnd[0] >= cell[0] && startEnd[0] < cell[1] && startEnd[1] > cell[1]){
+				// cell【有交集】起始点,在cell中
+				return "3";
+			} else if(cell[0] > startEnd[0] && cell[1] < startEnd[1]){
+				// cell【完全包含】,比cell大的多
+				return "4";
+			} else {
+				// cell【无关联】
+				return "0";
+			}
+		}
+	},
+
+  	// 获取当前时间的。小时和分钟
+  	getHourSecend(ymd, time) {
+  		let d = new Date(ymd+" "+time);
+  		// 把日期,统一转化成分钟数
+  		let seconds = d.getHours()*60 + d.getMinutes();
+  		return seconds;
+  	},
+
+    setTenant (val) {
+    	if(val){
+    		this.tenant = { ...val }
+    		// 加载列表数据
+    		this.fetch();
+    	}
+    },
+    // 当点击的时候,再加载,统计数据Echarts
+    setEcharts(){
+    	// 初始化统计数据
+    	this.$refs.echarts.echartsInit()
+    },
+
+    fetch (params = {}) {
+      	this.loading = true
+      	if (this.queryParams.timeRange) {
+        	this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+        	this.queryParams.map.createTime_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
+      	// 参数
+	  	if(this.type == 'view'){
+	  		// 根据订单的id,查询数据
+      		this.queryParams.planId = this.tenant.id;
+	  	}else{
+	  		// 最新需求
+	  		this.queryParams.planIds = this.orderData.planIds;
+	  	}
+
+      	planMgrApi.scheduleTaskByResource(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	        	/*if(res.data.data && res.data.data.length > 0) {
+	        		res.data.data.forEach(item => {
+	        			item.id = 'wks'+ Math.random();
+	        		});
+	        	}*/
+	          	this.tableData = res.data;
+	          	// console.log("生产资源的数据-表头1245678:",this.tableData);
+	          	// this.tableData.data = [{},{},{},{},{},{},{},{},{},{}];
+	            // this.titleData = res.data.titleList;
+	        }
+        	// eslint-disable-next-line no-return-assign
+      	}).finally(() => this.loading = false)
+
+    }
+  }
+}
+</script>
+
+<style>
+	/*计算时间的css-start*/
+	.el-table .timeJD .cell {
+		padding-top: 5px;
+		padding-left: 0;
+		padding-right: 0;
+	}
+	.el-table--border .timeJD.el-table__cell {
+		border-right: 0;
+	}
+	/*计算时间的css-end*/
+	.el-table.noPaddingTable th, .el-table.noPaddingTable td{
+		padding: 5px 0;
+	}
+	.el-table.noPaddingTable td.dateColumns{
+		vertical-align: bottom;
+	}
+	.el-table .dateColumns .cell{
+		padding: 0 3px;
+	}
+	.el-table--border td.dateColumns{
+		border-right: 2px dotted #AAAAAA;
+	}
+</style>
+
+<style lang="scss" scoped>
+	/*计算时间的css-start*/
+	.timeDom {
+		width: 100%;
+		.timeItem {
+			display: inline-block;
+			width: -moz-calc(100%/15);
+			width: -webkit-calc(100%/15);
+			width: calc(100%/15);
+			height: 70px;
+		}
+		.tiActive{
+			background: #CC9900;
+		}
+	}
+	.timeItemDesc {
+		position: absolute;
+		top: 18px;
+		left: 10px;
+		font-size: 12px;
+		line-height: 16px;
+		min-width: 120px;
+		color: white;
+		z-index: 999;
+		text-align: left;
+	}
+	.dashedDom {
+		position: absolute;
+		top: 0;
+		left: 50%;
+		height: 88px;
+		border-right: 1px dashed #1890ff;
+		z-index: 999;
+	}
+	/*计算时间的css-end*/
+	.tabDiv{
+		margin: 10px;
+	}
+	.bgDivCell{
+		width: 41px;
+		max-height: 100px;
+		overflow-y: scroll;
+	}
+	/*.srollDiv{
+		width: 40px;
+		height: 100%;
+		overflow-y: scroll;
+	}*/
+	.taskSpan{
+		display: block;
+		background: #13ae58;
+		width: 100%;
+		height: 10px;
+		margin: 2px 0;
+		-moz-border-radius: 5px;
+		-webkit-border-radius: 5px;
+		border-radius: 5px;
+	}
+</style>

+ 2 - 2
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/index.vue

@@ -111,8 +111,8 @@
 	      </template>
       </el-table-column>
       <el-table-column align="center" type="selection" style="width: 3%;" :reserve-selection="true" />
-      <!-- 订单编号 -->
-      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
+      <!-- 订单编号
+      <el-table-column prop="orderNo" :label='$t("runCenter.table.oder.orderNo")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column> -->
       <!-- 订单名称 -->
       <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" style="width: 12%;"></el-table-column>
       <!-- 交货日期 -->