|
@@ -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">-->
|
|
|
+<!-- <!–<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>
|