|
@@ -2,137 +2,69 @@
|
|
<div class="tenant">
|
|
<div class="tenant">
|
|
<!-- <Banner /> -->
|
|
<!-- <Banner /> -->
|
|
<div class="content">
|
|
<div class="content">
|
|
- <byTable
|
|
|
|
- :source="sourceList.data"
|
|
|
|
- :pagination="sourceList.pagination"
|
|
|
|
- :config="config"
|
|
|
|
- :loading="loading"
|
|
|
|
- highlight-current-row
|
|
|
|
- :selectConfig="selectConfig"
|
|
|
|
- :table-events="{
|
|
|
|
|
|
+ <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
|
|
|
|
+ :selectConfig="selectConfig" :table-events="{
|
|
//element talbe事件都能传
|
|
//element talbe事件都能传
|
|
select: select,
|
|
select: select,
|
|
- }"
|
|
|
|
- :action-list="[
|
|
|
|
|
|
+ }" :action-list="[
|
|
{
|
|
{
|
|
text: '添加BOM',
|
|
text: '添加BOM',
|
|
action: () => openModal('add'),
|
|
action: () => openModal('add'),
|
|
},
|
|
},
|
|
- ]"
|
|
|
|
- @get-list="getList"
|
|
|
|
- >
|
|
|
|
|
|
+ ]" @get-list="getList">
|
|
<template #versionSlot="{ item }">
|
|
<template #versionSlot="{ item }">
|
|
- <div
|
|
|
|
- style="cursor: pointer; color: #409eff"
|
|
|
|
- @click="hanldeOpenVer(item)"
|
|
|
|
- >
|
|
|
|
|
|
+ <div style="cursor: pointer; color: #409eff" @click="hanldeOpenVer(item)">
|
|
v{{ item.versionNumber }}
|
|
v{{ item.versionNumber }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</byTable>
|
|
</byTable>
|
|
</div>
|
|
</div>
|
|
- <el-dialog
|
|
|
|
- :title="titleText"
|
|
|
|
- v-model="dialogVisible"
|
|
|
|
- width="70%"
|
|
|
|
- v-loading="submitLoading"
|
|
|
|
- destroy-on-close
|
|
|
|
- >
|
|
|
|
- <byForm
|
|
|
|
- :formConfig="formConfig"
|
|
|
|
- :formOption="formOption"
|
|
|
|
- v-model="formData.data"
|
|
|
|
- :rules="rules"
|
|
|
|
- ref="byform"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog :title="titleText" v-model="dialogVisible" width="70%" v-loading="submitLoading" destroy-on-close>
|
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
<template #slotFile>
|
|
<template #slotFile>
|
|
<div style="width: 100%">
|
|
<div style="width: 100%">
|
|
- <el-upload
|
|
|
|
- v-model:fileList="fileList"
|
|
|
|
- :show-file-list="false"
|
|
|
|
- class="upload-demo"
|
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
|
- :data="uploadData"
|
|
|
|
- :before-upload="handleBeforeUpload"
|
|
|
|
- accept=".rar,.zip"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo"
|
|
|
|
+ action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData" :before-upload="handleBeforeUpload"
|
|
|
|
+ accept=".rar,.zip">
|
|
<el-button type="primary">选 择</el-button>
|
|
<el-button type="primary">选 择</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
<div>
|
|
<div>
|
|
<div style="margin-top: 15px">
|
|
<div style="margin-top: 15px">
|
|
- <el-tag
|
|
|
|
- style="margin-right: 10px"
|
|
|
|
- class="ml-2"
|
|
|
|
- type="info"
|
|
|
|
- v-for="(item, index) in fileListCopy"
|
|
|
|
- :key="index"
|
|
|
|
- >{{ item.fileName }}</el-tag
|
|
|
|
- >
|
|
|
|
|
|
+ <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy"
|
|
|
|
+ :key="index">{{ item.fileName }}</el-tag>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #slot>
|
|
<template #slot>
|
|
<div style="width: 100%">
|
|
<div style="width: 100%">
|
|
- <el-button type="primary" plain @click="openMaterial = true"
|
|
|
|
- >添加物料/半成品</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" plain> Excel导入</el-button>
|
|
|
|
- <el-form
|
|
|
|
- ref="tableForm"
|
|
|
|
- :model="formData.data"
|
|
|
|
- :rules="rules"
|
|
|
|
- label-width="0px"
|
|
|
|
- style="margin-top: 15px"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" plain @click="openMaterial = true">添加物料/半成品</el-button>
|
|
|
|
+ <!-- <el-button type="primary" plain> Excel导入</el-button> -->
|
|
|
|
+ <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px">
|
|
<el-table :data="formData.data.bomDetailList">
|
|
<el-table :data="formData.data.bomDetailList">
|
|
<el-table-column prop="productCode" label="物料编码" />
|
|
<el-table-column prop="productCode" label="物料编码" />
|
|
<el-table-column prop="productName" label="物料名称" />
|
|
<el-table-column prop="productName" label="物料名称" />
|
|
<el-table-column prop="productSpec" label="规格型号" />
|
|
<el-table-column prop="productSpec" label="规格型号" />
|
|
- <el-table-column
|
|
|
|
- prop="productUnit"
|
|
|
|
- label="单位"
|
|
|
|
- :formatter="
|
|
|
|
|
|
+ <el-table-column prop="productUnit" label="单位" :formatter="
|
|
(row) => dictValueLabel(row.productUnit, materialUnit)
|
|
(row) => dictValueLabel(row.productUnit, materialUnit)
|
|
- "
|
|
|
|
- />
|
|
|
|
|
|
+ " />
|
|
<el-table-column prop="quantity" label="数量" width="150">
|
|
<el-table-column prop="quantity" label="数量" width="150">
|
|
<template #default="{ row, $index }">
|
|
<template #default="{ row, $index }">
|
|
- <el-form-item
|
|
|
|
- :prop="'bomDetailList.' + $index + '.quantity'"
|
|
|
|
- :rules="rules.quantity"
|
|
|
|
- :inline-message="true"
|
|
|
|
- >
|
|
|
|
- <el-input-number
|
|
|
|
- v-model="row.quantity"
|
|
|
|
- :precision="2"
|
|
|
|
- :controls="false"
|
|
|
|
- :min="1"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form-item :prop="'bomDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
|
+ <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="1" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="zip" label="成本" width="150">
|
|
<el-table-column prop="zip" label="成本" width="150">
|
|
<template #default="{ row, $index }">
|
|
<template #default="{ row, $index }">
|
|
- <el-form-item
|
|
|
|
- :prop="'bomDetailList.' + $index + '.cost'"
|
|
|
|
- :rules="rules.cost"
|
|
|
|
- :inline-message="true"
|
|
|
|
- >
|
|
|
|
- <el-input-number
|
|
|
|
- v-model="row.cost"
|
|
|
|
- :precision="2"
|
|
|
|
- :controls="false"
|
|
|
|
- :min="1"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form-item :prop="'bomDetailList.' + $index + '.cost'" :rules="rules.cost" :inline-message="true">
|
|
|
|
+ <el-input-number v-model="row.cost" :precision="2" :controls="false" :min="1" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="zip" label="操作" width="100">
|
|
<el-table-column prop="zip" label="操作" width="100">
|
|
<template #default="{ $index }">
|
|
<template #default="{ $index }">
|
|
- <el-button type="primary" link @click="handleRemove($index)"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -142,27 +74,15 @@
|
|
</byForm>
|
|
</byForm>
|
|
<template #footer>
|
|
<template #footer>
|
|
<div v-if="isShowBtns">
|
|
<div v-if="isShowBtns">
|
|
- <el-button @click="dialogVisible = false" size="large"
|
|
|
|
- >取 消</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- v-no-double-click="submitForm"
|
|
|
|
- size="large"
|
|
|
|
- :loading="submitLoading"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
|
+ <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
|
|
确 定
|
|
确 定
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
|
- v-model="openMaterial"
|
|
|
|
- title="选择物料/半成品"
|
|
|
|
- width="70%"
|
|
|
|
- append-to-body
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog v-model="openMaterial" title="选择物料/半成品" width="70%" append-to-body>
|
|
<SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
|
|
<SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
|
|
<template #footer>
|
|
<template #footer>
|
|
<span class="dialog-footer">
|
|
<span class="dialog-footer">
|
|
@@ -172,44 +92,19 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog v-model="openVersion" title="切换版本" width="30%">
|
|
<el-dialog v-model="openVersion" title="切换版本" width="30%">
|
|
- <byForm
|
|
|
|
- :formConfig="formConfig1"
|
|
|
|
- :formOption="formOption"
|
|
|
|
- v-model="formData.data1"
|
|
|
|
- :rules="rules1"
|
|
|
|
- ref="byform1"
|
|
|
|
- >
|
|
|
|
|
|
+ <byForm :formConfig="formConfig1" :formOption="formOption" v-model="formData.data1" :rules="rules1" ref="byform1">
|
|
<template #versionSlot>
|
|
<template #versionSlot>
|
|
<div>
|
|
<div>
|
|
- <el-select
|
|
|
|
- v-model="formData.data1.versionNumber"
|
|
|
|
- placeholder="请选择版本号"
|
|
|
|
- @change="changeRowData"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in versionData"
|
|
|
|
- :label="'v' + item.versionNumber"
|
|
|
|
- :value="item.versionNumber"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-select v-model="formData.data1.versionNumber" placeholder="请选择版本号" @change="changeRowData">
|
|
|
|
+ <el-option v-for="item in versionData" :label="'v' + item.versionNumber" :value="item.versionNumber" />
|
|
</el-select>
|
|
</el-select>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- link
|
|
|
|
- style="margin-left: 10px"
|
|
|
|
- @click="handleGetDetails"
|
|
|
|
- v-if="formData.data1.versionNumber"
|
|
|
|
- >查看</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" link style="margin-left: 10px" @click="handleGetDetails" v-if="formData.data1.versionNumber">查看</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</byForm>
|
|
</byForm>
|
|
<template #footer>
|
|
<template #footer>
|
|
<el-button @click="openVersion = false" size="large">取 消</el-button>
|
|
<el-button @click="openVersion = false" size="large">取 消</el-button>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- @click="handleChangeVer('byform1')"
|
|
|
|
- size="large"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" @click="handleChangeVer('byform1')" size="large">
|
|
确 定
|
|
确 定
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|