You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spms-vue/src/views/basic/basicCompanyProductsImport.vue

1219 lines
48 KiB
Vue

3 years ago
<template>
3 years ago
<div>
3 years ago
<el-card>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.supName" placeholder="配送企业" clearable="true"></el-input>
</el-form-item>
3 years ago
3 years ago
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</el-form-item>
3 years ago
3 years ago
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="submitSearch"></el-button>
<el-button type="primary" icon="search" @click="selectExport"
>选中导入
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
ref="diList"
highlight-current-row
:header-cell-class-name="cellClass"
@current-change="handleSelectionChange"
3 years ago
>
<el-table-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
3 years ago
<el-table-column label="序号" type="index"></el-table-column>
3 years ago
<el-table-column
label="最222小销售产品标识"
3 years ago
prop="nameCode"
width="140"
3 years ago
show-overflow-tooltip
></el-table-column>
<el-table-column
3 years ago
label="产品编码"
3 years ago
prop="thirdId"
show-overflow-tooltip
></el-table-column>
<el-table-column
3 years ago
label="生产企业"
prop="ylqxzcrbarmc"
3 years ago
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品通用名"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
3 years ago
label="规格型号"
prop="ggxh"
3 years ago
show-overflow-tooltip
></el-table-column>
3 years ago
3 years ago
<el-table-column
3 years ago
label="注册/备案凭证"
prop="zczbhhzbapzbh"
3 years ago
show-overflow-tooltip
></el-table-column>
3 years ago
<el-table-column
label="器械类别"
prop="qxlb"
show-overflow-tooltip
></el-table-column>
<el-table-column width="200" label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="产品信息详情"
:visible.sync="editDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="editDialogVisible"
3 years ago
>
3 years ago
<el-table :data="sysList" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="第三方系统名称"
prop="sysName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方产品名称"
prop="thirdName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方产品ID"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-table
v-loading="loading"
:data="detailList"
style="width: 100%; margin-top: 20px"
border
@current-change="handleDetail"
>
<el-table-column
label="产品标识"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品通用名"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装级别"
prop="packLevel"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装层级"
prop="bzcj"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-form
:model="editQuery"
:rules="rules"
ref="editQuery"
label-width="100px"
style="margin-top: 20px"
>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.cpmctymc"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品标识:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.nameCode"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
3 years ago
3 years ago
</el-row>
3 years ago
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>规格型号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ggxh"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
3 years ago
3 years ago
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>器械类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.qxlb"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.cplb"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>分类编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.flbm"
></el-input>
3 years ago
</div>
3 years ago
</el-col>
3 years ago
3 years ago
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sptm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ybbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医疗器械注册人:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="ylqxzcrbarmc"
v-model="editQuery.ylqxzcrbarmc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册人英文名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ylqxzcrbarywmc"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>统一社会信用号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.tyshxydm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册证/备案号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zczbhhzbapzbh"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>上级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装级别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.packLevel"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.bzcj"
:disabled="true"
3 years ago
3 years ago
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.bhxjsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhxjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含最小销售包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhzxxsbzsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含批号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.scbssfbhph"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含序列号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
v-model="editQuery.scbssfbhxlh"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含生产日期:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.scbssfbhscrq"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含失效日期:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
v-model="editQuery.scbssfbhsxrq"
size="small"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品描述:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.cpms"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>最小包装单元内包含使用单元数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zxxsbzbhsydysl"
></el-input>
</div>
</el-col>
</el-row>
</el-form>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-form
:model="repEditQuery"
ref="editQuery"
border
label-width="100px"
>
<el-row :gutter="20" class="el-row" type="flex">
<H3 style="margin-left: 10px;margin-bottom: 15px">{{ replTitle }}</H3>
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 15px">
3 years ago
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.sptm"
3 years ago
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.ybbm"
3 years ago
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
3 years ago
<span>计量单位:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.measname"
3 years ago
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
3 years ago
<span>生产厂家:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
3 years ago
v-model="repEditQuery.manufactory"
3 years ago
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
3 years ago
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
3 years ago
3 years ago
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
3 years ago
<span>商品名称:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.spmc"
3 years ago
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
3 years ago
<span>产品描述:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.cpms"
3 years ago
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
3 years ago
<span>产品价格:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
type='number'
step="0.01"
v-model="repEditQuery.price"
3 years ago
></el-input>
</div>
</el-col>
</el-row>
3 years ago
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable1">
3 years ago
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle1 }}:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak1"
3 years ago
></el-input>
</div>
</el-col>
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable2">
3 years ago
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle2 }}:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak2"
3 years ago
></el-input>
</div>
</el-col>
</el-row>
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable3">
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle3 }}:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak3"
></el-input>
</div>
</el-col>
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable4">
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle4 }}:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak4"
></el-input>
</div>
</el-col>
</el-row>
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable5">
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle5 }}:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak5"
></el-input>
</div>
</el-col>
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable6">
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle6 }}:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak6"
></el-input>
</div>
</el-col>
</el-row>
3 years ago
<el-row :gutter="20" class="el-row" type="flex">
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable7">
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle7 }}:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak7"
></el-input>
</div>
</el-col>
3 years ago
<el-col :span="12" class="el-col" v-if="productRemarkSet.remarkEnable8">
3 years ago
<div class="text item">
<div class="itemTag">
3 years ago
<span>{{ productRemarkSet.remarkTitle8 }}:&nbsp;</span>
3 years ago
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
3 years ago
v-model="repEditQuery.basicPrductRemak8"
3 years ago
></el-input>
</div>
</el-col>
</el-row>
</el-form>
3 years ago
</el-card>
3 years ago
</div>
3 years ago
</template>
<script>
import {
3 years ago
updateErpProduct,
thirdSysDetail,
getSmUdiInfos
} from "../../api/basic/udiRelevance";
import {udiUpload} from "../../api/thrsys/smp"
3 years ago
import {finProductSet, selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterByUuid} from "../../api/basic/udiInfo";
import {
3 years ago
insertCompanyProductRelevance,
3 years ago
insertFilter
} from "../../api/warehouse/companyProductRelevance";
import store from "../../store";
export default {
3 years ago
name: "UdIInfoSelect",
props: {
selectType: {
type: Object,
required: true,
},
closeSelDialog: {
type: Function,
required: true,
},
},
3 years ago
data() {
return {
radioCheck:null,
3 years ago
filterQuery: {
customerId: null,
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
3 years ago
limit: 10,
3 years ago
addType: 1,
isDisable: false,
3 years ago
3 years ago
},
3 years ago
postQuery: {
customerId: null,
uuids: [],
rlIds: [],
supplementRequest: null,
},
loading: false,
3 years ago
editQuery: null,
3 years ago
repEditQuery: {},
3 years ago
relevanceEdit: {
id: null,
thirdId: "",
isUseDy: false,
},
3 years ago
replTitle: "产品信息补齐:",
3 years ago
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
total: 0,
thirdNo: "",
uuid: "111",
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
3 years ago
currentRow: null,
3 years ago
multipleSelection: [],
editDialogVisible: false,
selectUdiDialogVisible: false,
selectErpDialogVisible: false,
selectLocalVisible: false,
3 years ago
productRemarkSet: {},
supplementRequest: null,
3 years ago
};
},
3 years ago
methods: {
onReset() {
this.radioCheck=null;
3 years ago
this.$router.push({
path: "",
});
this.filterQuery = {
customerId: null,
ylqxzcrbarmc: "",
supName: null,
3 years ago
cpmctymc: "",
nameCode: "",
page: 1,
3 years ago
limit: 10,
3 years ago
addType: 1,
};
this.getList();
},
submitSearch() {
this.filterQuery.page = 1;
this.getList();
},
3 years ago
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
getSmUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getDetailList(detailQuery) {
this.loading = true;
filterByUuid(detailQuery)
.then((response) => {
this.loading = false;
this.detailList = response.data || [];
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
},
handleDetail(row) {
this.editQuery = row;
},
combine() {
this.combineQuery.productUuid = this.currentRow.uuid;
this.combineQuery.customerId = store.getters.customerId;
insertCompanyProductRelevance(this.combineQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
},
cellClass(row){
if (row.columnIndex === 0) {
return 'disabledCheck'
}
},
3 years ago
selectExport() {
3 years ago
var selectData = this.multipleSelection;
if (selectData == null || selectData.length == 0) {
this.$message.warning("请先选入产品!");
return;
}
3 years ago
if (this.repEditQuery.price<0) {
this.$message.error("产品价格不能小于0元");
return;
}
this.postQuery.rlIds.push(selectData.id);
3 years ago
this.allExport();
},
allExport() {
3 years ago
this.postQuery.customerId = store.getters.customerId;
this.postQuery.supplementRequest = this.repEditQuery;
insertFilter(this.postQuery).then(response => {
3 years ago
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
this.$emit("closeSelDialog", true);
this.closeSelDialog();
} else {
this.$message.error(response.message);
}
});
},
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
intentImportErp(val) {
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.selectErpDialogVisible = true;
},
uploadSMP() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
3 years ago
this.postQuery.uuids.push(obj.uuid);
3 years ago
});
this.allUploadSMP();
},
allUploadSMP() {
3 years ago
udiUpload(this.postQuery)
3 years ago
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
this.$emit("cancelDialog", true);
});
},
3 years ago
handleSelectionChange(selection) {
this.radioCheck=selection.id;
this.curSelectDi = selection;
3 years ago
if (selection.length > 1) {
this.$refs.diList.clearSelection();
this.$refs.diList.toggleRowSelection(selection.pop());
}
3 years ago
this.multipleSelection = selection
this.currentRow = selection;
3 years ago
this.replTitle = "(" + this.currentRow.cpmctymc + ")" + "产品信息补齐:";
},
handleErpChange(val) {
this.currentRow = val;
},
3 years ago
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleModifyClick(row) {
this.editDialogVisible = true;
this.editQuery = row;
this.relevanceEdit = {
id: row.id,
thirdId: row.thirdId,
isUseDy: row.isUseDy,
};
this.checked = row.isUseDy == 1;
let ttquery = {
uuid: row.uuid,
page: 1,
limit: 10,
};
this.getDetailList(ttquery);
this.getThirdSysDetail();
},
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
if (val) {
this.getList();
}
3 years ago
},
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
checkSelectable(row) {
return !row.isSelect;
},
uploadErpProduct() {
updateErpProduct()
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: response.data,
});
this.$emit("closeDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
},
selectSysParam() {
let query = {
paramKey: "smp_isUploadProuct",
};
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isUploadSmp = true;
}
}
});
3 years ago
let query1 = {
paramKey: "upload_pi_file_enabled",
};
selectSysParamByKey(query1).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isImportFile = true;
}
}
});
let query2 = {
paramKey: "upload_pi_file_url",
};
selectSysParamByKey(query2).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.paramValue;
}
});
},
3 years ago
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data;
} else {
//出错了
}
});
},
},
3 years ago
mounted() {
},
3 years ago
components: {},
created() {
this.selectSysParam();
3 years ago
this.findBasicProductSet();
},
};
3 years ago
</script>
<style scoped>
.el-table .disabledCheck .cell .el-checkbox .el-checkbox__input{
display: none !important;
}
.itemTag {
3 years ago
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.query-form-item {
3 years ago
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.text {
3 years ago
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
3 years ago
display: flex;
flex-wrap: wrap;
3 years ago
margin-bottom: 6px;
}
.el-col {
3 years ago
border-radius: 4px;
flex-wrap: wrap;
}
3 years ago
</style>