|
@@ -1,29 +1,16 @@
|
|
|
<template>
|
|
|
<div class="user">
|
|
|
<div class="tree">
|
|
|
- <treeList
|
|
|
- title="产品分类"
|
|
|
- submitType="1"
|
|
|
- :data="treeListData"
|
|
|
- v-model="sourceList.pagination.productClassifyId"
|
|
|
- @change="treeChange"
|
|
|
- @changeTreeList="getTreeList"
|
|
|
- >
|
|
|
+ <treeList title="产品分类" submitType="1" :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="[
|
|
|
+ }" :action-list="[
|
|
|
props.selectStatus
|
|
|
? {}
|
|
|
: {
|
|
@@ -38,25 +25,15 @@
|
|
|
action: () => openModal('add'),
|
|
|
disabled: false,
|
|
|
},
|
|
|
- ]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ ]" @get-list="getList">
|
|
|
<template #name="{ item }">
|
|
|
<div>
|
|
|
- <span
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- @click="handleOpenProductContract(item)"
|
|
|
- >{{ item.name }}</span
|
|
|
- >
|
|
|
+ <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="handleOpenProductContract(item)">{{ item.name }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<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>
|
|
@@ -74,102 +51,72 @@
|
|
|
</template>
|
|
|
<template #costPrice="{ item }">
|
|
|
<div>
|
|
|
- <span v-if="item.costPrice"
|
|
|
- >{{ item.costCurrency }} {{ item.costPrice }}</span
|
|
|
- >
|
|
|
+ <span v-if="item.costPrice">{{ item.costCurrency }} {{ item.costPrice }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog
|
|
|
- :title="modalType == 'add' ? '添加产品' : '编辑产品'"
|
|
|
- v-model="dialogVisible"
|
|
|
- width="700"
|
|
|
- v-loading="submitLoading"
|
|
|
- destroy-on-close
|
|
|
- >
|
|
|
+ <el-dialog :title="modalType == 'add' ? '添加产品' : '编辑产品'" v-model="dialogVisible" width="80%" v-loading="submitLoading" destroy-on-close>
|
|
|
<div class="public_height_dialog">
|
|
|
- <byForm
|
|
|
- :formConfig="formConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="byform"
|
|
|
- >
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
|
|
|
<template #nameEnglish>
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item label="英文名" prop="nameEnglish">
|
|
|
- <el-input
|
|
|
- v-model="formData.data.nameEnglish"
|
|
|
- placeholder="请输入"
|
|
|
- onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
|
|
|
- ></el-input>
|
|
|
- <!-- @input="(val) => handleKeyup(val)" -->
|
|
|
- </el-form-item>
|
|
|
+ <el-input v-model="formData.data.nameEnglish" placeholder="请输入" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"></el-input>
|
|
|
+ <!-- @input="(val) => handleKeyup(val)" -->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #productLong>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item prop="productLong" label-width="0px" class="margin-b-0">
|
|
|
+ <el-input v-model="formData.data.productLong" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item prop="productWide" label-width="0px" class="margin-b-0">
|
|
|
+ <el-input v-model="formData.data.productWide" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item prop="productHigh" label-width="0px" class="margin-b-0">
|
|
|
+ <el-input v-model="formData.data.productHigh" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
<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"
|
|
|
- :before-upload="handleBeforeUpload"
|
|
|
- :on-preview="handlePreview"
|
|
|
- accept=".gif, .jpeg, .jpg, .png"
|
|
|
- >
|
|
|
- <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" :before-upload="handleBeforeUpload" :on-preview="handlePreview"
|
|
|
+ accept=".gif, .jpeg, .jpg, .png">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
- <el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="submitForm('byform')"
|
|
|
- size="large"
|
|
|
- :loading="submitLoading"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button @click="dialogVisible = false" size="defualt" v-debounce>取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm('byform')" size="defualt" :loading="submitLoading" v-debounce>确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="导入产品"
|
|
|
- v-model="openExcelDialog"
|
|
|
- width="400"
|
|
|
- v-loading="excelLoading"
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- :action="actionUrl + '/productInfo/excelImportByEhsd'"
|
|
|
- :headers="headers"
|
|
|
- :on-success="handleSuccess"
|
|
|
- :on-progress="handleProgress"
|
|
|
- :show-file-list="false"
|
|
|
- :on-error="handleError"
|
|
|
- accept=".xlsx"
|
|
|
- >
|
|
|
+ <el-dialog title="导入产品" v-model="openExcelDialog" width="400" v-loading="excelLoading">
|
|
|
+ <el-upload :action="actionUrl + '/productInfo/excelImportByEhsd'" :headers="headers" :on-success="handleSuccess" :on-progress="handleProgress"
|
|
|
+ :show-file-list="false" :on-error="handleError" accept=".xlsx">
|
|
|
<el-button type="primary">点击导入</el-button>
|
|
|
</el-upload>
|
|
|
<template #footer>
|
|
|
- <el-button @click="openExcelDialog = false" size="large"
|
|
|
- >取 消</el-button
|
|
|
- >
|
|
|
+ <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-if="productContractDialog"
|
|
|
- v-model="productContractDialog"
|
|
|
- :title="'外销合同'"
|
|
|
- width="80%"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
+ <el-dialog v-if="productContractDialog" v-model="productContractDialog" :title="'外销合同'" width="80%" append-to-body>
|
|
|
<ProductContract :currentProductId="currentProductId"></ProductContract>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -376,7 +323,7 @@ const byform = ref(null);
|
|
|
const formConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
- type: "title",
|
|
|
+ type: "title1",
|
|
|
title: "基本信息",
|
|
|
},
|
|
|
{
|
|
@@ -384,7 +331,7 @@ const formConfig = computed(() => {
|
|
|
prop: "productClassifyId",
|
|
|
label: "产品分类",
|
|
|
data: treeListData.value,
|
|
|
- itemWidth: 100,
|
|
|
+ itemWidth: 50,
|
|
|
disabled: false,
|
|
|
style: {
|
|
|
width: "100%",
|
|
@@ -394,13 +341,14 @@ const formConfig = computed(() => {
|
|
|
type: "input",
|
|
|
prop: "name",
|
|
|
label: "产品名称",
|
|
|
- itemWidth: 100,
|
|
|
+ itemWidth: 50,
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
type: "slot",
|
|
|
slotName: "nameEnglish",
|
|
|
- label: "",
|
|
|
+ label: "英文名",
|
|
|
+ itemWidth: 50,
|
|
|
},
|
|
|
{
|
|
|
type: "slot",
|
|
@@ -409,7 +357,7 @@ const formConfig = computed(() => {
|
|
|
label: "产品图片",
|
|
|
},
|
|
|
{
|
|
|
- type: "title",
|
|
|
+ type: "title1",
|
|
|
title: "价格信息",
|
|
|
},
|
|
|
{
|
|
@@ -435,40 +383,41 @@ const formConfig = computed(() => {
|
|
|
data: accountCurrency.value,
|
|
|
},
|
|
|
{
|
|
|
- type: "title",
|
|
|
+ type: "title1",
|
|
|
title: "属性信息",
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "spec",
|
|
|
label: "规格型号",
|
|
|
- itemWidth: 100,
|
|
|
+ itemWidth: 50,
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
- type: "input",
|
|
|
+ type: "slot",
|
|
|
+ slotName: "productLong",
|
|
|
prop: "productLong",
|
|
|
label: "尺寸",
|
|
|
- itemWidth: 33.33,
|
|
|
- placeholder: "长(cm)",
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "productWide",
|
|
|
- label: " ",
|
|
|
- itemWidth: 33.33,
|
|
|
- placeholder: "宽(cm)",
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- prop: "productHigh",
|
|
|
- label: " ",
|
|
|
- itemWidth: 33.33,
|
|
|
- placeholder: "高(cm)",
|
|
|
+ itemWidth: 50,
|
|
|
+ // placeholder: "长(cm)",
|
|
|
disabled: false,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "productWide",
|
|
|
+ // label: "",
|
|
|
+ // itemWidth: 33.33,
|
|
|
+ // placeholder: "宽(cm)",
|
|
|
+ // disabled: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // prop: "productHigh",
|
|
|
+ // label: "",
|
|
|
+ // itemWidth: 33.33,
|
|
|
+ // placeholder: "高(cm)",
|
|
|
+ // disabled: false,
|
|
|
+ // },
|
|
|
{
|
|
|
type: "select",
|
|
|
prop: "innerPackMethod",
|
|
@@ -503,19 +452,13 @@ const formConfig = computed(() => {
|
|
|
type: "input",
|
|
|
prop: "netWeight",
|
|
|
label: "净重(kg)",
|
|
|
- itemWidth: 100,
|
|
|
- style: {
|
|
|
- width: "30%",
|
|
|
- },
|
|
|
+ itemWidth: 50,
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
prop: "hsCode",
|
|
|
label: "海关编码",
|
|
|
- itemWidth: 100,
|
|
|
- style: {
|
|
|
- width: "30%",
|
|
|
- },
|
|
|
+ itemWidth: 50,
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|