|
@@ -1,100 +1,48 @@
|
|
|
<template>
|
|
|
<div class="user">
|
|
|
<div class="tree">
|
|
|
- <treeList
|
|
|
- title="物料分类"
|
|
|
- submitType="2"
|
|
|
- :data="treeListData"
|
|
|
- v-model="sourceList.pagination.productClassifyId"
|
|
|
- @change="treeChange"
|
|
|
- @changeTreeList="getTreeList"
|
|
|
- >
|
|
|
+ <treeList title="物料分类" submitType="2" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
|
|
|
+ @changeTreeList="getTreeList">
|
|
|
</treeList>
|
|
|
</div>
|
|
|
<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事件都能传
|
|
|
select: select,
|
|
|
- }"
|
|
|
- :action-list="[]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ }" :action-list="[]" @get-list="getList">
|
|
|
<template #pic="{ item }">
|
|
|
<div v-if="item.fileList.length > 0">
|
|
|
- <img
|
|
|
- :src="item.fileList[0].fileUrl"
|
|
|
- class="pic"
|
|
|
- @click="handleClickFile(item.fileList[0])"
|
|
|
- />
|
|
|
+ <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
|
|
|
</div>
|
|
|
<div v-else></div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
|
- <el-dialog
|
|
|
- :title="modalType == 'add' ? '添加' : '编辑'"
|
|
|
- v-model="dialogVisible"
|
|
|
- width="500"
|
|
|
- v-loading="loading"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="byform"
|
|
|
- >
|
|
|
+ <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading">
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
|
<template #productPic>
|
|
|
<div>
|
|
|
- <el-upload
|
|
|
- v-model:fileList="fileList"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadData"
|
|
|
- list-type="picture-card"
|
|
|
- :on-remove="handleRemove"
|
|
|
- :on-success="handleSuccess"
|
|
|
- :before-upload="handleBeforeUpload"
|
|
|
- >
|
|
|
- <el-icon><Plus /></el-icon>
|
|
|
+ <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
|
|
|
+ list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="submitForm('byform')"
|
|
|
- size="large"
|
|
|
- :loading="submitLoading"
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading">
|
|
|
确 定
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="Excel导入"
|
|
|
- v-model="openExcelDialog"
|
|
|
- width="400"
|
|
|
- v-loading="loading"
|
|
|
- >
|
|
|
+ <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
|
|
|
<template #footer>
|
|
|
- <el-button @click="openExcelDialog = false" size="large"
|
|
|
- >取 消</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="submitExcel()"
|
|
|
- size="large"
|
|
|
- :loading="submitLoading"
|
|
|
- >
|
|
|
+ <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
|
|
|
确 定
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -162,7 +110,7 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "物料编码",
|
|
|
- prop: "code",
|
|
|
+ prop: "customCode",
|
|
|
},
|
|
|
},
|
|
|
{
|