Browse Source

修改字段

laoyao 3 năm trước cách đây
mục cha
commit
c8676c8d72

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

@@ -1,511 +1,511 @@
-<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="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
-	        {{ $t("table.delete") }}
-	      </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" width="180px"></el-table-column>
-      <!-- 订单名称 -->
-      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" width="180px"></el-table-column>
-      <!-- 交货日期 -->
-      <el-table-column prop="deliveryTime" :label='$t("runCenter.table.oder.deliveryTime")' :show-overflow-tooltip="true" width="160px"></el-table-column>
-      <!-- 来源 -->
-      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" width="80px">
-      	<template slot-scope="{ row }">
-	      	<el-tag v-if="row.source == '1'">{{$t("runCenter.common.source.self")}}</el-tag>
-					<el-tag v-if="row.source == '2'" type="success">{{$t("runCenter.common.source.out")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 零件 -->
-      <el-table-column prop="bomDesc" :label='$t("runCenter.table.oder.bomName")' :show-overflow-tooltip="true" width="100px"></el-table-column>
-      <!-- 产品代号 -->
-      <el-table-column prop="bomAlias" :label='$t("runCenter.table.oder.bomAlias")' :show-overflow-tooltip="true" width="100px"></el-table-column>
-     	<!-- 零件交货日期 -->
-      <el-table-column prop="pdeliveryTime" :label='$t("runCenter.table.oder.pdeliveryTime")' :show-overflow-tooltip="true" width="160px"></el-table-column>
-      <!-- 计划状态 -->
-      <el-table-column prop="planStatus" :label='$t("runCenter.table.plan.pStatus")' :show-overflow-tooltip="true" width="120" align="center">
-        <template slot-scope="{ row }">
-	      	<el-tag v-if="row.planStatus == '0'" type="warning">{{$t("runCenter.common.planStatus.zero")}}</el-tag>
-	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.one")}}</el-tag>
-					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.two")}}</el-tag>
-					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.three")}}</el-tag>
-				</template>
-      </el-table-column>
-      <!-- 计划进度 -->
-      <el-table-column prop="process" :label='$t("runCenter.table.plan.planProgress")' :show-overflow-tooltip="true" width="200">
-      	<template slot-scope="scope">
-		  		<!--<el-progress v-if="scope.row.jindu <= 25" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="exception"></el-progress>
-		  		<el-progress v-if="scope.row.jindu > 25 && scope.row.jindu <= 50" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="warning"></el-progress>-->
-		  		<el-progress :text-inside="true" :stroke-width="24" :percentage="scope.row.process"></el-progress>
-		  		<!--<el-progress v-if="scope.row.jindu > 80" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="success"></el-progress>-->
-		  	</template>
-      </el-table-column>
-      <!-- 排产 -->
-      <el-table-column prop="schedulingStatus" :label='$t("runCenter.table.plan.schedulingStatus")' :show-overflow-tooltip="true" width="120" align="center">
-      	<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.plan.produceStatus")' :show-overflow-tooltip="true" width="120" align="center">
-      	<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="prority" :label='$t("runCenter.table.plan.priority")' :show-overflow-tooltip="true" width="120"></el-table-column>
-      <!-- 零件总数 -->
-      <el-table-column prop="planBomNum" :label='$t("runCenter.table.oder.planAllNum")' :show-overflow-tooltip="true" width="80px">
-      	<!--<template slot-scope="scope">
-      		<div class="pointerCls" @click="view(scope.row)">{{ scope.row.planBomNum }}</div>
-      	</template>-->
-      </el-table-column>
-      <!-- 不合格数量 -->
-      <el-table-column prop="produceNum" :label='$t("runCenter.table.oder.buhegeNum")' :show-overflow-tooltip="true" width="100px"></el-table-column>
-      <!-- 已完成(数量) -->
-      <el-table-column prop="completeNum" :label='$t("runCenter.table.oder.completeNum")' :show-overflow-tooltip="true" width="80px"></el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="200px"
-      >
-        <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>
-          <a @click="down(row)" style="color: #2db7f5">导出工艺卡</a>
-        </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
-      :visible.sync="craftCardsVisible"
-      :title='$t("order.common.craftCardDialogName")'
-      width="80%"
-      custom-class="dialogNoTop"
-      @close="craftCardsClose"
-    >
-      <!--【工艺卡片】 -->
-      <craftCards
-        :row-data="rowData"
-        :order-id="orderId"
-        @close="craftCardsClose"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-	import Pagination from "@/components/Pagination"
-	import TenantEdit from "./components/Edit"
-	import TenantView from "./components/View"
-  import craftCards from "@/views/zuihou/runManageCenter/orderMgr/components/finishedOrder/components/craftCards/index"
-	// 【订单管理】-API
-	import orderMgrApi from "@/api/runManageCenter/orderMgr"
-	// 【计划管理】-API
-	import planMgrApi from "@/api/runManageCenter/planMgr"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import { initQueryParams } from '@/utils/commons'
-	export default {
-	  name: "DraftOrder",
-	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView ,craftCards},
-	  props: {
-	  },
-	  data () {
-	    return {
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-	      tenantViewVisible: false,
-        craftCardsVisible: false,
-	      tableKey: 0,
-        orderId:"",
-        rowData:{},
-	      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, audit_status: 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  = 3(当生产状态等于已完成的时候,同时设置订单状态已完成)
-	      // this.queryParams.model.orderStatus = '3'
-	      this.queryParams.model.planStatus = '3'
-	      planMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	          // 给列表设置条数
-	          this.$emit('setTabNums', res.data.total, 'tab6')
-	        }
-	        // 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)
-	      }
-	    },
-      craftCardsClose(){
-          this.craftCardsVisible = false
-      },
-      //【工艺卡下载】按钮-事件
-      down(row){
-          this.orderId = row.id
-          this.rowData = row
-          this.craftCardsVisible = 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="danger" icon="el-icon-delete" size="medium" @click="batchDelete">
+	        {{ $t("table.delete") }}
+	      </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" width="180px"></el-table-column>
+      <!-- 订单名称 -->
+      <el-table-column prop="orderName" :label='$t("runCenter.table.oder.orderName")' :show-overflow-tooltip="true" width="180px"></el-table-column>
+      <!-- 交货日期 -->
+      <el-table-column prop="deliveryTime" :label='$t("runCenter.table.oder.deliveryTime")' :show-overflow-tooltip="true" width="160px"></el-table-column>
+      <!-- 来源 -->
+      <el-table-column prop="source" :label='$t("runCenter.table.oder.source")' :show-overflow-tooltip="true" width="80px">
+      	<template slot-scope="{ row }">
+	      	<el-tag v-if="row.source == '1'">{{$t("runCenter.common.source.self")}}</el-tag>
+					<el-tag v-if="row.source == '2'" type="success">{{$t("runCenter.common.source.out")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 零件 -->
+      <el-table-column prop="bomDesc" :label='$t("runCenter.table.oder.bomName")' :show-overflow-tooltip="true" width="100px"></el-table-column>
+      <!-- 产品代号 -->
+      <el-table-column prop="bomAlias" :label='$t("runCenter.table.oder.bomAlias")' :show-overflow-tooltip="true" width="100px"></el-table-column>
+     	<!-- 零件交货日期 -->
+      <el-table-column prop="pdeliveryTime" :label='$t("runCenter.table.oder.pdeliveryTime")' :show-overflow-tooltip="true" width="160px"></el-table-column>
+      <!-- 计划状态 -->
+      <el-table-column prop="planStatus" :label='$t("runCenter.table.plan.pStatus")' :show-overflow-tooltip="true" width="120" align="center">
+        <template slot-scope="{ row }">
+	      	<el-tag v-if="row.planStatus == '0'" type="warning">{{$t("runCenter.common.planStatus.zero")}}</el-tag>
+	      	<el-tag v-if="row.planStatus == '1'" type="info">{{$t("runCenter.common.planStatus.one")}}</el-tag>
+					<el-tag v-if="row.planStatus == '2'">{{$t("runCenter.common.planStatus.two")}}</el-tag>
+					<el-tag v-if="row.planStatus == '3'" type="success">{{$t("runCenter.common.planStatus.three")}}</el-tag>
+				</template>
+      </el-table-column>
+      <!-- 计划进度 -->
+<!--      <el-table-column prop="process" :label='$t("runCenter.table.plan.planProgress")' :show-overflow-tooltip="true" width="200">-->
+<!--      	<template slot-scope="scope">-->
+<!--		  		&lt;!&ndash;<el-progress v-if="scope.row.jindu <= 25" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="exception"></el-progress>-->
+<!--		  		<el-progress v-if="scope.row.jindu > 25 && scope.row.jindu <= 50" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="warning"></el-progress>&ndash;&gt;-->
+<!--		  		<el-progress :text-inside="true" :stroke-width="24" :percentage="scope.row.process"></el-progress>-->
+<!--		  		&lt;!&ndash;<el-progress v-if="scope.row.jindu > 80" :text-inside="true" :stroke-width="24" :percentage="scope.row.jindu" status="success"></el-progress>&ndash;&gt;-->
+<!--		  	</template>-->
+<!--      </el-table-column>-->
+<!--      &lt;!&ndash; 排产 &ndash;&gt;-->
+<!--      <el-table-column prop="schedulingStatus" :label='$t("runCenter.table.plan.schedulingStatus")' :show-overflow-tooltip="true" width="120" align="center">-->
+<!--      	<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>-->
+<!--      &lt;!&ndash; 生产 &ndash;&gt;-->
+<!--      <el-table-column prop="produceStatus" :label='$t("runCenter.table.plan.produceStatus")' :show-overflow-tooltip="true" width="120" align="center">-->
+<!--      	<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>-->
+<!--      &lt;!&ndash; 优先级 &ndash;&gt;-->
+<!--      <el-table-column prop="prority" :label='$t("runCenter.table.plan.priority")' :show-overflow-tooltip="true" width="120"></el-table-column>-->
+      <!-- 零件总数 -->
+      <el-table-column prop="planBomNum" :label='$t("runCenter.table.oder.planAllNum")' :show-overflow-tooltip="true" width="80px">
+      	<!--<template slot-scope="scope">
+      		<div class="pointerCls" @click="view(scope.row)">{{ scope.row.planBomNum }}</div>
+      	</template>-->
+      </el-table-column>
+      <!-- 不合格数量 -->
+      <el-table-column prop="produceNum" :label='$t("runCenter.table.oder.buhegeNum")' :show-overflow-tooltip="true" width="100px"></el-table-column>
+      <!-- 已完成(数量) -->
+      <el-table-column prop="completeNum" :label='$t("runCenter.table.oder.completeNum")' :show-overflow-tooltip="true" width="80px"></el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="200px"
+      >
+        <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>
+          <a @click="down(row)" style="color: #2db7f5">导出工艺卡</a>
+        </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
+      :visible.sync="craftCardsVisible"
+      :title='$t("order.common.craftCardDialogName")'
+      width="80%"
+      custom-class="dialogNoTop"
+      @close="craftCardsClose"
+    >
+      <!--【工艺卡片】 -->
+      <craftCards
+        :row-data="rowData"
+        :order-id="orderId"
+        @close="craftCardsClose"
+      />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import Pagination from "@/components/Pagination"
+	import TenantEdit from "./components/Edit"
+	import TenantView from "./components/View"
+  import craftCards from "@/views/zuihou/runManageCenter/orderMgr/components/finishedOrder/components/craftCards/index"
+	// 【订单管理】-API
+	import orderMgrApi from "@/api/runManageCenter/orderMgr"
+	// 【计划管理】-API
+	import planMgrApi from "@/api/runManageCenter/planMgr"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { initQueryParams } from '@/utils/commons'
+	export default {
+	  name: "DraftOrder",
+	  directives: { elDragDialog },
+	  components: { Pagination, TenantEdit, TenantView ,craftCards},
+	  props: {
+	  },
+	  data () {
+	    return {
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+	      tenantViewVisible: false,
+        craftCardsVisible: false,
+	      tableKey: 0,
+        orderId:"",
+        rowData:{},
+	      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, audit_status: 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  = 3(当生产状态等于已完成的时候,同时设置订单状态已完成)
+	      // this.queryParams.model.orderStatus = '3'
+	      this.queryParams.model.planStatus = '3'
+	      planMgrApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	          // 给列表设置条数
+	          this.$emit('setTabNums', res.data.total, 'tab6')
+	        }
+	        // 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)
+	      }
+	    },
+      craftCardsClose(){
+          this.craftCardsVisible = false
+      },
+      //【工艺卡下载】按钮-事件
+      down(row){
+          this.orderId = row.id
+          this.rowData = row
+          this.craftCardsVisible = true
+      },
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>

+ 261 - 261
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/components/ProductionProgramme.vue

@@ -1,261 +1,261 @@
-<template>
-  <el-dialog
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    :title="title"
-    :append-to-body="true"
-    :visible.sync="isVisible"
-    width="90%"
-    top="50px"
-  >
-    <!-- 简单介绍信息 -->
-    <p class="tipsP">
-      本次方案共生成{{ counts }}个任务
-    </p>
-
-    <!-- 功能按钮 -->
-    <el-row
-      class="posionDiv"
-    >
-      <el-col align="right">
-        <el-button
-          v-if="activeTab == 'resource'"
-          type="primary"
-          icon="el-icon-plus"
-          size="medium"
-          @click=""
-        >
-          {{ $t("runCenter.buttons.prodMod") }}
-        </el-button>
-        <!--        <el-button-->
-        <!--          v-if="activeTab != 'resource'"-->
-        <!--          type="primary"-->
-        <!--          icon="el-icon-plus"-->
-        <!--          size="medium"-->
-        <!--          @click=""-->
-        <!--        >-->
-        <!--          {{ $t("runCenter.buttons.diaoduMod") }}-->
-        <!--        </el-button>-->
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="medium"
-          @click="oneProdBtn"
-        >
-          {{ $t("runCenter.buttons.oneProd") }}
-        </el-button>
-        <el-button
-          plain
-          type="warning"
-          icon="el-icon-close"
-          size="medium"
-          @click="isVisible = false"
-        >
-          {{ $t('common.cancel') }}
-        </el-button>
-      </el-col>
-    </el-row>
-
-    <!-- 列表数据 -->
-    <el-tabs
-      v-model="activeTab"
-      class="noTabPadding"
-      type="border-card"
-      @tab-click="tabClick"
-    >
-      <el-tab-pane name="resource" :label='$t("runCenter.common.viewTab1")'>
-		  	<!-- 【按生产资源查看】 -->
-		  	<pprog-resource ref="resource" :type="type" :order-data="tenant"></pprog-resource>
-		  </el-tab-pane>
-      <el-tab-pane
-        name="order"
-        :label="$t(&quot;runCenter.common.viewTab2&quot;)"
-      >
-        <!-- 【按订单查看】 -->
-        <pprog-order
-          ref="order"
-          :type="type"
-          :order-data="tenant"
-        />
-      </el-tab-pane>
-      <el-tab-pane
-        name="task"
-        :label="$t(&quot;runCenter.common.viewTab3&quot;)"
-      >
-        <!--【按任务查看】-->
-        <pprog-task
-          ref="task"
-          :type="type"
-          :order-data="tenant"
-          @setCount="setCount"
-        />
-      </el-tab-pane>
-    </el-tabs>
-  </el-dialog>
-</template>
-
-<script>
-// 【夹具管理】-API
-import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
-// 【分页】组件
-import Pagination from "@/components/Pagination"
-// 【按生产资源查看】组件
-import PprogResource from "./PprogResource"
-// 【按订单查看】组件
-import PprogOrder from "./PprogOrder"
-// 【按任务查看】组件
-import PprogTask from "./PprogTask"
-// 【订单管理】-API
-import orderMgrApi from "@/api/runManageCenter/orderMgr"
-// 【共通】函数
-import { initQueryParams } from '@/utils/commons'
-export default {
-  name: 'TenantEdit',
-  components: { Pagination, PprogResource, PprogOrder, PprogTask },
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    },
-    title: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-    return {
-    	counts: 0,
-    	activeTab: "task",  // 默认选择的tab(草稿)
-    	loading: false,
-      type: 'add',
-      orderList: [], // 列表选中的【订单数据】
-      screenWidth: 0,
-      width: this.initWidth(),
-      confirmDisabled: false,
-      tenant: {}
-    }
-  },
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-      }
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  created() {
-	},
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-  	// 回填,任务数量
-  	setCount(val) {
-    	this.counts = val
-    },
-
-  	tabClick(e){
-  		console.log("被选择的tab:", e.index)
-  		// 如果点击的是【生产资源任务】 resource
-  		/*if(e.index == '0'){
-  			this.$refs.resource.setEcharts();
-  		}*/
-  		/*// 订单
-  		if(e.index == '1'){
-  			// 加载列表数据
-  			this.$refs.order.fetch()
-  		}
-  		// 任务
-  		if(e.index == '2'){
-  			// 加载列表数据
-  			this.$refs.task.getPageList()
-  		}*/
-  	},
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 991) {
-        return '90%'
-      } else if (this.screenWidth < 1400) {
-        return '45%'
-      } else {
-        return '800px'
-      }
-    },
-    setTenant (val) {
-    	if(val){
-    		this.tenant = { ...val }
-    		// 查询【按任务查询】数据
-    		this.$nextTick(() => {
-    			if(this.$refs.task) {
-    				this.$refs.task.setTenant(val)
-    			}
-    			if(this.$refs.order) {
-    				// 加载列表数据-订单数据
-  					this.$refs.order.setTenant(val)
-    			}
-  				if(this.$refs.resource) {
-    				// 加载【按生产资源查看】
-  					this.$refs.resource.setTenant(val);
-    			}
-    		})
-    	}
-    },
-    close () {
-      this.$emit('close')
-    },
-    // 重置-函数
-    reset(){
-    	// 把数据清空
-    	this.$refs.task.tableData.records = []
-    },
-    // 【一键生产】按钮-事件
-    oneProdBtn(){
-    	let obj = {
-    		orderList: this.tenant.orderList
-    	}
-    	if(this.type == 'view') {
-    		obj.planId = this.tenant.id;
-    	} else {
-    		obj.planIds = this.tenant.planIds;
-    	}
-    	orderMgrApi.confirmSchedule(obj).then(res => {
-    		res = res.data
-    		console.log("【一键生产】按钮: ", res)
-    		if(res.isSuccess){
-    			this.$message({
-	          message: this.$t('tips.optionSuccess'),
-	          type: 'success'
-	        })
-    			// 传值父组件
-    			this.$emit("frashNums", "1000")
-    			// 刷新当前页面列表数据
-    			this.$emit("success")
-    			// 成功关闭弹出框
-    			this.close()
-    		}
-    	})
-    }
-  }
-}
-</script>
-
-<style type="text/css">
-
-</style>
-<style lang="scss" scoped>
-	.tipsP{
-		margin-top: 0;
-	}
-	.posionDiv{
-		position: absolute;
-		right: 20px;
-		z-index: 99;
-	}
-</style>
+<template>
+  <el-dialog
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :title="title"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    width="90%"
+    top="50px"
+  >
+    <!-- 简单介绍信息 -->
+    <p class="tipsP">
+      本次方案共生成{{ counts }}个任务
+    </p>
+
+    <!-- 功能按钮 -->
+    <el-row
+      class="posionDiv"
+    >
+      <el-col align="right">
+<!--        <el-button-->
+<!--          v-if="activeTab == 'resource'"-->
+<!--          type="primary"-->
+<!--          icon="el-icon-plus"-->
+<!--          size="medium"-->
+<!--          @click=""-->
+<!--        >-->
+<!--          {{ $t("runCenter.buttons.prodMod") }}-->
+<!--        </el-button>-->
+        <!--        <el-button-->
+        <!--          v-if="activeTab != 'resource'"-->
+        <!--          type="primary"-->
+        <!--          icon="el-icon-plus"-->
+        <!--          size="medium"-->
+        <!--          @click=""-->
+        <!--        >-->
+        <!--          {{ $t("runCenter.buttons.diaoduMod") }}-->
+        <!--        </el-button>-->
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="medium"
+          @click="oneProdBtn"
+        >
+          {{ $t("runCenter.buttons.oneProd") }}
+        </el-button>
+        <el-button
+          plain
+          type="warning"
+          icon="el-icon-close"
+          size="medium"
+          @click="isVisible = false"
+        >
+          {{ $t('common.cancel') }}
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <!-- 列表数据 -->
+    <el-tabs
+      v-model="activeTab"
+      class="noTabPadding"
+      type="border-card"
+      @tab-click="tabClick"
+    >
+      <el-tab-pane name="resource" :label='$t("runCenter.common.viewTab1")'>
+		  	<!-- 【按生产资源查看】 -->
+		  	<pprog-resource ref="resource" :type="type" :order-data="tenant"></pprog-resource>
+		  </el-tab-pane>
+      <el-tab-pane
+        name="order"
+        :label="$t(&quot;runCenter.common.viewTab2&quot;)"
+      >
+        <!-- 【按订单查看】 -->
+        <pprog-order
+          ref="order"
+          :type="type"
+          :order-data="tenant"
+        />
+      </el-tab-pane>
+      <el-tab-pane
+        name="task"
+        :label="$t(&quot;runCenter.common.viewTab3&quot;)"
+      >
+        <!--【按任务查看】-->
+        <pprog-task
+          ref="task"
+          :type="type"
+          :order-data="tenant"
+          @setCount="setCount"
+        />
+      </el-tab-pane>
+    </el-tabs>
+  </el-dialog>
+</template>
+
+<script>
+// 【夹具管理】-API
+import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
+// 【分页】组件
+import Pagination from "@/components/Pagination"
+// 【按生产资源查看】组件
+import PprogResource from "./PprogResource"
+// 【按订单查看】组件
+import PprogOrder from "./PprogOrder"
+// 【按任务查看】组件
+import PprogTask from "./PprogTask"
+// 【订单管理】-API
+import orderMgrApi from "@/api/runManageCenter/orderMgr"
+// 【共通】函数
+import { initQueryParams } from '@/utils/commons'
+export default {
+  name: 'TenantEdit',
+  components: { Pagination, PprogResource, PprogOrder, PprogTask },
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+    	counts: 0,
+    	activeTab: "task",  // 默认选择的tab(草稿)
+    	loading: false,
+      type: 'add',
+      orderList: [], // 列表选中的【订单数据】
+      screenWidth: 0,
+      width: this.initWidth(),
+      confirmDisabled: false,
+      tenant: {}
+    }
+  },
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+      }
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+	},
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+  	// 回填,任务数量
+  	setCount(val) {
+    	this.counts = val
+    },
+
+  	tabClick(e){
+  		console.log("被选择的tab:", e.index)
+  		// 如果点击的是【生产资源任务】 resource
+  		/*if(e.index == '0'){
+  			this.$refs.resource.setEcharts();
+  		}*/
+  		/*// 订单
+  		if(e.index == '1'){
+  			// 加载列表数据
+  			this.$refs.order.fetch()
+  		}
+  		// 任务
+  		if(e.index == '2'){
+  			// 加载列表数据
+  			this.$refs.task.getPageList()
+  		}*/
+  	},
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setTenant (val) {
+    	if(val){
+    		this.tenant = { ...val }
+    		// 查询【按任务查询】数据
+    		this.$nextTick(() => {
+    			if(this.$refs.task) {
+    				this.$refs.task.setTenant(val)
+    			}
+    			if(this.$refs.order) {
+    				// 加载列表数据-订单数据
+  					this.$refs.order.setTenant(val)
+    			}
+  				if(this.$refs.resource) {
+    				// 加载【按生产资源查看】
+  					this.$refs.resource.setTenant(val);
+    			}
+    		})
+    	}
+    },
+    close () {
+      this.$emit('close')
+    },
+    // 重置-函数
+    reset(){
+    	// 把数据清空
+    	this.$refs.task.tableData.records = []
+    },
+    // 【一键生产】按钮-事件
+    oneProdBtn(){
+    	let obj = {
+    		orderList: this.tenant.orderList
+    	}
+    	if(this.type == 'view') {
+    		obj.planId = this.tenant.id;
+    	} else {
+    		obj.planIds = this.tenant.planIds;
+    	}
+    	orderMgrApi.confirmSchedule(obj).then(res => {
+    		res = res.data
+    		console.log("【一键生产】按钮: ", res)
+    		if(res.isSuccess){
+    			this.$message({
+	          message: this.$t('tips.optionSuccess'),
+	          type: 'success'
+	        })
+    			// 传值父组件
+    			this.$emit("frashNums", "1000")
+    			// 刷新当前页面列表数据
+    			this.$emit("success")
+    			// 成功关闭弹出框
+    			this.close()
+    		}
+    	})
+    }
+  }
+}
+</script>
+
+<style type="text/css">
+
+</style>
+<style lang="scss" scoped>
+	.tipsP{
+		margin-top: 0;
+	}
+	.posionDiv{
+		position: absolute;
+		right: 20px;
+		z-index: 99;
+	}
+</style>