|
@@ -1,6 +1,12 @@
|
|
<!-- 首序外协 -->
|
|
<!-- 首序外协 -->
|
|
<template>
|
|
<template>
|
|
- <el-drawer title="首序外协信息" :with-header="false" v-model="visible" direction="rtl" size="100%">
|
|
|
|
|
|
+ <el-drawer
|
|
|
|
+ title="首序外协信息"
|
|
|
|
+ :with-header="false"
|
|
|
|
+ v-model="visible"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ size="100%"
|
|
|
|
+ >
|
|
<div class="form-container column-container">
|
|
<div class="form-container column-container">
|
|
<div class="form-btns-container">
|
|
<div class="form-btns-container">
|
|
<span class="title-label">
|
|
<span class="title-label">
|
|
@@ -10,41 +16,87 @@
|
|
<span>外协单信息</span>
|
|
<span>外协单信息</span>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
- <el-button v-show="editStatus && form.isSubmit == 1" type="primary" icon="Download" @click="handleExport"
|
|
|
|
- v-hasPermi="['business:firstOutsource:export']">导出</el-button>
|
|
|
|
- <el-button v-show="editStatus && form.isSubmit == 1" type="warning" icon="Download" @click="handlePrint"
|
|
|
|
- v-hasPermi="['business:firstOutsource:export']">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="editStatus && form.isSubmit == 1"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Download"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-hasPermi="['business:firstOutsource:export']"
|
|
|
|
+ >导出</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="editStatus && form.isSubmit == 1"
|
|
|
|
+ type="warning"
|
|
|
|
+ icon="Download"
|
|
|
|
+ @click="handlePrint"
|
|
|
|
+ v-hasPermi="['business:firstOutsource:export']"
|
|
|
|
+ >
|
|
打印
|
|
打印
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-if="editStatus" type="primary" icon="Finished" @click="handleSubmit">保存</el-button>
|
|
|
|
- <el-button v-if="editStatus && form.isSubmit == 1" type="info" icon="Calendar"
|
|
|
|
- @click="handleViewRecords">历史记录</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Finished"
|
|
|
|
+ @click="handleSubmit"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="editStatus && form.isSubmit == 1"
|
|
|
|
+ type="info"
|
|
|
|
+ icon="Calendar"
|
|
|
|
+ @click="handleViewRecords"
|
|
|
|
+ >历史记录</el-button
|
|
|
|
+ >
|
|
<div class="close-btn" @click="cancel">
|
|
<div class="close-btn" @click="cancel">
|
|
<i class="fa fa-times" aria-hidden="true" />
|
|
<i class="fa fa-times" aria-hidden="true" />
|
|
<!-- <span>关闭</span> -->
|
|
<!-- <span>关闭</span> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-form ref="formRef" class="master-container" :model="form" v-loading="loading" :rules="rules"
|
|
|
|
- label-width="120px">
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ ref="formRef"
|
|
|
|
+ class="master-container"
|
|
|
|
+ :model="form"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ >
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="单据号" prop="formCode">
|
|
<el-form-item label="单据号" prop="formCode">
|
|
- <el-input v-if="editStatus" v-model="form.formCode" disabled placeholder="系统自动生成" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ v-model="form.formCode"
|
|
|
|
+ disabled
|
|
|
|
+ placeholder="系统自动生成"
|
|
|
|
+ />
|
|
<span v-else>{{ form.formCode }}</span>
|
|
<span v-else>{{ form.formCode }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="表单日期" prop="formDate">
|
|
<el-form-item label="表单日期" prop="formDate">
|
|
- <el-date-picker v-if="editStatus && hasReturnReceiptDetailFlag" clearable v-model="form.formDate"
|
|
|
|
- type="date" value-format="YYYY-MM-DD" placeholder="请选择表单日期" style="width: 100%">
|
|
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ clearable
|
|
|
|
+ v-model="form.formDate"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
+ placeholder="请选择表单日期"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
<span v-else>{{ parseTime(form.formDate, "{y}-{m}-{d}") }}</span>
|
|
<span v-else>{{ parseTime(form.formDate, "{y}-{m}-{d}") }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="外协商名称" prop="supplierName">
|
|
<el-form-item label="外协商名称" prop="supplierName">
|
|
- <el-input v-if="editStatus && form.isSubmit == 0 && hasReturnReceiptDetailFlag"
|
|
|
|
- v-model="form.supplierName" readonly placeholder="请输入外协商名称">
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="
|
|
|
|
+ editStatus && form.isSubmit == 0 && hasReturnReceiptDetailFlag
|
|
|
|
+ "
|
|
|
|
+ v-model="form.supplierName"
|
|
|
|
+ readonly
|
|
|
|
+ placeholder="请输入外协商名称"
|
|
|
|
+ >
|
|
<template #append>
|
|
<template #append>
|
|
<el-button icon="Search" @click="handleShowDialogSuppliers" />
|
|
<el-button icon="Search" @click="handleShowDialogSuppliers" />
|
|
</template>
|
|
</template>
|
|
@@ -54,51 +106,94 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6" v-if="false">
|
|
<el-col :span="6" v-if="false">
|
|
<el-form-item label="运费单价" prop="freightPrice">
|
|
<el-form-item label="运费单价" prop="freightPrice">
|
|
- <el-input-number v-if="editStatus && hasReturnReceiptDetailFlag" v-model="form.freightPrice" :min="0"
|
|
|
|
- :precision="2" controls-position="right" />
|
|
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="form.freightPrice"
|
|
|
|
+ :min="0"
|
|
|
|
+ :precision="2"
|
|
|
|
+ controls-position="right"
|
|
|
|
+ />
|
|
<span v-else>{{ form.freightPrice }}</span>
|
|
<span v-else>{{ form.freightPrice }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6" v-if="false">
|
|
<el-col :span="6" v-if="false">
|
|
<el-form-item label="运费总价" prop="freightAmount">
|
|
<el-form-item label="运费总价" prop="freightAmount">
|
|
- <el-input-number v-if="editStatus && hasReturnReceiptDetailFlag" v-model="form.freightAmount" :min="0"
|
|
|
|
- :precision="2" controls-position="right" />
|
|
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="form.freightAmount"
|
|
|
|
+ :min="0"
|
|
|
|
+ :precision="2"
|
|
|
|
+ controls-position="right"
|
|
|
|
+ />
|
|
<span v-else>{{ form.freightAmount }}</span>
|
|
<span v-else>{{ form.freightAmount }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="送货方式" prop="deliveryMethod">
|
|
<el-form-item label="送货方式" prop="deliveryMethod">
|
|
- <el-select v-if="editStatus && hasReturnReceiptDetailFlag" v-model="form.deliveryMethod" placeholder="请选择"
|
|
|
|
- @change="handleChangeDeliveryMethod">
|
|
|
|
- <el-option v-for=" dict in deliveryMethod " :key="dict.value" :label="dict.label"
|
|
|
|
- :value="dict.value" />
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="form.deliveryMethod"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="handleChangeDeliveryMethod"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in deliveryMethod"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-else>{{ selectText(form.deliveryMethod, deliveryMethod) }}</span>
|
|
|
|
|
|
+ <span v-else>{{
|
|
|
|
+ selectText(form.deliveryMethod, deliveryMethod)
|
|
|
|
+ }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="带箱方式" prop="packagingMethod">
|
|
<el-form-item label="带箱方式" prop="packagingMethod">
|
|
- <el-select v-if="editStatus && hasReturnReceiptDetailFlag" v-model="form.packagingMethod"
|
|
|
|
- placeholder="请选择" @change="handleChangePackagingMethod">
|
|
|
|
- <el-option v-for=" dict in packagingMethod " :key="dict.value" :label="dict.label"
|
|
|
|
- :value="dict.value" />
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="form.packagingMethod"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="handleChangePackagingMethod"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in packagingMethod"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-else>{{ selectText(form.packagingMethod, packagingMethod) }}</span>
|
|
|
|
|
|
+ <span v-else>{{
|
|
|
|
+ selectText(form.packagingMethod, packagingMethod)
|
|
|
|
+ }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="结算方式" prop="settlementType">
|
|
<el-form-item label="结算方式" prop="settlementType">
|
|
- <el-select v-if="editStatus && hasReturnReceiptDetailFlag" v-model="form.settlementType"
|
|
|
|
- placeholder="请选择">
|
|
|
|
- <el-option v-for=" dict in settlementType " :key="dict.value" :label="dict.label"
|
|
|
|
- :value="dict.value" />
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-if="editStatus && hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="form.settlementType"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in settlementType"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-else>{{ selectText(form.settlementType, settlementType) }}</span>
|
|
|
|
|
|
+ <span v-else>{{
|
|
|
|
+ selectText(form.settlementType, settlementType)
|
|
|
|
+ }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
- <el-input v-if="editStatus" v-model.trim="form.remark" placeholder="请输入备注" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ v-model.trim="form.remark"
|
|
|
|
+ placeholder="请输入备注"
|
|
|
|
+ />
|
|
<span v-else>{{ form.remark }}</span>
|
|
<span v-else>{{ form.remark }}</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -111,47 +206,116 @@
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 渲染数据区 -->
|
|
<!-- 渲染数据区 -->
|
|
<div class="form-details-btns-container">
|
|
<div class="form-details-btns-container">
|
|
- <el-button v-show="editStatus" type="primary" icon="Plus" @click="handleShowDialogProducts"
|
|
|
|
- v-hasPermi="['business:firstOutsource:add']">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="editStatus"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Plus"
|
|
|
|
+ @click="handleShowDialogProducts"
|
|
|
|
+ v-hasPermi="['business:firstOutsource:add']"
|
|
|
|
+ >
|
|
添加外协产品明细
|
|
添加外协产品明细
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-show="editStatus" type="primary" icon="Plus" @click="handleChoiceFurnaceNoInfo()">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="editStatus"
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Plus"
|
|
|
|
+ @click="handleChoiceFurnaceNoInfo()"
|
|
|
|
+ >
|
|
批量选择炉号
|
|
批量选择炉号
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table v-loading="loading" :data="form.details" size="small" border height="100%"
|
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ :data="form.details"
|
|
|
|
+ size="small"
|
|
|
|
+ border
|
|
|
|
+ height="100%"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
+ >
|
|
<el-table-column type="selection" align="center" width="48" />
|
|
<el-table-column type="selection" align="center" width="48" />
|
|
- <el-table-column label="行号" type="index" align="center" width="48" />
|
|
|
|
- <el-table-column label="批次号" align="center" prop="lotCode" width="104" />
|
|
|
|
- <el-table-column label="产品描述" align="center" prop="productDescription" width="320" />
|
|
|
|
- <el-table-column label="产品数" align="center" width="160" prop="productNum">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="行号"
|
|
|
|
+ type="index"
|
|
|
|
+ align="center"
|
|
|
|
+ width="48"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="批次号"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="lotCode"
|
|
|
|
+ width="104"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="产品描述"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="productDescription"
|
|
|
|
+ width="320"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="产品数"
|
|
|
|
+ align="center"
|
|
|
|
+ width="160"
|
|
|
|
+ prop="productNum"
|
|
|
|
+ >
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="箱数" align="center" prop="newCarrierCount" width="100">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="箱数"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="newCarrierCount"
|
|
|
|
+ width="100"
|
|
|
|
+ >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input-number v-if="editStatus && scope.row.hasReturnReceiptDetailFlag" :min="0"
|
|
|
|
- v-model="scope.row.newCarrierCount" :step="1" step-strictly :controls="false" placeholder="箱数"
|
|
|
|
- @blur="handleCarrierNumChange" />
|
|
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
+ :min="0"
|
|
|
|
+ v-model="scope.row.newCarrierCount"
|
|
|
|
+ :step="1"
|
|
|
|
+ step-strictly
|
|
|
|
+ :controls="false"
|
|
|
|
+ placeholder="箱数"
|
|
|
|
+ @blur="handleCarrierNumChange"
|
|
|
|
+ />
|
|
<span v-else>{{ scope.row.newCarrierCount }}</span>
|
|
<span v-else>{{ scope.row.newCarrierCount }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="炉号" align="center" prop="" width="150">
|
|
<el-table-column label="炉号" align="center" prop="" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button link type="primary" icon="Refresh" v-if="editStatus"
|
|
|
|
- @click="handleChoiceFurnaceNoInfo(scope.row)">
|
|
|
|
- {{ scope.row.furnaceNoInfo != null ? scope.row.furnaceNoInfo.furnaceNumber : '选择炉号' }}
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Refresh"
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ @click="handleChoiceFurnaceNoInfo(scope.row)"
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.furnaceNoInfo != null
|
|
|
|
+ ? scope.row.furnaceNoInfo.furnaceNumber
|
|
|
|
+ : "选择炉号"
|
|
|
|
+ }}
|
|
</el-button>
|
|
</el-button>
|
|
<span v-else>{{ scope.row.furnaceNoInfo.furnaceNumber }}</span>
|
|
<span v-else>{{ scope.row.furnaceNoInfo.furnaceNumber }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="外协工序" align="center" prop="processNames" width="320">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="外协工序"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="processNames"
|
|
|
|
+ width="320"
|
|
|
|
+ >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input v-if="editStatus && scope.row.hasReturnReceiptDetailFlag" v-model="scope.row.processNames"
|
|
|
|
- readonly placeholder="请选择工序">
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="scope.row.processNames"
|
|
|
|
+ readonly
|
|
|
|
+ placeholder="请选择工序"
|
|
|
|
+ >
|
|
<template #append>
|
|
<template #append>
|
|
- <el-button icon="Search" @click="handleShowDialogProcesses(scope.row)" />
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ icon="Search"
|
|
|
|
+ @click="handleShowDialogProcesses(scope.row)"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-input>
|
|
</el-input>
|
|
<span v-else>{{ scope.row.processNames }}</span>
|
|
<span v-else>{{ scope.row.processNames }}</span>
|
|
@@ -159,16 +323,30 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input v-if="editStatus && scope.row.hasReturnReceiptDetailFlag" v-model="scope.row.remark"
|
|
|
|
- placeholder="备注" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-if="editStatus && scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
+ v-model="scope.row.remark"
|
|
|
|
+ placeholder="备注"
|
|
|
|
+ />
|
|
<span v-else>{{ scope.row.remark }}</span>
|
|
<span v-else>{{ scope.row.remark }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column v-if="editStatus" label="操作" align="center" class-name="small-padding fixed-width"
|
|
|
|
- width="64">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ v-if="editStatus"
|
|
|
|
+ label="操作"
|
|
|
|
+ align="center"
|
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
|
+ width="64"
|
|
|
|
+ >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button circle type="danger" v-if="scope.row.hasReturnReceiptDetailFlag" icon="Delete"
|
|
|
|
- @click="handleDelete(scope.$index)" v-hasPermi="['business:firstOutsource:remove']" />
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ circle
|
|
|
|
+ type="danger"
|
|
|
|
+ v-if="scope.row.hasReturnReceiptDetailFlag"
|
|
|
|
+ icon="Delete"
|
|
|
|
+ @click="handleDelete(scope.$index)"
|
|
|
|
+ v-hasPermi="['business:firstOutsource:remove']"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -176,15 +354,27 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 外协商选择 -->
|
|
<!-- 外协商选择 -->
|
|
- <dialog-suppliers ref="dialogSuppliersRef" :single-selected="handleSingleSelectedSupplier" />
|
|
|
|
|
|
+ <dialog-suppliers
|
|
|
|
+ ref="dialogSuppliersRef"
|
|
|
|
+ :single-selected="handleSingleSelectedSupplier"
|
|
|
|
+ />
|
|
<!-- 投产单选择 -->
|
|
<!-- 投产单选择 -->
|
|
- <dialog-products ref="dialogProductsRef" :supplier-id="form.supplierId"
|
|
|
|
- :multiple-selected="handleMultipleSelectedProducts" />
|
|
|
|
|
|
+ <dialog-products
|
|
|
|
+ ref="dialogProductsRef"
|
|
|
|
+ :supplier-id="form.supplierId"
|
|
|
|
+ :multiple-selected="handleMultipleSelectedProducts"
|
|
|
|
+ />
|
|
|
|
|
|
<!-- 工序选择 -->
|
|
<!-- 工序选择 -->
|
|
- <dialog-processes ref="dialogProcessesRef" :multiple-selected="handleMultipleSelectedProcesses" />
|
|
|
|
|
|
+ <dialog-processes
|
|
|
|
+ ref="dialogProcessesRef"
|
|
|
|
+ :multiple-selected="handleMultipleSelectedProcesses"
|
|
|
|
+ />
|
|
<!-- 新箱号选择 -->
|
|
<!-- 新箱号选择 -->
|
|
- <DialogFurnaceNoInfo ref="dialogFurnaceNoInfoRef" :singleSelected="handleSingleSelectFurnaceNoInfo" />
|
|
|
|
|
|
+ <DialogFurnaceNoInfo
|
|
|
|
+ ref="dialogFurnaceNoInfoRef"
|
|
|
|
+ :singleSelected="handleSingleSelectFurnaceNoInfo"
|
|
|
|
+ />
|
|
<!-- 历史记录弹窗 -->
|
|
<!-- 历史记录弹窗 -->
|
|
<dialog-outsourced-records ref="dialogOutsourcedRecordsRef" />
|
|
<dialog-outsourced-records ref="dialogOutsourcedRecordsRef" />
|
|
<!-- 收回明细带回 -->
|
|
<!-- 收回明细带回 -->
|
|
@@ -202,20 +392,20 @@ import {
|
|
printOutsource,
|
|
printOutsource,
|
|
submitDetails,
|
|
submitDetails,
|
|
submitDetailsOnFirst,
|
|
submitDetailsOnFirst,
|
|
- getLotByProductionPlanSub
|
|
|
|
|
|
+ getLotByProductionPlanSub,
|
|
} from "@/api/business/outsourcedOrder";
|
|
} from "@/api/business/outsourcedOrder";
|
|
import DialogFurnaceNoInfo from "./DialogFurnaceNoInfo";
|
|
import DialogFurnaceNoInfo from "./DialogFurnaceNoInfo";
|
|
import dialogSuppliers from "./DialogSuppliers";
|
|
import dialogSuppliers from "./DialogSuppliers";
|
|
import dialogProducts from "./DialogProducts";
|
|
import dialogProducts from "./DialogProducts";
|
|
import dialogProcesses from "./DialogProcesses";
|
|
import dialogProcesses from "./DialogProcesses";
|
|
-import dialogOutsourcedRecords from "./DialogOutsourcedRecords"
|
|
|
|
|
|
+import dialogOutsourcedRecords from "./DialogOutsourcedRecords";
|
|
// import FormDetailsRecycling from "./detailsRecyclingForm";
|
|
// import FormDetailsRecycling from "./detailsRecyclingForm";
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
/** 父组件传参 */
|
|
/** 父组件传参 */
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
getList: {
|
|
getList: {
|
|
type: Function,
|
|
type: Function,
|
|
- default: () => { },
|
|
|
|
|
|
+ default: () => {},
|
|
},
|
|
},
|
|
deliveryMethod: {
|
|
deliveryMethod: {
|
|
type: Array,
|
|
type: Array,
|
|
@@ -246,10 +436,10 @@ const loadingCarrier = ref(false);
|
|
const carriers = ref([]);
|
|
const carriers = ref([]);
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
const form = ref({});
|
|
const form = ref({});
|
|
-const selections = ref([])
|
|
|
|
|
|
+const selections = ref([]);
|
|
// const formatDetails = ref([])
|
|
// const formatDetails = ref([])
|
|
const currentDetail = ref({});
|
|
const currentDetail = ref({});
|
|
-const dialogFurnaceNoInfoRef = ref(null)
|
|
|
|
|
|
+const dialogFurnaceNoInfoRef = ref(null);
|
|
const rules = {
|
|
const rules = {
|
|
supplierName: [
|
|
supplierName: [
|
|
{ required: true, message: "外协商名称不能为空", trigger: "change" },
|
|
{ required: true, message: "外协商名称不能为空", trigger: "change" },
|
|
@@ -270,18 +460,18 @@ function handlePrint() {
|
|
/** 打开抽屉 */
|
|
/** 打开抽屉 */
|
|
function open(row) {
|
|
function open(row) {
|
|
reset();
|
|
reset();
|
|
- totalCarriersNum.value = 0
|
|
|
|
|
|
+ totalCarriersNum.value = 0;
|
|
visible.value = true;
|
|
visible.value = true;
|
|
if (row) {
|
|
if (row) {
|
|
editStatus.value = true;
|
|
editStatus.value = true;
|
|
- hasReturnReceiptDetailFlag.value = true
|
|
|
|
- console.log(row)
|
|
|
|
- detailInfo.value = row
|
|
|
|
|
|
+ hasReturnReceiptDetailFlag.value = true;
|
|
|
|
+ console.log(row);
|
|
|
|
+ detailInfo.value = row;
|
|
form.value.id = row.id;
|
|
form.value.id = row.id;
|
|
getForm();
|
|
getForm();
|
|
} else {
|
|
} else {
|
|
editStatus.value = true;
|
|
editStatus.value = true;
|
|
- hasReturnReceiptDetailFlag.value = true
|
|
|
|
|
|
+ hasReturnReceiptDetailFlag.value = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/** 查询表单信息 */
|
|
/** 查询表单信息 */
|
|
@@ -291,56 +481,86 @@ function getForm() {
|
|
form.value = response.data;
|
|
form.value = response.data;
|
|
//如果发出单明细里收回单,主表除了备注之外不能编辑
|
|
//如果发出单明细里收回单,主表除了备注之外不能编辑
|
|
form.value.details.forEach((item) => {
|
|
form.value.details.forEach((item) => {
|
|
- item.hasReturnReceiptDetailFlag = true
|
|
|
|
- if (item.returnReceiptDetailList && item.returnReceiptDetailList.length > 0) {
|
|
|
|
- hasReturnReceiptDetailFlag.value = false
|
|
|
|
|
|
+ item.hasReturnReceiptDetailFlag = true;
|
|
|
|
+ if (
|
|
|
|
+ item.returnReceiptDetailList &&
|
|
|
|
+ item.returnReceiptDetailList.length > 0
|
|
|
|
+ ) {
|
|
|
|
+ hasReturnReceiptDetailFlag.value = false;
|
|
}
|
|
}
|
|
- if (item.returnReceiptDetailList && item.returnReceiptDetailList.length > 0 && item.returnReceiptDetailList[0].status == 1) {
|
|
|
|
- item.hasReturnReceiptDetailFlag = false
|
|
|
|
|
|
+ if (
|
|
|
|
+ item.returnReceiptDetailList &&
|
|
|
|
+ item.returnReceiptDetailList.length > 0 &&
|
|
|
|
+ item.returnReceiptDetailList[0].status == 1
|
|
|
|
+ ) {
|
|
|
|
+ item.hasReturnReceiptDetailFlag = false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
form.value.details.forEach((item) => {
|
|
form.value.details.forEach((item) => {
|
|
item.editStatus = false;
|
|
item.editStatus = false;
|
|
- totalCarriersNum.value += item.newCarrierCount == null ? 0 : item.newCarrierCount;
|
|
|
|
|
|
+ totalCarriersNum.value +=
|
|
|
|
+ item.newCarrierCount == null ? 0 : item.newCarrierCount;
|
|
});
|
|
});
|
|
|
|
|
|
editStatus.value = form.value.isSubmit == 1;
|
|
editStatus.value = form.value.isSubmit == 1;
|
|
if (!detailInfo.value.flag) {
|
|
if (!detailInfo.value.flag) {
|
|
- editStatus.value = false
|
|
|
|
- console.log(editStatus.value)
|
|
|
|
|
|
+ editStatus.value = false;
|
|
|
|
+ console.log(editStatus.value);
|
|
}
|
|
}
|
|
- console.log(hasReturnReceiptDetailFlag.value)
|
|
|
|
|
|
+ console.log(hasReturnReceiptDetailFlag.value);
|
|
loading.value = false;
|
|
loading.value = false;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
//改变带箱方式
|
|
//改变带箱方式
|
|
function handleChangePackagingMethod() {
|
|
function handleChangePackagingMethod() {
|
|
- totalCarriersNum.value = 0
|
|
|
|
|
|
+ totalCarriersNum.value = 0;
|
|
if (!editStatus) {
|
|
if (!editStatus) {
|
|
if (form.value.packagingMethod == 1 && form.value.details.length > 0) {
|
|
if (form.value.packagingMethod == 1 && form.value.details.length > 0) {
|
|
- form.value.details.forEach(item => { item.newCarriers = []; item.carrierIds = []; item.carriers = carriers.value })
|
|
|
|
- } if (form.value.packagingMethod == 0 && form.value.details.length > 0) {
|
|
|
|
- form.value.details.forEach(item => {
|
|
|
|
|
|
+ form.value.details.forEach((item) => {
|
|
|
|
+ item.newCarriers = [];
|
|
|
|
+ item.carrierIds = [];
|
|
|
|
+ item.carriers = carriers.value;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (form.value.packagingMethod == 0 && form.value.details.length > 0) {
|
|
|
|
+ form.value.details.forEach((item) => {
|
|
item.carriers = carriers.value;
|
|
item.carriers = carriers.value;
|
|
item.newCarriers = [];
|
|
item.newCarriers = [];
|
|
item.carrierIds = [];
|
|
item.carrierIds = [];
|
|
- item.newCarriers.push(...item.originalCarrierList.map(v => ({ id: v.carrierId, code: v.carrierCode })));
|
|
|
|
- item.carriers.push(...item.originalCarrierList.map((v) => ({ value: v.carrierId, label: v.carrierCode })));
|
|
|
|
- item.carrierIds = item.originalCarrierList.map(info => { return info.carrierId })
|
|
|
|
- })
|
|
|
|
|
|
+ item.newCarriers.push(
|
|
|
|
+ ...item.originalCarrierList.map((v) => ({
|
|
|
|
+ id: v.carrierId,
|
|
|
|
+ code: v.carrierCode,
|
|
|
|
+ }))
|
|
|
|
+ );
|
|
|
|
+ item.carriers.push(
|
|
|
|
+ ...item.originalCarrierList.map((v) => ({
|
|
|
|
+ value: v.carrierId,
|
|
|
|
+ label: v.carrierCode,
|
|
|
|
+ }))
|
|
|
|
+ );
|
|
|
|
+ item.carrierIds = item.originalCarrierList.map((info) => {
|
|
|
|
+ return info.carrierId;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- form.value.details.forEach(item => {
|
|
|
|
- console.log(item.editStatus)
|
|
|
|
|
|
+ form.value.details.forEach((item) => {
|
|
|
|
+ console.log(item.editStatus);
|
|
if (item.editStatus) {
|
|
if (item.editStatus) {
|
|
- item.newCarriers = []; item.carrierIds = []; item.carriers = carriers.value
|
|
|
|
|
|
+ item.newCarriers = [];
|
|
|
|
+ item.carrierIds = [];
|
|
|
|
+ item.carriers = carriers.value;
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- console.log(form.value.details)
|
|
|
|
|
|
+ console.log(form.value.details);
|
|
for (let i = 0; i < form.value.details.length; i++) {
|
|
for (let i = 0; i < form.value.details.length; i++) {
|
|
- console.log(form.value.details)
|
|
|
|
- totalCarriersNum.value += form.value.details[i].newCarrierCount == null ? 0 : form.value.details[i].newCarrierCount
|
|
|
|
|
|
+ console.log(form.value.details);
|
|
|
|
+ totalCarriersNum.value +=
|
|
|
|
+ form.value.details[i].newCarrierCount == null
|
|
|
|
+ ? 0
|
|
|
|
+ : form.value.details[i].newCarrierCount;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//改变送货方式
|
|
//改变送货方式
|
|
@@ -350,7 +570,6 @@ function handleChangeDeliveryMethod() {
|
|
} else {
|
|
} else {
|
|
form.value.freightAmount = 0.0;
|
|
form.value.freightAmount = 0.0;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
//打开历史记录弹窗
|
|
//打开历史记录弹窗
|
|
function handleViewRecords() {
|
|
function handleViewRecords() {
|
|
@@ -370,14 +589,17 @@ function cancel() {
|
|
}
|
|
}
|
|
|
|
|
|
const handleDelete = (index) => {
|
|
const handleDelete = (index) => {
|
|
- totalCarriersNum.value -= (form.value.details[index].carrierNum == null ? 0 : form.value.details[index].carrierNum);
|
|
|
|
|
|
+ totalCarriersNum.value -=
|
|
|
|
+ form.value.details[index].carrierNum == null
|
|
|
|
+ ? 0
|
|
|
|
+ : form.value.details[index].carrierNum;
|
|
if (form.value.deliveryMethod == 1) {
|
|
if (form.value.deliveryMethod == 1) {
|
|
form.value.freightAmount = form.value.freightPrice * totalCarriersNum.value;
|
|
form.value.freightAmount = form.value.freightPrice * totalCarriersNum.value;
|
|
} else {
|
|
} else {
|
|
form.value.freightAmount = 0.0;
|
|
form.value.freightAmount = 0.0;
|
|
}
|
|
}
|
|
- form.value.details.splice(index, 1)
|
|
|
|
- handleCarrierNumChange()
|
|
|
|
|
|
+ form.value.details.splice(index, 1);
|
|
|
|
+ handleCarrierNumChange();
|
|
};
|
|
};
|
|
|
|
|
|
/** 表单重置 */
|
|
/** 表单重置 */
|
|
@@ -397,7 +619,7 @@ function reset() {
|
|
remark: null,
|
|
remark: null,
|
|
details: [],
|
|
details: [],
|
|
isSubmit: 0,
|
|
isSubmit: 0,
|
|
- isFirstProcess: 1
|
|
|
|
|
|
+ isFirstProcess: 1,
|
|
};
|
|
};
|
|
proxy.resetForm("formRef");
|
|
proxy.resetForm("formRef");
|
|
}
|
|
}
|
|
@@ -477,7 +699,7 @@ function submitFrom() {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})
|
|
})
|
|
- .catch(() => { });
|
|
|
|
|
|
+ .catch(() => {});
|
|
}
|
|
}
|
|
//5.29保存
|
|
//5.29保存
|
|
function handleSubmit() {
|
|
function handleSubmit() {
|
|
@@ -501,17 +723,19 @@ function handleSubmit() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 判断是否有批次没有炉号
|
|
// 判断是否有批次没有炉号
|
|
- const unfurnace = form.value.details.find(v => v.furnaceNoInfo == null)
|
|
|
|
|
|
+ const unfurnace = form.value.details.find(
|
|
|
|
+ (v) => v.furnaceNoInfo == null
|
|
|
|
+ );
|
|
if (unfurnace != null) {
|
|
if (unfurnace != null) {
|
|
- proxy.$modal.msgError("请选择" + unfurnace.lotCode + "批次的炉号")
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请选择" + unfurnace.lotCode + "批次的炉号");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (totalCarriersNum.value == null || totalCarriersNum.value == 0) {
|
|
if (totalCarriersNum.value == null || totalCarriersNum.value == 0) {
|
|
- proxy.$modal.msgError("请输入箱数")
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请输入箱数");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log(form.value)
|
|
|
|
|
|
+ console.log(form.value);
|
|
submitDetailsOnFirst(form.value).then((response) => {
|
|
submitDetailsOnFirst(form.value).then((response) => {
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
visible.value = false;
|
|
visible.value = false;
|
|
@@ -519,7 +743,7 @@ function handleSubmit() {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- })
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
if (!form.value.details || form.value.details.length == 0) {
|
|
if (!form.value.details || form.value.details.length == 0) {
|
|
proxy.$modal.msgError("请添加产品明细");
|
|
proxy.$modal.msgError("请添加产品明细");
|
|
@@ -534,17 +758,17 @@ function handleSubmit() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 判断是否有批次没有炉号
|
|
// 判断是否有批次没有炉号
|
|
- const unfurnace = form.value.details.find(v => v.furnaceNoInfo == null)
|
|
|
|
|
|
+ const unfurnace = form.value.details.find((v) => v.furnaceNoInfo == null);
|
|
if (unfurnace != null) {
|
|
if (unfurnace != null) {
|
|
- proxy.$modal.msgError("请选择" + unfurnace.lotCode + "批次的炉号")
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请选择" + unfurnace.lotCode + "批次的炉号");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (totalCarriersNum.value == null || totalCarriersNum.value == 0) {
|
|
if (totalCarriersNum.value == null || totalCarriersNum.value == 0) {
|
|
- proxy.$modal.msgError("请输入箱数")
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请输入箱数");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log(form.value)
|
|
|
|
|
|
+ console.log(form.value);
|
|
submitDetailsOnFirst(form.value).then((response) => {
|
|
submitDetailsOnFirst(form.value).then((response) => {
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
proxy.$modal.msgSuccess("提交成功");
|
|
visible.value = false;
|
|
visible.value = false;
|
|
@@ -566,6 +790,7 @@ const handleSingleSelectedSupplier = (data) => {
|
|
form.value.supplierId = data.id;
|
|
form.value.supplierId = data.id;
|
|
form.value.lossLimit = data.lossLimit;
|
|
form.value.lossLimit = data.lossLimit;
|
|
form.value.supplierName = data.name;
|
|
form.value.supplierName = data.name;
|
|
|
|
+ form.value.supplierCode = data.mnemonicCode;
|
|
form.value.deliveryMethod = data.deliveryMethod;
|
|
form.value.deliveryMethod = data.deliveryMethod;
|
|
form.value.freightPrice = data.freightPrice;
|
|
form.value.freightPrice = data.freightPrice;
|
|
form.value.settlementType = data.settlementType;
|
|
form.value.settlementType = data.settlementType;
|
|
@@ -580,7 +805,7 @@ const handleSingleSelectedSupplier = (data) => {
|
|
function handleDetailsRecycling() {
|
|
function handleDetailsRecycling() {
|
|
proxy.$refs.formDetailsRecyclingRef.open(row);
|
|
proxy.$refs.formDetailsRecyclingRef.open(row);
|
|
}
|
|
}
|
|
-function handleSingleSelectedRecycling() { }
|
|
|
|
|
|
+function handleSingleSelectedRecycling() {}
|
|
/***************************** 产品对话框相关 *****************************/
|
|
/***************************** 产品对话框相关 *****************************/
|
|
// 打开产品选择对话框
|
|
// 打开产品选择对话框
|
|
const handleShowDialogProducts = () => {
|
|
const handleShowDialogProducts = () => {
|
|
@@ -595,15 +820,20 @@ const handleMultipleSelectedProducts = (selection) => {
|
|
planDetails: selection,
|
|
planDetails: selection,
|
|
supplierId: form.value.supplierId,
|
|
supplierId: form.value.supplierId,
|
|
supplierName: form.value.supplierName,
|
|
supplierName: form.value.supplierName,
|
|
- masterId: form.value.id
|
|
|
|
- }
|
|
|
|
- getLotByProductionPlanSub(requestData).then(res => {
|
|
|
|
|
|
+ masterId: form.value.id,
|
|
|
|
+ };
|
|
|
|
+ getLotByProductionPlanSub(requestData).then((res) => {
|
|
// console.log(res)
|
|
// console.log(res)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
- form.value.details.push(...res.data.filter(e => form.value.details.findIndex(t => t.lotId === e.lotId) < 0).map(e => ({ ...e, hasReturnReceiptDetailFlag: true })))
|
|
|
|
|
|
+ form.value.details.push(
|
|
|
|
+ ...res.data
|
|
|
|
+ .filter(
|
|
|
|
+ (e) => form.value.details.findIndex((t) => t.lotId === e.lotId) < 0
|
|
|
|
+ )
|
|
|
|
+ .map((e) => ({ ...e, hasReturnReceiptDetailFlag: true }))
|
|
|
|
+ );
|
|
}
|
|
}
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
/***************************** 外协工序对话框相关 *****************************/
|
|
/***************************** 外协工序对话框相关 *****************************/
|
|
@@ -615,18 +845,25 @@ const handleShowDialogProcesses = (row) => {
|
|
|
|
|
|
// 工序选择带回
|
|
// 工序选择带回
|
|
const handleMultipleSelectedProcesses = (selection) => {
|
|
const handleMultipleSelectedProcesses = (selection) => {
|
|
- const oldProcesses = currentDetail.value.processes == null ? [] : [...currentDetail.value.processes]
|
|
|
|
|
|
+ const oldProcesses =
|
|
|
|
+ currentDetail.value.processes == null
|
|
|
|
+ ? []
|
|
|
|
+ : [...currentDetail.value.processes];
|
|
if (
|
|
if (
|
|
currentDetail.value.returnReceiptDetailList &&
|
|
currentDetail.value.returnReceiptDetailList &&
|
|
currentDetail.value.returnReceiptDetailList.length > 0 &&
|
|
currentDetail.value.returnReceiptDetailList.length > 0 &&
|
|
- selection.findIndex(e => !oldProcesses.some(v => v.technologicalProcessDetailId == e.id)) >= 0
|
|
|
|
|
|
+ selection.findIndex(
|
|
|
|
+ (e) => !oldProcesses.some((v) => v.technologicalProcessDetailId == e.id)
|
|
|
|
+ ) >= 0
|
|
) {
|
|
) {
|
|
- proxy.$modal.msgError('已收回批次不能添加新工序')
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("已收回批次不能添加新工序");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- currentDetail.value.processes = []
|
|
|
|
|
|
+ currentDetail.value.processes = [];
|
|
console.log(selection);
|
|
console.log(selection);
|
|
- const processNames = selection.sort((a, b) => a.processStepNumber - b.processStepNumber).map((item) => item.processAlias);
|
|
|
|
|
|
+ const processNames = selection
|
|
|
|
+ .sort((a, b) => a.processStepNumber - b.processStepNumber)
|
|
|
|
+ .map((item) => item.processAlias);
|
|
// 使用join方法将数组转换为以逗号分隔的字符串
|
|
// 使用join方法将数组转换为以逗号分隔的字符串
|
|
let commaSeparatedString = processNames.join(",");
|
|
let commaSeparatedString = processNames.join(",");
|
|
currentDetail.value.processes = [];
|
|
currentDetail.value.processes = [];
|
|
@@ -644,41 +881,44 @@ const handleMultipleSelectedProcesses = (selection) => {
|
|
};
|
|
};
|
|
|
|
|
|
function handleSelectionChange(selection) {
|
|
function handleSelectionChange(selection) {
|
|
- selections.value = selection
|
|
|
|
|
|
+ selections.value = selection;
|
|
}
|
|
}
|
|
|
|
|
|
// 选择炉号
|
|
// 选择炉号
|
|
const handleChoiceFurnaceNoInfo = (row) => {
|
|
const handleChoiceFurnaceNoInfo = (row) => {
|
|
// 判断选择的产品是不是同一个
|
|
// 判断选择的产品是不是同一个
|
|
const changeFurnaceNoInfo = row ? [row] : selections.value;
|
|
const changeFurnaceNoInfo = row ? [row] : selections.value;
|
|
- let checkSame = true
|
|
|
|
- changeFurnaceNoInfo.forEach(l => {
|
|
|
|
- checkSame = checkSame && l.productId == changeFurnaceNoInfo[0].productId
|
|
|
|
- })
|
|
|
|
- console.log(checkSame)
|
|
|
|
|
|
+ let checkSame = true;
|
|
|
|
+ changeFurnaceNoInfo.forEach((l) => {
|
|
|
|
+ checkSame = checkSame && l.productId == changeFurnaceNoInfo[0].productId;
|
|
|
|
+ });
|
|
|
|
+ console.log(checkSame);
|
|
if (!checkSame) {
|
|
if (!checkSame) {
|
|
- proxy.$modal.msgError('请选择相同计划单批量选择炉号')
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请选择相同计划单批量选择炉号");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (changeFurnaceNoInfo.length === 0) {
|
|
if (changeFurnaceNoInfo.length === 0) {
|
|
- proxy.$modal.msgError('请选择需要变更炉号的计划单')
|
|
|
|
- return
|
|
|
|
|
|
+ proxy.$modal.msgError("请选择需要变更炉号的计划单");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- dialogFurnaceNoInfoRef.value.open({ details: changeFurnaceNoInfo, queryParams: { ...changeFurnaceNoInfo[0] } })
|
|
|
|
-}
|
|
|
|
|
|
+ dialogFurnaceNoInfoRef.value.open({
|
|
|
|
+ details: changeFurnaceNoInfo,
|
|
|
|
+ queryParams: { ...changeFurnaceNoInfo[0] },
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
|
|
const handleSingleSelectFurnaceNoInfo = (details, info) => {
|
|
const handleSingleSelectFurnaceNoInfo = (details, info) => {
|
|
- details.forEach(l => {
|
|
|
|
- l.furnaceNoInfo = info
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
|
|
+ details.forEach((l) => {
|
|
|
|
+ l.furnaceNoInfo = info;
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
|
|
function handleCarrierNumChange() {
|
|
function handleCarrierNumChange() {
|
|
- let sumNum = 0
|
|
|
|
- form.value.details.forEach(v => {
|
|
|
|
- sumNum += (v.newCarrierCount == null ? 0 : v.newCarrierCount)
|
|
|
|
- })
|
|
|
|
- totalCarriersNum.value = sumNum
|
|
|
|
|
|
+ let sumNum = 0;
|
|
|
|
+ form.value.details.forEach((v) => {
|
|
|
|
+ sumNum += v.newCarrierCount == null ? 0 : v.newCarrierCount;
|
|
|
|
+ });
|
|
|
|
+ totalCarriersNum.value = sumNum;
|
|
}
|
|
}
|
|
|
|
|
|
/** 暴露给父组件的方法 */
|
|
/** 暴露给父组件的方法 */
|