提交 7204aeb1 编写于 作者: zhongyao.qiao's avatar zhongyao.qiao

feat 内部隐藏新增药品

上级 03538aad
<template> <template>
<div class="create-shop-wrapper-new"> <div class="create-shop-wrapper-new">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird"></bread-crumb> <bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond"
:curmbThird="curmbThird"
:jumPathThird="jumPathThird"
></bread-crumb>
<div class="create-shop-content screenSet" id="screenSet"> <div class="create-shop-content screenSet" id="screenSet">
<el-row class="step-content"> <el-row class="step-content">
<el-col :span="20"> <el-col :span="20">
<p class="title">{{title}}</p> <p class="title">{{ title }}</p>
</el-col> </el-col>
<el-col :span="4" style="text-align: right"> <el-col :span="4" style="text-align: right">
<el-button size="small" @click="cancelComplete">取消</el-button> <el-button size="small" @click="cancelComplete">取消</el-button>
<el-button size="small" type="primary" @click="complete">保存</el-button> <el-button size="small" type="primary" @click="complete"
>保存</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-form <el-form
...@@ -19,7 +26,6 @@ ...@@ -19,7 +26,6 @@
label-suffix=":" label-suffix=":"
class="basic-form" class="basic-form"
> >
<div class="basic-item-icon"> <div class="basic-item-icon">
<div class="part-tit">基本信息</div> <div class="part-tit">基本信息</div>
<el-form-item label="商品分类" class="goods-category"> <el-form-item label="商品分类" class="goods-category">
...@@ -33,9 +39,18 @@ ...@@ -33,9 +39,18 @@
v-model="goodsCategoryIdList" v-model="goodsCategoryIdList"
@change="searchCategoryChange" @change="searchCategoryChange"
/> />
<div v-if="isgoodsCategory" :style="{color: '#f56c6c',fontSize: '12px'}">请选择商品分类</div> <div
v-if="isgoodsCategory"
:style="{ color: '#f56c6c', fontSize: '12px' }"
>
请选择商品分类
</div>
</el-form-item> </el-form-item>
<el-form-item label="项目-合同名称" prop="cooperationProjectId" class="project-req"> <el-form-item
label="项目-合同名称"
prop="cooperationProjectId"
class="project-req"
>
<el-select <el-select
v-model="formData3.cooperationProjectId" v-model="formData3.cooperationProjectId"
placeholder="请选择" placeholder="请选择"
...@@ -44,10 +59,11 @@ ...@@ -44,10 +59,11 @@
@change="getContract" @change="getContract"
@clear="projectClear" @clear="projectClear"
clearable clearable
filterable> filterable
>
<el-option <el-option
v-for="(item,index) in cooperationProjectList" v-for="(item, index) in cooperationProjectList"
:key="item.projectName+'-'+index" :key="item.projectName + '-' + index"
:label="item.projectName" :label="item.projectName"
:value="item.cooperationProjectId" :value="item.cooperationProjectId"
></el-option> ></el-option>
...@@ -61,33 +77,84 @@ ...@@ -61,33 +77,84 @@
@change="contractChange" @change="contractChange"
> >
<el-option <el-option
v-for="(item,index) in contractList" v-for="(item, index) in contractList"
:key="item.contractName+'-'+index" :key="item.contractName + '-' + index"
:label="item.contractName" :label="item.contractName"
:value="item.contractId" :value="item.contractId"
></el-option> ></el-option>
</el-select> </el-select>
<div class="project-tip">未找到项目名称请联系产品经理添加</div> <div class="project-tip">未找到项目名称请联系产品经理添加</div>
<div v-if="isProjectId" :style="{color: '#f56c6c',fontSize: '12px'}">请关联项目名称</div> <div
v-if="isProjectId"
:style="{ color: '#f56c6c', fontSize: '12px' }"
>
请关联项目名称
</div>
</el-form-item> </el-form-item>
<el-form-item label="选择基础药品" prop="choiceGoods" class="choice-goods"> <el-form-item
label="选择基础药品"
prop="choiceGoods"
class="choice-goods"
>
<el-col :span="16"> <el-col :span="16">
<el-button type="primary" @click="addMed" :disabled="isShowGoods">+添加药品</el-button> <el-button type="primary" @click="addMed" :disabled="isShowGoods"
<el-button @click="addNewGoods" :disabled="isShowGoods" class="add-btn">新增药品</el-button> >+添加药品</el-button
<div v-if="isShowGoodsMsg && !isShowGoods" :style="{color: '#f56c6c',fontSize: '12px'}">请选择基础药品</div> >
<el-button
v-if="idType === 2"
@click="addNewGoods"
:disabled="isShowGoods"
class="add-btn"
>新增药品</el-button
>
<div
v-if="isShowGoodsMsg && !isShowGoods"
:style="{ color: '#f56c6c', fontSize: '12px' }"
>
请选择基础药品
</div>
</el-col> </el-col>
<el-table <el-table
v-if="isShowGoods" v-if="isShowGoods"
:data="choiceMedData" :data="choiceMedData"
ref="singlTable" ref="singlTable"
class="show-goods-table"> class="show-goods-table"
<el-table-column property="productName" label="产品名称/通用名称" width="180"></el-table-column> >
<el-table-column property="barCode" label="条形码" width="180"></el-table-column> <el-table-column
<el-table-column property="goodsName" label="商品名称" width="180"></el-table-column> property="productName"
<el-table-column property="approvalNumber" label="批准文号" width="180"></el-table-column> label="产品名称/通用名称"
<el-table-column property="specifications" label="规格" width="180"></el-table-column> width="180"
<el-table-column property="productionCompany" label="生产企业" width="180"></el-table-column> ></el-table-column>
<el-table-column label="操作" width="180"><span class="del-goods" @click="delGoods">删除</span></el-table-column> <el-table-column
property="barCode"
label="条形码"
width="180"
></el-table-column>
<el-table-column
property="goodsName"
label="商品名称"
width="180"
></el-table-column>
<el-table-column
property="approvalNumber"
label="批准文号"
width="180"
></el-table-column>
<el-table-column
property="specifications"
label="规格"
width="180"
></el-table-column>
<el-table-column
property="productionCompany"
label="生产企业"
width="180"
></el-table-column>
<el-table-column label="操作" width="180"
><span class="del-goods" @click="delGoods"
>删除</span
></el-table-column
>
</el-table> </el-table>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="goodsName"> <el-form-item label="商品名称" prop="goodsName">
...@@ -114,8 +181,12 @@ ...@@ -114,8 +181,12 @@
maxlength="40" maxlength="40"
show-word-limit show-word-limit
></el-input> ></el-input>
<span class="word-tip">此文案可摘取药品说明书【功能主治】or【适应症】</span> <span class="word-tip"
<span class="word-show" @click="shoImgDialog = true">查看展示位置</span> >此文案可摘取药品说明书【功能主治】or【适应症】</span
>
<span class="word-show" @click="shoImgDialog = true"
>查看展示位置</span
>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="商品头图" class="required-label"> <el-form-item label="商品头图" class="required-label">
...@@ -129,7 +200,11 @@ ...@@ -129,7 +200,11 @@
:on-exceed="imgExceed" :on-exceed="imgExceed"
:limit="6" :limit="6"
> >
<img class="bg-img" src="../../assets/image/small.png" v-if="fileGoodsList.length < 6"/> <img
class="bg-img"
src="../../assets/image/small.png"
v-if="fileGoodsList.length < 6"
/>
<div class="limit-text" v-if="fileGoodsList.length < 6"> <div class="limit-text" v-if="fileGoodsList.length < 6">
<p>建议尺寸:750*750</p> <p>建议尺寸:750*750</p>
<p>支持jpeg, png格式</p> <p>支持jpeg, png格式</p>
...@@ -140,22 +215,35 @@ ...@@ -140,22 +215,35 @@
</el-form-item> </el-form-item>
<el-form-item label="" class="required-label"> <el-form-item label="" class="required-label">
<div class="bg-uploader"> <div class="bg-uploader">
<draggable class="image-wrapper" :animation="1000" v-model="fileGoodsList" :sort="true"> <draggable
class="image-wrapper"
:animation="1000"
v-model="fileGoodsList"
:sort="true"
>
<div :key="item.uid" v-for="(item, index) in fileGoodsList"> <div :key="item.uid" v-for="(item, index) in fileGoodsList">
<div class="img-box"> <div class="img-box">
<div class="file-pics" v-if="fileGoodsList.length > 0" > <div class="file-pics" v-if="fileGoodsList.length > 0">
<img :src="item.url" @mouseover.stop="headIndex=index" class="bg-img"/> <img
:src="item.url"
@mouseover.stop="headIndex = index"
class="bg-img"
/>
<div <div
class="img-delete" class="img-delete"
v-if="headIndex==index" v-if="headIndex == index"
@click.stop="deleteImg(item, fileGoodsList)" @click.stop="deleteImg(item, fileGoodsList)"
@mouseout.stop="headIndex=-1" @mouseout.stop="headIndex = -1"
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</div> </div>
<div class="checkbox" @click.stop> <div class="checkbox" @click.stop>
<el-checkbox :true-label="0" :false-label="1" v-model="fileGoodsList[index].miniProgramShow"></el-checkbox> <el-checkbox
:true-label="0"
:false-label="1"
v-model="fileGoodsList[index].miniProgramShow"
></el-checkbox>
</div> </div>
</div> </div>
</div> </div>
...@@ -174,22 +262,44 @@ ...@@ -174,22 +262,44 @@
action="#" action="#"
class="bg-uploader" class="bg-uploader"
> >
<video
<video id="introVideoLecture" :src="videoModel.videoFullPath" controls preload style="width: 100%;" v-if="videoList.length == 1"> id="introVideoLecture"
:src="videoModel.videoFullPath"
controls
preload
style="width: 100%"
v-if="videoList.length == 1"
>
视频 视频
</video> </video>
<img class="bg-img" src="../../assets/image/video.png" v-if="videoList.length <1"/> <img
<div class="limit-text" v-if="videoList.length <1"> class="bg-img"
src="../../assets/image/video.png"
v-if="videoList.length < 1"
/>
<div class="limit-text" v-if="videoList.length < 1">
<p>建议大小:20M以内</p> <p>建议大小:20M以内</p>
<p>仅支持MP4格式</p> <p>仅支持MP4格式</p>
<P>视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)</P> <P>视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)</P>
</div> </div>
</el-upload> </el-upload>
<el-progress :text-inside="true" :stroke-width="16" :percentage="uploadProgress" status="success" class="video-progress" <el-progress
v-show="uploadProgress>0&&uploadProgress<100"> :text-inside="true"
:stroke-width="16"
:percentage="uploadProgress"
status="success"
class="video-progress"
v-show="uploadProgress > 0 && uploadProgress < 100"
>
</el-progress> </el-progress>
<el-button class="dl-video" icon="el-icon-delete" circle @click="deleteVideo" v-if="videoList.length == 1"></el-button> <el-button
class="dl-video"
icon="el-icon-delete"
circle
@click="deleteVideo"
v-if="videoList.length == 1"
></el-button>
</el-form-item> </el-form-item>
<el-form-item label="商品详情图片(视频)" class="label-detailimg"> <el-form-item label="商品详情图片(视频)" class="label-detailimg">
...@@ -199,36 +309,64 @@ ...@@ -199,36 +309,64 @@
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadPic1" :before-upload="beforeUploadPic1"
> >
<img class="bg-img" src="../../assets/image/uploadImgOrVideo.png" /> <img
class="bg-img"
src="../../assets/image/uploadImgOrVideo.png"
/>
<div class="limit-text"> <div class="limit-text">
<p>视频:20M以内,仅支持MP4格式,视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)</p> <p>
视频:20M以内,仅支持MP4格式,视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)
</p>
<p>图片:2M以内,支持jpeg, png格式</p> <p>图片:2M以内,支持jpeg, png格式</p>
</div> </div>
</el-upload> </el-upload>
<p class="upload-message" v-if="!isSpecification_url">请上传商品详情图片</p> <p class="upload-message" v-if="!isSpecification_url">
请上传商品详情图片
</p>
<p class="word-tip">勾选的详情在云鹊健康小程序不可见</p> <p class="word-tip">勾选的详情在云鹊健康小程序不可见</p>
</el-form-item> </el-form-item>
<el-form-item label="" class="required-label"> <el-form-item label="" class="required-label">
<div class="bg-uploader"> <div class="bg-uploader">
<draggable class="image-wrapper" :animation="1000" v-model="fileIntrList" :sort="true"> <draggable
class="image-wrapper"
:animation="1000"
v-model="fileIntrList"
:sort="true"
>
<div :key="item.uid" v-for="(item, index) in fileIntrList"> <div :key="item.uid" v-for="(item, index) in fileIntrList">
<div class="img-box"> <div class="img-box">
<div class="file-pics" v-if="item.url || item.imageUrl"> <div class="file-pics" v-if="item.url || item.imageUrl">
<img v-if="item.imageType==4" :src="item.url" @mouseover.stop="intrIndex=index" class="bg-img"/> <img
<video v-if="item.imageType==5" @mouseover.stop="intrIndex=index" :src="item.imageUrl" controls preload style="width: 100%;height:100%; object-fit:fill" > v-if="item.imageType == 4"
:src="item.url"
@mouseover.stop="intrIndex = index"
class="bg-img"
/>
<video
v-if="item.imageType == 5"
@mouseover.stop="intrIndex = index"
:src="item.imageUrl"
controls
preload
style="width: 100%; height: 100%; object-fit: fill"
>
视频 视频
</video> </video>
<div <div
class="img-delete" class="img-delete"
v-if="intrIndex==index" v-if="intrIndex == index"
@click.stop="deleteImg(item, fileIntrList)" @click.stop="deleteImg(item, fileIntrList)"
@mouseout.stop="intrIndex=-1" @mouseout.stop="intrIndex = -1"
> >
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</div> </div>
<div class="checkbox" @click.stop> <div class="checkbox" @click.stop>
<el-checkbox :true-label="0" :false-label="1" v-model="fileIntrList[index].miniProgramShow"></el-checkbox> <el-checkbox
:true-label="0"
:false-label="1"
v-model="fileIntrList[index].miniProgramShow"
></el-checkbox>
</div> </div>
</div> </div>
</div> </div>
...@@ -249,11 +387,12 @@ ...@@ -249,11 +387,12 @@
<div class="basic-item-icon"> <div class="basic-item-icon">
<div class="part-tit">销售信息</div> <div class="part-tit">销售信息</div>
<div class="inline"> <div class="inline">
<el-form-item label="销售方式" prop="saleType"> <el-form-item label="销售方式" prop="saleType">
<el-radio-group v-model="formData.saleType" size="small"> <el-radio-group v-model="formData.saleType" size="small">
<el-radio :label="1">零售</el-radio> <el-radio :label="1">零售</el-radio>
<el-radio :label="2" :disabled="commissionFlag == 1">批发</el-radio> <el-radio :label="2" :disabled="commissionFlag == 1"
>批发</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</div> </div>
...@@ -261,28 +400,60 @@ ...@@ -261,28 +400,60 @@
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="零售价" prop="optPrice"> <el-form-item label="零售价" prop="optPrice">
<el-col :span="20"> <el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0.00" :max="99999.99"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.optPrice"
size="small"
:precision="2"
:min="0.0"
:max="99999.99"
></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline"> <div class="inline">
<el-form-item label="成本价" prop="realCostPrice"> <el-form-item label="成本价" prop="realCostPrice">
<el-col :span="20"> <el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.realCostPrice" size="small" :precision="2" :min="0.00" :max="99999.99"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.realCostPrice"
size="small"
:precision="2"
:min="0.0"
:max="99999.99"
></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 2"> <div class="inline" v-if="formData.saleType == 2">
<el-form-item label="批发价" prop="optPrice"> <el-form-item label="批发价" prop="optPrice">
<el-col :span="20"> <el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0" :max="20000000.00"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.optPrice"
size="small"
:precision="2"
:min="0"
:max="20000000.0"
></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="绩效分值"> <el-form-item label="绩效分值">
<el-col :span="20"> <el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.scorePerformance" size="small" :precision="2" :min="0.00" :max="999999.99"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.scorePerformance"
size="small"
:precision="2"
:min="0.0"
:max="999999.99"
></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
...@@ -290,43 +461,89 @@ ...@@ -290,43 +461,89 @@
<el-form-item label="库存" prop="stock" class="required-label"> <el-form-item label="库存" prop="stock" class="required-label">
<el-col :span="20"> <el-col :span="20">
<div class="stock-com"> <div class="stock-com">
<span class="sp sp-l" @click="changeStock(1)" :class="{'opac':formData.stock == 0}"><i class="el-icon-minus"></i></span> <span
<span class="sp sp-c">{{formData.stock}}</span> class="sp sp-l"
<span class="sp sp-r" @click="changeStock(2)"><i class="el-icon-plus"></i></span> @click="changeStock(1)"
:class="{ opac: formData.stock == 0 }"
><i class="el-icon-minus"></i
></span>
<span class="sp sp-c">{{ formData.stock }}</span>
<span class="sp sp-r" @click="changeStock(2)"
><i class="el-icon-plus"></i
></span>
</div> </div>
<p class="error-message" v-if="!isgoodStock">库存不能为0</p> <p class="error-message" v-if="!isgoodStock">库存不能为0</p>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType ==1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="最小起购件数" prop="leastCount" class="required-label"> <el-form-item
label="最小起购件数"
prop="leastCount"
class="required-label"
>
<el-col :span="20"> <el-col :span="20">
<div class="stock-com" style="width: 500px;display:flex"> <div class="stock-com" style="width: 500px; display: flex">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.leastCount" size="small" :precision="0" :min="0" :max="9999"></el-input-number> <el-input-number
<span class="word-num" style="margin-left: 10px;">最高9999件哦</span> class="stock-com"
@input="$forceUpdate()"
v-model="formData.leastCount"
size="small"
:precision="0"
:min="0"
:max="9999"
></el-input-number>
<span class="word-num" style="margin-left: 10px"
>最高9999件哦</span
>
</div> </div>
<p class="error-message" v-if="formData.leastCount <= 0">最小起购件数不能为0</p> <p class="error-message" v-if="formData.leastCount <= 0">
最小起购件数不能为0
</p>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.leastCount > 1 || formData.saleType ==2"> <div
class="inline"
v-if="formData.leastCount > 1 || formData.saleType == 2"
>
<el-form-item label="递增方式"> <el-form-item label="递增方式">
<el-col :span="24"> <el-col :span="24">
<el-radio size="mini" v-model="formData.incrType" :label="2">倍数递增</el-radio> <el-radio size="mini" v-model="formData.incrType" :label="2"
<el-radio v-model="formData.incrType" :label="1">1件递增</el-radio> >倍数递增</el-radio
>
<el-radio v-model="formData.incrType" :label="1"
>1件递增</el-radio
>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="单次购买上限" prop="mostCount" class="required-label"> <el-form-item
<el-col :span="20" style="width: 300%;"> label="单次购买上限"
<div class="stock-com" style="width: 500px;display:flex"> prop="mostCount"
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.mostCount" size="small" :precision="0" :min="-1" :max="9999"></el-input-number> class="required-label"
<span class="word-num" style="margin-left: 10px;">数值为-1时,代表单次购买上限已无限制(最高9999件哦)</span> >
<el-col :span="20" style="width: 300%">
<div class="stock-com" style="width: 500px; display: flex">
<el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.mostCount"
size="small"
:precision="0"
:min="-1"
:max="9999"
></el-input-number>
<span class="word-num" style="margin-left: 10px"
>数值为-1时,代表单次购买上限已无限制(最高9999件哦)</span
>
</div> </div>
<p class="error-message" v-if="formData.mostCount === 0">单次购买上限不能为0</p> <p class="error-message" v-if="formData.mostCount === 0">
单次购买上限不能为0
</p>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
...@@ -344,90 +561,151 @@ ...@@ -344,90 +561,151 @@
<div class="inline"> <div class="inline">
<el-form-item label="阳性报销上限" prop="reimburseMax"> <el-form-item label="阳性报销上限" prop="reimburseMax">
<el-col :span="20"> <el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.reimburseMax" size="small" :precision="2" :min="0.00" :max="99999.99"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.reimburseMax"
size="small"
:precision="2"
:min="0.0"
:max="99999.99"
></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 2"> <div class="inline" v-if="formData.saleType == 2">
<el-form-item label="最小起批" prop="minWhole" class="required-label"> <el-form-item
label="最小起批"
prop="minWhole"
class="required-label"
>
<el-col :span="20"> <el-col :span="20">
<div class="stock-com" style="width: 500px;display:flex"> <div class="stock-com" style="width: 500px; display: flex">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.minWhole" size="small" :precision="0" :min="1"></el-input-number> <el-input-number
class="stock-com"
@input="$forceUpdate()"
v-model="formData.minWhole"
size="small"
:precision="0"
:min="1"
></el-input-number>
</div> </div>
<p class="error-message" v-if="formData.minWhole <= 0">最小起批不能为0</p> <p class="error-message" v-if="formData.minWhole <= 0">
最小起批不能为0
</p>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="是否支持售后" prop="expressLimitFlag" v-if="storeType < 3"> <el-form-item
<el-radio-group v-model="formData.expressLimitFlag" :disabled="!hasRepoFlag" @change="radioChange"> label="是否支持售后"
prop="expressLimitFlag"
v-if="storeType < 3"
>
<el-radio-group
v-model="formData.expressLimitFlag"
:disabled="!hasRepoFlag"
@change="radioChange"
>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
<p class="backTip" v-if="!hasRepoFlag" @click="goShopDeatil">若需设置商品支持售后,需先至店铺页<span class="ad-back">设置售后地址</span></p> <p class="backTip" v-if="!hasRepoFlag" @click="goShopDeatil">
若需设置商品支持售后,需先至店铺页<span class="ad-back"
>设置售后地址</span
>
</p>
</el-form-item> </el-form-item>
</div> </div>
<div class="basic-item-icon" v-if="formData.saleType == 1"> <div class="basic-item-icon" v-if="formData.saleType == 1">
<div class="part-tit">限购条件</div> <div class="part-tit">限购条件</div>
<div v-for="(item, index) in buyLimitDtoList" :key="index" > <div v-for="(item, index) in buyLimitDtoList" :key="index">
<el-form-item label="限制条件"> <el-form-item label="限制条件">
<el-button @click="delLimit(index)" type="text" size="small">删除</el-button> <el-button @click="delLimit(index)" type="text" size="small"
>删除</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="限制对象"> <el-form-item label="限制对象">
<el-col :span="10"> <el-col :span="10">
<el-radio-group v-model="item.limitUserType" size="small" @change="changeLimitUserType(item,index)"> <el-radio-group
v-model="item.limitUserType"
size="small"
@change="changeLimitUserType(item, index)"
>
<el-radio :label="1">开单人</el-radio> <el-radio :label="1">开单人</el-radio>
<el-radio :label="2">患者</el-radio> <el-radio :label="2">患者</el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="购买限制"> <el-form-item label="购买限制">
<el-input-number v-model="item.days" style="margin-left: 5px;" size="small" :precision="0" :min="1" :max="100000"></el-input-number> <el-input-number
<el-select v-model="item.days"
v-model="item.daysType" style="margin-left: 5px"
size="small"> size="small"
:precision="0"
:min="1"
:max="100000"
></el-input-number>
<el-select v-model="item.daysType" size="small">
<el-option <el-option
v-for="(item,index) in daysTypeList" v-for="(item, index) in daysTypeList"
:key="index" :key="index"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
<span style="margin-left: 5px;">内,最多购买</span> <span style="margin-left: 5px">内,最多购买</span>
<el-input-number v-model="item.limitCount" style="margin-left: 5px;" size="small" :precision="0" :min="1" :max="100000"></el-input-number> <el-input-number
<span style="margin-left: 5px;"></span> v-model="item.limitCount"
style="margin-left: 5px"
size="small"
:precision="0"
:min="1"
:max="100000"
></el-input-number>
<span style="margin-left: 5px"></span>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline"> <div class="inline">
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="addBuyingLimit"><i class="el-icon-plus"></i>限购条件</el-button> <el-button size="small" type="primary" @click="addBuyingLimit"
><i class="el-icon-plus"></i>限购条件</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
</el-form> </el-form>
<el-dialog <el-dialog
:title="stock.title" :title="stock.title"
:visible.sync="stockDio" :visible.sync="stockDio"
width="30%" width="30%"
center> center
>
<div class="stock-dia"> <div class="stock-dia">
<div class="stock-item">更新库存后,将影响买家购买,请谨慎操作</div> <div class="stock-item">更新库存后,将影响买家购买,请谨慎操作</div>
<div class="stock-item">当前库存:{{formData.goodsStock}}</div> <div class="stock-item">当前库存:{{ formData.goodsStock }}</div>
<div class="demo-input-suffix"> <div class="demo-input-suffix">
{{stock.type == 1 ? '减少数量' : '增加数量'}} {{ stock.type == 1 ? "减少数量" : "增加数量" }}
<el-input v-model="stock.num" :placeholder="stock.placeholderTxt" maxLength="8" style="width: 180px;"></el-input> <el-input
v-model="stock.num"
:placeholder="stock.placeholderTxt"
maxLength="8"
style="width: 180px"
></el-input>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer" style="text-align: right;"> <span slot="footer" class="dialog-footer" style="text-align: right">
<el-button type="primary" @click="updateStock">完成</el-button> <el-button type="primary" @click="updateStock">完成</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<!-- 添加药品 --> <!-- 添加药品 -->
<el-dialog title="添加药品" :visible.sync="baseAddVisible" class="add-goods-dialog" width="70%"> <el-dialog
title="添加药品"
:visible.sync="baseAddVisible"
class="add-goods-dialog"
width="70%"
>
<el-row type="flex" class="row-bg"> <el-row type="flex" class="row-bg">
<el-col :span="21"> <el-col :span="21">
<el-input <el-input
...@@ -438,7 +716,14 @@ ...@@ -438,7 +716,14 @@
placeholder="试试搜索:药品69开头条形码/通用名称/商品名称/拼音首字母" placeholder="试试搜索:药品69开头条形码/通用名称/商品名称/拼音首字母"
></el-input> ></el-input>
</el-col> </el-col>
<el-col :span="2"><el-button type="primary" @click="getSearchInfo" class="add-goods-search">搜索</el-button></el-col> <el-col :span="2"
><el-button
type="primary"
@click="getSearchInfo"
class="add-goods-search"
>搜索</el-button
></el-col
>
</el-row> </el-row>
<el-table <el-table
:data="medData" :data="medData"
...@@ -446,13 +731,36 @@ ...@@ -446,13 +731,36 @@
highlight-current-row highlight-current-row
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@row-click="handleRowClick" @row-click="handleRowClick"
class="add-goods-table"> class="add-goods-table"
<el-table-column property="productName" label="产品名称/通用名称" width="150"></el-table-column> >
<el-table-column property="barCode" label="条形码" width="200"></el-table-column> <el-table-column
<el-table-column property="goodsName" label="商品名称"></el-table-column> property="productName"
<el-table-column property="approvalNumber" label="批准文号" width="150"></el-table-column> label="产品名称/通用名称"
<el-table-column property="specifications" label="规格" width="200"></el-table-column> width="150"
<el-table-column property="productionCompany" label="生产企业"></el-table-column> ></el-table-column>
<el-table-column
property="barCode"
label="条形码"
width="200"
></el-table-column>
<el-table-column
property="goodsName"
label="商品名称"
></el-table-column>
<el-table-column
property="approvalNumber"
label="批准文号"
width="150"
></el-table-column>
<el-table-column
property="specifications"
label="规格"
width="200"
></el-table-column>
<el-table-column
property="productionCompany"
label="生产企业"
></el-table-column>
</el-table> </el-table>
<div class="add-goods--pagination"> <div class="add-goods--pagination">
<el-pagination <el-pagination
...@@ -474,33 +782,56 @@ ...@@ -474,33 +782,56 @@
</el-row> </el-row>
</el-dialog> </el-dialog>
<!-- 新增药品 --> <!-- 新增药品 -->
<el-dialog title="新增药品" :visible.sync="isNewMeddialog" class="add-med-dialog"> <el-dialog
<el-form :model="formData1" ref="formData1" :rules="rules1" label-width="150px" title="新增药品"
label-suffix=":"> :visible.sync="isNewMeddialog"
class="add-med-dialog"
>
<el-form
:model="formData1"
ref="formData1"
:rules="rules1"
label-width="150px"
label-suffix=":"
>
<el-form-item label="药品分类" prop="medicalCategoryId"> <el-form-item label="药品分类" prop="medicalCategoryId">
<el-select v-model="formData1.medicalCategoryId" clearable placeholder="请选择药品分类" @change="medicalChange"> <el-select
v-model="formData1.medicalCategoryId"
clearable
placeholder="请选择药品分类"
@change="medicalChange"
>
<el-option <el-option
v-for="item in medicalCategoryList" v-for="item in medicalCategoryList"
:key="item.id" :key="item.id"
:label="item.categoryName" :label="item.categoryName"
:value="item.id"> :value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<div v-if="formData1.medicalCategoryId"> <div v-if="formData1.medicalCategoryId">
<el-form-item :label="mCommonName" prop="medicCommonName" class="medic-goods-max"> <el-form-item
:label="mCommonName"
prop="medicCommonName"
class="medic-goods-max"
>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.medicCommonName" v-model="formData1.medicCommonName"
:placeholder="mCommonNameLabel" :placeholder="mCommonNameLabel"
style="width:70%;" style="width: 70%"
maxlength="60" maxlength="60"
show-word-limit show-word-limit
></el-input> ></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="条形码" prop="barCode" v-if="![4,5].includes(formData1.medicalCategoryId)"> <el-form-item
label="条形码"
prop="barCode"
v-if="![4, 5].includes(formData1.medicalCategoryId)"
>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
...@@ -512,7 +843,11 @@ ...@@ -512,7 +843,11 @@
<span class="word-num">(点击可快速录入下面的基本信息)</span> <span class="word-num">(点击可快速录入下面的基本信息)</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="commonName" prop="medicGoodsName" class="medic-goods-max"> <el-form-item
:label="commonName"
prop="medicGoodsName"
class="medic-goods-max"
>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
...@@ -526,37 +861,49 @@ ...@@ -526,37 +861,49 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
<!-- 批准文号 --> <!-- 批准文号 -->
<el-form-item label="批准文号" prop="approvalNumber" v-if="![4,5].includes(formData1.medicalCategoryId)"> <el-form-item
label="批准文号"
prop="approvalNumber"
v-if="![4, 5].includes(formData1.medicalCategoryId)"
>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.approvalNumber" v-model="formData1.approvalNumber"
placeholder="请输入批准文号" placeholder="请输入批准文号"
style="width:70%;" style="width: 70%"
></el-input> ></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<!-- 规格 --> <!-- 规格 -->
<el-form-item label="规格" prop="specifications" v-if="![4,5].includes(formData1.medicalCategoryId)"> <el-form-item
label="规格"
prop="specifications"
v-if="![4, 5].includes(formData1.medicalCategoryId)"
>
<el-col :span="18"> <el-col :span="18">
<el-input <el-input
size="small" size="small"
v-model="formData1.specifications" v-model="formData1.specifications"
placeholder="请输入规格" placeholder="请输入规格"
style="width:70%;" style="width: 70%"
></el-input> ></el-input>
<span class="word-num">例如:0.125g*12袋/盒</span> <span class="word-num">例如:0.125g*12袋/盒</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<!-- 生产企业 --> <!-- 生产企业 -->
<el-form-item label="生产企业" prop="productionCompany" v-if="![4,5].includes(formData1.medicalCategoryId)"> <el-form-item
label="生产企业"
prop="productionCompany"
v-if="![4, 5].includes(formData1.medicalCategoryId)"
>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.productionCompany" v-model="formData1.productionCompany"
placeholder="请输入生产企业" placeholder="请输入生产企业"
style="width:70%;" style="width: 70%"
></el-input> ></el-input>
<span class="word-num"></span> <span class="word-num"></span>
...@@ -576,47 +923,58 @@ ...@@ -576,47 +923,58 @@
width="40%" width="40%"
class="example-dialog" class="example-dialog"
> >
<img src="../../assets/image/s-example.png" alt=""> <img src="../../assets/image/s-example.png" alt="" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import Cropper from '@/components/common/cropper.vue'; import Cropper from "@/components/common/cropper.vue";
import { getBarcodeData, getCategorysList, getContractList, getCooperationProjectList, getGoodsList, getGoodsListAll, getMedList, saveMedList, updateGoods, updateStock } from '@/utils/goods'; import {
getBarcodeData,
getCategorysList,
getContractList,
getCooperationProjectList,
getGoodsList,
getGoodsListAll,
getMedList,
saveMedList,
updateGoods,
updateStock,
} from "@/utils/goods";
import { isEmptyUtils } from "@/utils/index"; import { isEmptyUtils } from "@/utils/index";
import { createFilePath, doUpload, getFilePath } from "@/utils/qiniu-util"; import { createFilePath, doUpload, getFilePath } from "@/utils/qiniu-util";
import { getStoreAdressRepot } from "@/utils/shop"; import { getStoreAdressRepot } from "@/utils/shop";
import { closeLoading, openLoading, signFigures } from "@/utils/utils"; import { closeLoading, openLoading, signFigures } from "@/utils/utils";
import { originForm, originForm1, originForm3 } from './common/forms';
import { originRules, originRules1, originRules3 } from './common/rules';
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { originForm, originForm1, originForm3 } from "./common/forms";
import { originRules, originRules1, originRules3 } from "./common/rules";
let vm = null; let vm = null;
export default { export default {
components: { components: {
BreadCrumb, BreadCrumb,
Cropper, Cropper,
draggable draggable,
}, },
data(){ data() {
return{ return {
shoImgDialog: false, // 查看展示 shoImgDialog: false, // 查看展示
medicalCategoryList: [], // 药品分类 medicalCategoryList: [], // 药品分类
isShowGoodsMsg: false, isShowGoodsMsg: false,
medicationId: '', // 药品id (搜索药品列表) medicationId: "", // 药品id (搜索药品列表)
medicationDetailId: '', medicationDetailId: "",
choiceMedData: [], // 选中的基础药品展示 choiceMedData: [], // 选中的基础药品展示
isShowGoods: false, // 是否展示商品表格 isShowGoods: false, // 是否展示商品表格
filterName: '', // 搜索药品 filterName: "", // 搜索药品
// 商品分类级联配置 // 商品分类级联配置
goodsCategoryIdList: [], goodsCategoryIdList: [],
cascaderProps: { cascaderProps: {
multiple: true, multiple: true,
value: 'id', value: "id",
label: 'categoryName', label: "categoryName",
children:'children' children: "children",
// checkStrictly: true // checkStrictly: true
}, },
isNewMeddialog: false, // 新增药品弹窗 isNewMeddialog: false, // 新增药品弹窗
...@@ -627,49 +985,54 @@ import draggable from "vuedraggable"; ...@@ -627,49 +985,54 @@ import draggable from "vuedraggable";
barAndGoodsFlag: false, // 编辑时商品名称和条形码是否可以编辑 barAndGoodsFlag: false, // 编辑时商品名称和条形码是否可以编辑
goodDisabled: false, // 商品通用名称是否可编辑 goodDisabled: false, // 商品通用名称是否可编辑
isEdit: false, isEdit: false,
stock:{ stock: {
title:'减少库存', title: "减少库存",
type:1, type: 1,
placeholderTxt:'请输入减少的库存数量', placeholderTxt: "请输入减少的库存数量",
num:'' num: "",
}, },
fileGoodsList:[], fileGoodsList: [],
goodsCheckList: [], goodsCheckList: [],
fileIntrList:[], fileIntrList: [],
intrIndex:-1, intrIndex: -1,
isShowFileList:false, isShowFileList: false,
isgoodStock:true, isgoodStock: true,
headIndex:-1, headIndex: -1,
stockDio:false, stockDio: false,
curmbFirst: '云鹊店铺', curmbFirst: "云鹊店铺",
curmbSecond: '商品管理', curmbSecond: "商品管理",
curmbThird: '编辑商品',// /live-manage?id= curmbThird: "编辑商品", // /live-manage?id=
jumPathThird: '', jumPathThird: "",
isgoodsImages:true, isgoodsImages: true,
isSpecification_url:true, isSpecification_url: true,
title:'', title: "",
daysTypeList:[{ daysTypeList: [
label: '日', {
label: "日",
value: 1, value: 1,
}, { },
label: '周', {
label: "周",
value: 7, value: 7,
}, { },
label: '月', {
label: "月",
value: 30, value: 30,
}, { },
label: '年', {
label: "年",
value: 365, value: 365,
}], },
formData: {...JSON.parse(JSON.stringify(originForm)),reimburseMax:''}, // 通用信息 ],
formData: { ...JSON.parse(JSON.stringify(originForm)), reimburseMax: "" }, // 通用信息
formData1: JSON.parse(JSON.stringify(originForm1)), // 基本信息 formData1: JSON.parse(JSON.stringify(originForm1)), // 基本信息
formData3: JSON.parse(JSON.stringify(originForm3)), formData3: JSON.parse(JSON.stringify(originForm3)),
buyLimitDtoList:[], buyLimitDtoList: [],
rules: {}, rules: {},
rules1: {}, rules1: {},
goodsId: 0, // 新增时传0,更新时必需>0 goodsId: 0, // 新增时传0,更新时必需>0
goodsType: '', goodsType: "",
storeId: '', storeId: "",
commissionFlag: 2, commissionFlag: 2,
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
...@@ -683,29 +1046,29 @@ import draggable from "vuedraggable"; ...@@ -683,29 +1046,29 @@ import draggable from "vuedraggable";
cvWidth: 1000, cvWidth: 1000,
cvHeight: 800, cvHeight: 800,
uploadType: 1, uploadType: 1,
cropDialogWidth: '900px', cropDialogWidth: "900px",
cropBoxResizable: true, cropBoxResizable: true,
minCropBoxWidth: 100, minCropBoxWidth: 100,
minCropBoxHeight: 100, minCropBoxHeight: 100,
aspectRatio: 16/9 aspectRatio: 16 / 9,
}, },
slide2: { slide2: {
oriUrl: '', // 原图 oriUrl: "", // 原图
}, },
imgMouseOver1: false, imgMouseOver1: false,
uploadImgMessage1: false,//未上传图片,校验提示语 uploadImgMessage1: false, //未上传图片,校验提示语
isCheckServe: false, // 商品类型选择【检测服务】时!!!!!!!!!!!!!!!!!!!!!!!!!!!!! isCheckServe: false, // 商品类型选择【检测服务】时!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
inputType: '', inputType: "",
limitVisibleFlag:false, limitVisibleFlag: false,
limit:{ limit: {
title:"限购条件" title: "限购条件",
}, },
storeType: 1, //1: "供货商",2: "小药房",3: "医生小店" storeType: 1, //1: "供货商",2: "小药房",3: "医生小店"
hasRepoFlag: 0, //店铺是否有退货地址 hasRepoFlag: 0, //店铺是否有退货地址
videoList: [],//视频上传文件列表 videoList: [], //视频上传文件列表
videoModel:{ videoFullPath: '' }, videoModel: { videoFullPath: "" },
sumFile: 0, sumFile: 0,
uploadProgress:0, // 上传视频进度条 uploadProgress: 0, // 上传视频进度条
cooperationProjectList: [], // 合作项目 cooperationProjectList: [], // 合作项目
contractList: [], // 合同 contractList: [], // 合同
isProject: false, // 是否选择合作项目 isProject: false, // 是否选择合作项目
...@@ -716,57 +1079,73 @@ import draggable from "vuedraggable"; ...@@ -716,57 +1079,73 @@ import draggable from "vuedraggable";
isAddServe: false, // 新增药品时 添加的是否为服务类 || 虚拟商品 isAddServe: false, // 新增药品时 添加的是否为服务类 || 虚拟商品
goodsCategoryList: [], goodsCategoryList: [],
isgoodsCategory: false, // 是否选择商品分类 isgoodsCategory: false, // 是否选择商品分类
isProjectId: false isProjectId: false,
} };
}, },
computed: { computed: {
mCommonName() { mCommonName() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '产品名称' : '通用名称'; return [4, 5].includes(this.formData1.medicalCategoryId)
? "产品名称"
: "通用名称";
}, },
mCommonNameLabel() { mCommonNameLabel() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '请输入产品名称' : '请输入通用名称'; return [4, 5].includes(this.formData1.medicalCategoryId)
? "请输入产品名称"
: "请输入通用名称";
}, },
commonName() { commonName() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '品牌名/商品名' : '商品名称'; return [4, 5].includes(this.formData1.medicalCategoryId)
? "品牌名/商品名"
: "商品名称";
}, },
commonPlaceholder() { commonPlaceholder() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '请输入品牌名/商品名' : '请输入商品名称'; return [4, 5].includes(this.formData1.medicalCategoryId)
} ? "请输入品牌名/商品名"
: "请输入商品名称";
},
}, },
created() { created() {
vm = this; vm = this;
const { id, storeId, goodsType, inputType, commissionFlag, storeType} = this.$route.query; //Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
const { id, storeId, goodsType, inputType, commissionFlag, storeType } =
this.$route.query;
this.goodsType = goodsType; this.goodsType = goodsType;
this.storeId = storeId; this.storeId = storeId;
this.inputType = inputType || ''; this.inputType = inputType || "";
this.commissionFlag = commissionFlag; this.commissionFlag = commissionFlag;
this.storeType = storeType; this.storeType = storeType;
this.rules = {...originRules}; this.rules = { ...originRules };
this.rules1 = originRules1; this.rules1 = originRules1;
this.rules3 = originRules3; this.rules3 = originRules3;
this.jumPathThird = '/goods-manage?storeId=' + storeId +'&commissionFlag=' + this.commissionFlag +'&storeType=' + this.storeType; this.jumPathThird =
this.title = id == 'add' ? '新增商品' : '编辑商品'; "/goods-manage?storeId=" +
this.isEdit = id != 'add'; storeId +
"&commissionFlag=" +
this.commissionFlag +
"&storeType=" +
this.storeType;
this.title = id == "add" ? "新增商品" : "编辑商品";
this.isEdit = id != "add";
this.curmbThird = this.title; this.curmbThird = this.title;
this.formData.storeId = Number(storeId) || ''; this.formData.storeId = Number(storeId) || "";
this.getCooperationProjectList(); // 获取合作项目 this.getCooperationProjectList(); // 获取合作项目
if(id != 'add'){ if (id != "add") {
this.getDetailByEdit(id, goodsType); this.getDetailByEdit(id, goodsType);
} else { } else {
this.getStoreAdress(); this.getStoreAdress();
} }
// debugger; // debugger;
// 判空 // 判空
if (this.formData.leastCount == null || this.formData.leastCount === '') { if (this.formData.leastCount == null || this.formData.leastCount === "") {
this.formData.leastCount = 1; this.formData.leastCount = 1;
} }
if (this.formData.mostCount == null || this.formData.mostCount === '') { if (this.formData.mostCount == null || this.formData.mostCount === "") {
this.formData.mostCount = -1; this.formData.mostCount = -1;
} }
if (this.formData.incrType == null || this.formData.incrType === '') { if (this.formData.incrType == null || this.formData.incrType === "") {
this.formData.incrType = 2; this.formData.incrType = 2;
} }
this.getGoodsListAll(); this.getGoodsListAll();
...@@ -777,47 +1156,55 @@ import draggable from "vuedraggable"; ...@@ -777,47 +1156,55 @@ import draggable from "vuedraggable";
}, },
getArr(arr) { getArr(arr) {
if (arr.length > 0) { if (arr.length > 0) {
let newoodsList = [] let newoodsList = [];
arr.forEach(item=> { arr.forEach((item) => {
const subArr = item.filter(i=> { const subArr = item.filter((i) => {
return i !== -1; return i !== -1;
}) });
newoodsList.push(subArr) newoodsList.push(subArr);
}) });
return newoodsList; return newoodsList;
} else { } else {
return [] return [];
} }
}, },
// 获取商品分类 // 获取商品分类
getGoodsListAll() { getGoodsListAll() {
getGoodsListAll().then(res => { getGoodsListAll().then((res) => {
if (res.code == '000000') { if (res.code == "000000") {
this.goodsCategoryList = res.data; this.goodsCategoryList = res.data;
} }
}) });
}, },
// 取消 // 取消
cancelComplete() { cancelComplete() {
this.$confirm('取消后您填写的信息将不会被保存', '确认取消吗?', { this.$confirm("取消后您填写的信息将不会被保存", "确认取消吗?", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning', type: "warning",
}).then(() => { })
.then(() => {
this.$router.go(-1); this.$router.go(-1);
}).catch(() => { })
}); .catch(() => {});
}, },
// 药品分类切换 // 药品分类切换
medicalChange(val) { medicalChange(val) {
if ([4,5].includes(val)) { if ([4, 5].includes(val)) {
this.isAddServe = true; this.isAddServe = true;
} }
this.$refs.formData1.clearValidate(); this.$refs.formData1.clearValidate();
const formData1Arr = ['medicCommonName','barCode','medicGoodsName','approvalNumber','specifications','productionCompany']; const formData1Arr = [
formData1Arr.map(item => { "medicCommonName",
this.formData1[item] = ''; "barCode",
}) "medicGoodsName",
"approvalNumber",
"specifications",
"productionCompany",
];
formData1Arr.map((item) => {
this.formData1[item] = "";
});
}, },
// 获取药品分类 // 获取药品分类
getCategorysList() { getCategorysList() {
...@@ -827,11 +1214,11 @@ import draggable from "vuedraggable"; ...@@ -827,11 +1214,11 @@ import draggable from "vuedraggable";
categoryLevel: 1, categoryLevel: 1,
parentId: 0, parentId: 0,
}; };
getCategorysList(params).then(res => { getCategorysList(params).then((res) => {
if (res.code == '000000') { if (res.code == "000000") {
this.medicalCategoryList = res.data.medicalCategorysList; this.medicalCategoryList = res.data.medicalCategorysList;
} }
}) });
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val;
...@@ -843,19 +1230,20 @@ import draggable from "vuedraggable"; ...@@ -843,19 +1230,20 @@ import draggable from "vuedraggable";
this.searchAddGoods(); this.searchAddGoods();
}, },
delGoods() { delGoods() {
this.$confirm('确认要删除该商品吗?', '', { this.$confirm("确认要删除该商品吗?", "", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning', type: "warning",
}).then(() => { })
.then(() => {
this.isShowGoods = false; this.isShowGoods = false;
this.choiceMedData = []; this.choiceMedData = [];
this.$message({ this.$message({
type: 'success', type: "success",
message: '删除成功!' message: "删除成功!",
});
}).catch(() => {
}); });
})
.catch(() => {});
}, },
contractChange(val) { contractChange(val) {
if (val) { if (val) {
...@@ -866,7 +1254,7 @@ import draggable from "vuedraggable"; ...@@ -866,7 +1254,7 @@ import draggable from "vuedraggable";
}, },
// 商品分类级联多选 // 商品分类级联多选
searchCategoryChange(value) { searchCategoryChange(value) {
console.log(value, '商品分类级联多选') console.log(value, "商品分类级联多选");
if (value.length > 0) { if (value.length > 0) {
this.isgoodsCategory = false; this.isgoodsCategory = false;
} else { } else {
...@@ -878,7 +1266,7 @@ import draggable from "vuedraggable"; ...@@ -878,7 +1266,7 @@ import draggable from "vuedraggable";
// 确认选择药品 // 确认选择药品
confirmAddGoods() { confirmAddGoods() {
if (!this.isSelectGoods) { if (!this.isSelectGoods) {
this.$message.error('您还未选择药品'); this.$message.error("您还未选择药品");
return; return;
} }
if (this.choiceMedData.length > 0) { if (this.choiceMedData.length > 0) {
...@@ -906,7 +1294,7 @@ import draggable from "vuedraggable"; ...@@ -906,7 +1294,7 @@ import draggable from "vuedraggable";
this.currentRow = val; this.currentRow = val;
this.formData3.medicationId = val.tradeMedicalLibId; this.formData3.medicationId = val.tradeMedicalLibId;
this.formData3.medicationDetailId = val.id; this.formData3.medicationDetailId = val.id;
this.isCheckServe = val.categoryName == 5? true : false; this.isCheckServe = val.categoryName == 5 ? true : false;
let current = [this.currentRow]; let current = [this.currentRow];
this.choiceMedData = current; this.choiceMedData = current;
} }
...@@ -914,13 +1302,21 @@ import draggable from "vuedraggable"; ...@@ -914,13 +1302,21 @@ import draggable from "vuedraggable";
// 新增药品 // 新增药品
addNewMed() { addNewMed() {
let isTrue; let isTrue;
this.$refs.formData1.validate((valid,object) => { this.$refs.formData1.validate((valid, object) => {
isTrue = valid; isTrue = valid;
if (!valid) return false; if (!valid) return false;
}); });
if (!isTrue) return; if (!isTrue) return;
let data = {}; let data = {};
const {specifications,productionCompany,approvalNumber,medicGoodsName,barCode,medicCommonName,medicalCategoryId} = this.formData1; const {
specifications,
productionCompany,
approvalNumber,
medicGoodsName,
barCode,
medicCommonName,
medicalCategoryId,
} = this.formData1;
// 服务类/虚拟商品 // 服务类/虚拟商品
if (this.isAddServe) { if (this.isAddServe) {
data = { data = {
...@@ -928,7 +1324,7 @@ import draggable from "vuedraggable"; ...@@ -928,7 +1324,7 @@ import draggable from "vuedraggable";
medicCommonName, medicCommonName,
medicGoodsName, medicGoodsName,
applySource: 2, applySource: 2,
} };
} else { } else {
data = { data = {
medicalCategoryId, medicalCategoryId,
...@@ -936,7 +1332,7 @@ import draggable from "vuedraggable"; ...@@ -936,7 +1332,7 @@ import draggable from "vuedraggable";
medicGoodsName, medicGoodsName,
barCode, barCode,
approvalNumber, approvalNumber,
medicalDetailFieldMap: {specifications,productionCompany}, medicalDetailFieldMap: { specifications, productionCompany },
applySource: 2, applySource: 2,
}; };
} }
...@@ -944,33 +1340,35 @@ import draggable from "vuedraggable"; ...@@ -944,33 +1340,35 @@ import draggable from "vuedraggable";
}, },
// 药品保存 // 药品保存
saveMedList(data) { saveMedList(data) {
saveMedList(data).then(res => { saveMedList(data)
if(res.code == '000000') { .then((res) => {
if (res.code == "000000") {
this.$message({ this.$message({
type: 'success', type: "success",
message: '新增药品成功!' message: "新增药品成功!",
}); });
this.isNewMeddialog = false; this.isNewMeddialog = false;
this.choiceMedData = [res.data] this.choiceMedData = [res.data];
this.formData3.medicationId = res.data.tradeMedicalLibId; this.formData3.medicationId = res.data.tradeMedicalLibId;
this.formData3.medicationDetailId = res.data.id; this.formData3.medicationDetailId = res.data.id;
this.isShowGoods = true; this.isShowGoods = true;
console.log(this.choiceMedData , 'this.choiceMedData ') console.log(this.choiceMedData, "this.choiceMedData ");
} else { } else {
this.$message({ this.$message({
type: 'error', type: "error",
message: res.message message: res.message,
}); });
} }
}).catch(err => { })
.catch((err) => {
this.$message({ this.$message({
type: 'error', type: "error",
message: err.message message: err.message,
});
}); });
})
}, },
// 新增药品 // 新增药品
addNewGoods(){ addNewGoods() {
if (this.$refs.formData1) { if (this.$refs.formData1) {
this.$refs.formData1.resetFields(); this.$refs.formData1.resetFields();
} }
...@@ -998,104 +1396,127 @@ import draggable from "vuedraggable"; ...@@ -998,104 +1396,127 @@ import draggable from "vuedraggable";
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
}; };
getMedList(data).then(res => { getMedList(data).then((res) => {
if(res.code == '000000') { if (res.code == "000000") {
this.medData = res.data.smallStoreList; this.medData = res.data.smallStoreList;
this.totalRows = res.data.totalNum; this.totalRows = res.data.totalNum;
} }
}) });
}, },
// 获取合同 // 获取合同
getContractList(projectId) { getContractList(projectId) {
getContractList(projectId || 0).then(res => { getContractList(projectId || 0).then((res) => {
if(res.code == '000000') { if (res.code == "000000") {
this.contractList = res.data; this.contractList = res.data;
} }
}) });
}, },
// 获取合作项目 // 获取合作项目
getCooperationProjectList() { getCooperationProjectList() {
getCooperationProjectList().then(res => { getCooperationProjectList().then((res) => {
if(res.code == '000000') { if (res.code == "000000") {
this.cooperationProjectList = res.data; this.cooperationProjectList = res.data;
} }
}) });
}, },
// 切换合同 // 切换合同
getContract(projectId) { getContract(projectId) {
this.formData3.contractId = ''; this.formData3.contractId = "";
this.contractList = []; this.contractList = [];
this.getContractList(projectId); this.getContractList(projectId);
}, },
projectClear() { projectClear() {
this.formData3.contractId = ''; this.formData3.contractId = "";
this.contractList = []; this.contractList = [];
}, },
// 判断imgurl是否有效 // 判断imgurl是否有效
checkImgExists(imgurl) { checkImgExists(imgurl) {
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
var ImgObj = new Image() var ImgObj = new Image();
ImgObj.src = imgurl ImgObj.src = imgurl;
ImgObj.onload = function(res) { ImgObj.onload = function (res) {
resolve(res) resolve(res);
} };
ImgObj.onerror = function(err) { ImgObj.onerror = function (err) {
reject(err) reject(err);
} };
}) });
}, },
//eidt状态 //eidt状态
async getDetailByEdit(id){ async getDetailByEdit(id) {
this.goodsId = id ; this.goodsId = id;
const res = await getGoodsList({ const res = await getGoodsList({
goodsIdList:[id], goodsIdList: [id],
goodsName :'', goodsName: "",
goodsType :'', goodsType: "",
pageNo:1, pageNo: 1,
pageSize: 10, pageSize: 10,
storeId: this.storeId, storeId: this.storeId,
applySource: 2 applySource: 2,
}); });
if(res.code != '000000'){ if (res.code != "000000") {
return this.$message({ return this.$message({
message: res.message, message: res.message,
type: 'error' type: "error",
}); });
} }
closeLoading(this); closeLoading(this);
if(res.data == null){ if (res.data == null) {
return this.$message({ return this.$message({
type: 'error' type: "error",
}); });
} }
const {goodsList, hasRepoFlag } = res.data; const { goodsList, hasRepoFlag } = res.data;
const { goodsName, goodsDescription, goodsType,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[],contractId, cooperationProjectId,goodsCategoryIdArr,medicationInfo } = goodsList[0]; const {
goodsName,
goodsDescription,
goodsType,
expressLimitFlag,
goodsHeaderImages = [],
goodsVideoList = [],
contractId,
cooperationProjectId,
goodsCategoryIdArr,
medicationInfo,
} = goodsList[0];
const goodDet = goodsList[0]; const goodDet = goodsList[0];
goodDet.otc1 = goodDet.otc ? '1' : '0'; goodDet.otc1 = goodDet.otc ? "1" : "0";
// 查询药品列表 // 查询药品列表
this.choiceMedData = [medicationInfo]; this.choiceMedData = [medicationInfo];
if (this.choiceMedData.length > 0) {this.isShowGoods = true;} if (this.choiceMedData.length > 0) {
this.isShowGoods = true;
}
this.isProject = Boolean(cooperationProjectId); this.isProject = Boolean(cooperationProjectId);
if(this.isProject) {this.getContractList(cooperationProjectId)} if (this.isProject) {
this.getContractList(cooperationProjectId);
}
this.isContract = Boolean(contractId); this.isContract = Boolean(contractId);
// this.formData1 = goodDet; // this.formData1 = goodDet;
this.formData = goodDet; this.formData = goodDet;
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,contractId, cooperationProjectId }; this.formData3 = {
goodsName,
goodsDescription,
goodsHeaderImages,
goodsVideoList,
goodsType,
contractId,
cooperationProjectId,
};
this.formData3.medicationId = medicationInfo.tradeMedicalLibId; this.formData3.medicationId = medicationInfo.tradeMedicalLibId;
this.formData3.medicationDetailId = medicationInfo.id; this.formData3.medicationDetailId = medicationInfo.id;
this.goodsCategoryIdList = this.getArr(goodsCategoryIdArr); this.goodsCategoryIdList = this.getArr(goodsCategoryIdArr);
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.buyLimitDtoList = this.formData.buyLimitDtoList; this.buyLimitDtoList = this.formData.buyLimitDtoList;
this.formData.expressLimitFlag = expressLimitFlag; this.formData.expressLimitFlag = expressLimitFlag;
this.formData.optPrice = this.formData.costPrice/100; this.formData.optPrice = this.formData.costPrice / 100;
this.formData.realCostPrice = this.formData.realCostPrice/100; this.formData.realCostPrice = this.formData.realCostPrice / 100;
this.formData.scorePerformance = this.formData.scorePerformance/100; this.formData.scorePerformance = this.formData.scorePerformance / 100;
this.fileGoodsList = this.getImages(goodDet.goodsImgList,1); this.fileGoodsList = this.getImages(goodDet.goodsImgList, 1);
this.fileIntrList = this.getImages(goodDet.goodsDetailImageList,2); this.fileIntrList = this.getImages(goodDet.goodsDetailImageList, 2);
this.formData.stock = this.formData.goodsStock; this.formData.stock = this.formData.goodsStock;
this.formData.reimburseMax = this.formData.reimburseMax/100; this.formData.reimburseMax = this.formData.reimburseMax / 100;
if (goodDet.goodsVideoList.length > 0) { if (goodDet.goodsVideoList.length > 0) {
this.videoList.push(goodDet.goodsVideoList[0]); this.videoList.push(goodDet.goodsVideoList[0]);
this.videoModel.videoFullPath = this.videoList[0].goodsImgUrl; this.videoModel.videoFullPath = this.videoList[0].goodsImgUrl;
...@@ -1110,15 +1531,14 @@ import draggable from "vuedraggable"; ...@@ -1110,15 +1531,14 @@ import draggable from "vuedraggable";
// }) // })
// this.fileGoodsList = newImgList; // this.fileGoodsList = newImgList;
console.log('fileGoodsList', this.fileGoodsList); console.log("fileGoodsList", this.fileGoodsList);
this.rules = { this.rules = {
...this.rules, ...this.rules,
...originRules ...originRules,
}; };
}, },
getImages(d, type) { getImages(d, type) {
return d.map(v => ({ return d.map((v) => ({
url: type == 1 ? v.goodsImgUrl : v.imageUrl, url: type == 1 ? v.goodsImgUrl : v.imageUrl,
imageUrl: type == 1 ? v.goodsImgUrl : v.imageUrl, imageUrl: type == 1 ? v.goodsImgUrl : v.imageUrl,
goodsImgUrl: type == 1 ? v.goodsImgUrl : v.imageUrl, goodsImgUrl: type == 1 ? v.goodsImgUrl : v.imageUrl,
...@@ -1127,8 +1547,7 @@ import draggable from "vuedraggable"; ...@@ -1127,8 +1547,7 @@ import draggable from "vuedraggable";
imgSort: v.imgSort, imgSort: v.imgSort,
imageType: type == 1 ? v.imgType : v.imageType, imageType: type == 1 ? v.imgType : v.imageType,
miniProgramShow: v.miniProgramShow === 0 ? 0 : 1, miniProgramShow: v.miniProgramShow === 0 ? 0 : 1,
}) }));
);
}, },
// 修改条形码 // 修改条形码
changeBarCode(val) { changeBarCode(val) {
...@@ -1137,98 +1556,110 @@ import draggable from "vuedraggable"; ...@@ -1137,98 +1556,110 @@ import draggable from "vuedraggable";
// this.goodDisabled = false; // this.goodDisabled = false;
}, },
//快速录入 //快速录入
fastInput(type){ fastInput(type) {
const code = this.formData1.barCode.trim(); const code = this.formData1.barCode.trim();
if(code == ''){ if (code == "") {
// this.$refs.formData1.validateField("barCode") // this.$refs.formData1.validateField("barCode")
this.$message({ this.$message({
message: '请输入条形码', message: "请输入条形码",
type: 'error' type: "error",
}); });
return; return;
} }
getBarcodeData(code).then((res) => { getBarcodeData(code).then((res) => {
if(res.code != '000000'){ if (res.code != "000000") {
return this.$message({ return this.$message({
message: res.message, message: res.message,
type: 'error' type: "error",
}); });
} }
if(res.data == null){ if (res.data == null) {
return this.$message({ return this.$message({
message: '未查询到数据,请手动输入', message: "未查询到数据,请手动输入",
type: 'warning' type: "warning",
}); });
} }
const {medicCommonName, medicGoodsName,medicalDetailFieldMap,approvalNumber} = res.data; const {
const {productionCompany,specifications} = medicalDetailFieldMap; medicCommonName,
let fastParm = {medicCommonName,medicGoodsName ,specifications, productionCompany,approvalNumber} medicGoodsName,
this.formData1 = Object.assign(this.formData1,fastParm) medicalDetailFieldMap,
}) approvalNumber,
} = res.data;
const { productionCompany, specifications } = medicalDetailFieldMap;
let fastParm = {
medicCommonName,
medicGoodsName,
specifications,
productionCompany,
approvalNumber,
};
this.formData1 = Object.assign(this.formData1, fastParm);
});
}, },
updateStock(){ updateStock() {
let r = /^\+?[1-9][0-9]*$/; let r = /^\+?[1-9][0-9]*$/;
//造假 接口来了删掉 //造假 接口来了删掉
if(this.stock.num <= 0){ if (this.stock.num <= 0) {
return this.$message({ return this.$message({
message: '增加库存数量不得为0', message: "增加库存数量不得为0",
type: 'warning' type: "warning",
}); });
} }
if(!r.test(this.stock.num)){ if (!r.test(this.stock.num)) {
return this.$message({ return this.$message({
message: '库存数量必须正整数', message: "库存数量必须正整数",
type: 'warning' type: "warning",
}); });
} }
if(this.stock.type == 1){ if (this.stock.type == 1) {
if(this.stock.num > this.formData.goodsStock){ if (this.stock.num > this.formData.goodsStock) {
return this.$message({ return this.$message({
message: '减少库存数量不得大于当前库存', message: "减少库存数量不得大于当前库存",
type: 'warning' type: "warning",
}); });
} }
this.formData.stock = this.formData.goodsStock - this.stock.num this.formData.stock = this.formData.goodsStock - this.stock.num;
this.formData.decrStock = Number(this.stock.num) this.formData.decrStock = Number(this.stock.num);
this.formData.incrStock = '' this.formData.incrStock = "";
}else if(this.stock.type == 2){ } else if (this.stock.type == 2) {
this.formData.stock = Number(this.stock.num) + Number(this.formData.goodsStock) this.formData.stock =
this.formData.incrStock = Number(this.stock.num) Number(this.stock.num) + Number(this.formData.goodsStock);
this.formData.decrStock = '' this.formData.incrStock = Number(this.stock.num);
this.formData.decrStock = "";
} }
//this.formData.goodsStock = this.formData.stock //this.formData.goodsStock = this.formData.stock
this.isgoodStock = true; this.isgoodStock = true;
this.stockDio = false this.stockDio = false;
}, },
changeStock(type){ changeStock(type) {
if(this.formData.stock == 0 && type == 1){ if (this.formData.stock == 0 && type == 1) {
return; return;
} }
let str = type == 1 ? '减少' : '增加', let str = type == 1 ? "减少" : "增加",
txt = `请输入${str}的库存数量`, txt = `请输入${str}的库存数量`,
tit = str + '库存' tit = str + "库存";
this.stock = { this.stock = {
title:tit, title: tit,
type, type,
num:'', num: "",
placeholderTxt:txt placeholderTxt: txt,
} };
this.stockDio = true this.stockDio = true;
}, },
complete() { complete() {
let formNameList = ['formData', 'formData3']; let formNameList = ["formData", "formData3"];
this.formData = { ...this.formData,...this.formData3}; this.formData = { ...this.formData, ...this.formData3 };
for(let i=0;i<this.fileGoodsList.length;i++){ for (let i = 0; i < this.fileGoodsList.length; i++) {
this.fileGoodsList[i].imageSort = i+1 this.fileGoodsList[i].imageSort = i + 1;
} }
for(let j=0;j<this.fileIntrList.length;j++){ for (let j = 0; j < this.fileIntrList.length; j++) {
this.fileIntrList[j].imageSort = j+1 this.fileIntrList[j].imageSort = j + 1;
} }
this.formData.categoryId = this.formData.goodsType this.formData.categoryId = this.formData.goodsType;
this.formData.otc = this.formData.otc1 == 1 ? true : false this.formData.otc = this.formData.otc1 == 1 ? true : false;
this.isgoodStock = this.formData.stock > 0 ? true : false this.isgoodStock = this.formData.stock > 0 ? true : false;
this.formData.goodsId = this.goodsId; this.formData.goodsId = this.goodsId;
this.formData.goodsImages = this.fileGoodsList; this.formData.goodsImages = this.fileGoodsList;
this.formData.goodsHeaderImages = this.fileGoodsList; this.formData.goodsHeaderImages = this.fileGoodsList;
...@@ -1236,91 +1667,105 @@ import draggable from "vuedraggable"; ...@@ -1236,91 +1667,105 @@ import draggable from "vuedraggable";
this.formData.goodsDetailImages = this.fileIntrList; // 商品详情图 this.formData.goodsDetailImages = this.fileIntrList; // 商品详情图
this.formData.buyLimitDtoList = this.buyLimitDtoList; this.formData.buyLimitDtoList = this.buyLimitDtoList;
this.formData.goodsCategoryIdList = this.goodsCategoryIdList; this.formData.goodsCategoryIdList = this.goodsCategoryIdList;
this.isgoodsImages = this.formData.goodsImages.length == 0 ? false :true; this.isgoodsImages = this.formData.goodsImages.length == 0 ? false : true;
this.isSpecification_url = this.formData.goodsDetailImages.length == 0 ? false :true; this.isSpecification_url =
this.formData.goodsDetailImages.length == 0 ? false : true;
// 判断是否只选择了项目-合同名称的其中一项 // 判断是否只选择了项目-合同名称的其中一项
const {cooperationProjectId,contractId,goodsCategoryIdList} = this.formData; const { cooperationProjectId, contractId, goodsCategoryIdList } =
this.formData;
if (!goodsCategoryIdList.length) { if (!goodsCategoryIdList.length) {
this.isgoodsCategory = true; this.isgoodsCategory = true;
return this.$message({ return this.$message({
message: '请选择商品分类', message: "请选择商品分类",
type: 'error' type: "error",
}); });
} }
if (!cooperationProjectId || !contractId) { if (!cooperationProjectId || !contractId) {
this.isProjectId = true; this.isProjectId = true;
return this.$message({ return this.$message({
message: '请关联项目名称', message: "请关联项目名称",
type: 'error' type: "error",
}); });
} }
// 是否选择新增药品 // 是否选择新增药品
if (this.choiceMedData.length == 0) { if (this.choiceMedData.length == 0) {
this.isShowGoodsMsg = true; this.isShowGoodsMsg = true;
this.$message({ this.$message({
message: '请选择基础药品', message: "请选择基础药品",
type: 'error' type: "error",
}); });
return; return;
} }
let isTrue = false; let isTrue = false;
let item = ""; let item = "";
for(let i = 0; i < formNameList.length; i++){ for (let i = 0; i < formNameList.length; i++) {
item = formNameList[i]; item = formNameList[i];
this.$refs[item].validate((valid,object) => { this.$refs[item].validate((valid, object) => {
isTrue = valid; isTrue = valid;
if (!valid) return false; if (!valid) return false;
}); });
if(!isTrue){ if (!isTrue) {
return; return;
} }
} }
// 是否上传商品头图 || 是否上传商品详情图片 || 库存是否为0 || 单次购买上线是否符合要求 // 是否上传商品头图 || 是否上传商品详情图片 || 库存是否为0 || 单次购买上线是否符合要求
if(!this.isgoodsImages || !this.isSpecification_url ||!this.isgoodStock || !this.checkCount()) return; if (
!this.isgoodsImages ||
!this.isSpecification_url ||
!this.isgoodStock ||
!this.checkCount()
)
return;
if(!isTrue){ if (!isTrue) {
return false; return false;
}else{ } else {
this.formData.costPrice = signFigures(this.formData.optPrice*100, 10); this.formData.costPrice = signFigures(this.formData.optPrice * 100, 10);
this.formData.realCostPrice = signFigures(this.formData.realCostPrice * 100, 10); this.formData.realCostPrice = signFigures(
this.formData.reimburseMax = signFigures(this.formData.reimburseMax*100, 10); this.formData.realCostPrice * 100,
10
);
this.formData.reimburseMax = signFigures(
this.formData.reimburseMax * 100,
10
);
this.formData.hasChanged = true; this.formData.hasChanged = true;
this.formData.inputType = this.inputType; this.formData.inputType = this.inputType;
this.updateGoodsInfo(); this.updateGoodsInfo();
} }
}, },
//更新商品 //更新商品
updateGoodsInfo(){ updateGoodsInfo() {
console.log('提交值',JSON.parse(JSON.stringify(this.formData))); console.log("提交值", JSON.parse(JSON.stringify(this.formData)));
// const submieFn = this.isCheckServe ? updateGoodsV2 : updateGoods; // const submieFn = this.isCheckServe ? updateGoodsV2 : updateGoods;
const submieFn = updateGoods; const submieFn = updateGoods;
let params = JSON.parse(JSON.stringify(this.formData)); let params = JSON.parse(JSON.stringify(this.formData));
params.scorePerformance = params.scorePerformance * 100; params.scorePerformance = params.scorePerformance * 100;
console.log('提交params',params) console.log("提交params", params);
submieFn(params).then((res)=>{ submieFn(params).then((res) => {
if (res.code !== '000000') { if (res.code !== "000000") {
return this.$message({ return this.$message({
message: res.message, message: res.message,
type: 'error' type: "error",
}); });
} }
vm.$message.success("操作成功"); vm.$message.success("操作成功");
this.$router.push({ this.$router.push({
path: '/goods-manage', path: "/goods-manage",
query: { query: {
storeId: this.formData.storeId, storeId: this.formData.storeId,
commissionFlag: this.commissionFlag, commissionFlag: this.commissionFlag,
storeType: this.storeType storeType: this.storeType,
} },
}) });
}) });
}, },
imgExceed(file) { imgExceed(file) {
if (file.length > 6) { if (file.length > 6) {
this.$message.error("最多只能上传6张图片"); this.$message.error("最多只能上传6张图片");
}; }
}, },
//上传商品头图 //上传商品头图
beforeUploadPic(file) { beforeUploadPic(file) {
...@@ -1329,7 +1774,7 @@ import draggable from "vuedraggable"; ...@@ -1329,7 +1774,7 @@ import draggable from "vuedraggable";
// return ; // return ;
// } // }
let vm = this; let vm = this;
let picTypes = ['image/jpeg','image/png'] let picTypes = ["image/jpeg", "image/png"];
const isLt200k = file.size / 1024 < 200; const isLt200k = file.size / 1024 < 200;
if (picTypes.indexOf(file.type) == -1) { if (picTypes.indexOf(file.type) == -1) {
...@@ -1339,21 +1784,36 @@ import draggable from "vuedraggable"; ...@@ -1339,21 +1784,36 @@ import draggable from "vuedraggable";
_img.readAsDataURL(file); _img.readAsDataURL(file);
_img.onload = function (theFile) { _img.onload = function (theFile) {
let image = new Image() let image = new Image();
image.src = theFile.target.result image.src = theFile.target.result;
vm.slide2.oriUrl = theFile.target.result; vm.slide2.oriUrl = theFile.target.result;
image.onload = function () { image.onload = function () {
let _this = this; let _this = this;
if (_this.width !== 750 || _this.height !== 750) { if (_this.width !== 750 || _this.height !== 750) {
vm.$message.error("图片长宽尺寸必须为750*750"); vm.$message.error("图片长宽尺寸必须为750*750");
return; return;
}; }
openLoading(vm); openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) { doUpload(
vm,
file,
getFilePath(file, null),
"preview4",
"progress1",
1
).then(function (path) {
closeLoading(vm); closeLoading(vm);
console.log('上传成功后路径', path); console.log("上传成功后路径", path);
let len = vm.fileGoodsList.length; let len = vm.fileGoodsList.length;
vm.fileGoodsList.push({miniProgramShow:1, url: path.fullPath, goodsImgUrl: path.fullPath,imageUrl:path.fullPath, imgSort: len+1,imageSort: len+1, goodsId: vm.formData.goodsId }); vm.fileGoodsList.push({
miniProgramShow: 1,
url: path.fullPath,
goodsImgUrl: path.fullPath,
imageUrl: path.fullPath,
imgSort: len + 1,
imageSort: len + 1,
goodsId: vm.formData.goodsId,
});
vm.isgoodsImages = true; vm.isgoodsImages = true;
// vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,}) // vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,})
...@@ -1363,15 +1823,15 @@ import draggable from "vuedraggable"; ...@@ -1363,15 +1823,15 @@ import draggable from "vuedraggable";
}; };
}, },
//上传商品详情图片 //上传商品详情图片
beforeUploadPic1(file,type) { beforeUploadPic1(file, type) {
// 图片 jpeg png 视频 mp4 // 图片 jpeg png 视频 mp4
const isJPG = file.type === "image/jpeg"; const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png"; const isPNG = file.type === "image/png";
const isMP4 = file.type === "video/mp4"; const isMP4 = file.type === "video/mp4";
if(isMP4){ if (isMP4) {
this.beforeUploadVideo(file); this.beforeUploadVideo(file);
} }
if(isPNG || isJPG){ if (isPNG || isJPG) {
this.beforeUpload(file); this.beforeUpload(file);
} }
}, },
...@@ -1392,15 +1852,29 @@ import draggable from "vuedraggable"; ...@@ -1392,15 +1852,29 @@ import draggable from "vuedraggable";
let _img = new FileReader(); let _img = new FileReader();
_img.readAsDataURL(file); _img.readAsDataURL(file);
_img.onload = function (theFile) { _img.onload = function (theFile) {
let image = new Image() let image = new Image();
image.src = theFile.target.result image.src = theFile.target.result;
vm.slide2.oriUrl = theFile.target.result; vm.slide2.oriUrl = theFile.target.result;
image.onload = function () { image.onload = function () {
openLoading(vm); openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "preview4", "progress1", 1).then(function (path) { doUpload(
vm,
file,
getFilePath(file, null),
"preview4",
"progress1",
1
).then(function (path) {
closeLoading(vm); closeLoading(vm);
let len = vm.fileIntrList.length; let len = vm.fileIntrList.length;
vm.fileIntrList.push({miniProgramShow:1, url:path.fullPath,imageUrl:path.fullPath,imageSort: len+1,id: null, imageType: 4}) vm.fileIntrList.push({
miniProgramShow: 1,
url: path.fullPath,
imageUrl: path.fullPath,
imageSort: len + 1,
id: null,
imageType: 4,
});
vm.isSpecification_url = true; vm.isSpecification_url = true;
vm.$message.success("上传成功"); vm.$message.success("上传成功");
}); });
...@@ -1410,45 +1884,48 @@ import draggable from "vuedraggable"; ...@@ -1410,45 +1884,48 @@ import draggable from "vuedraggable";
return isJPG && isLt2M; return isJPG && isLt2M;
}, },
//上传商品详情视频 //上传商品详情视频
beforeUploadVideo(file){ beforeUploadVideo(file) {
console.log('file :>> ', file); console.log("file :>> ", file);
let self = this; let self = this;
if(file.name.indexOf(' ') != -1){ if (file.name.indexOf(" ") != -1) {
self.$message.warning('文件名不能包含空格'); self.$message.warning("文件名不能包含空格");
return; return;
} }
const isLt20M = file.size / 1024 / 1024 < 20; const isLt20M = file.size / 1024 / 1024 < 20;
if(!isLt20M){ if (!isLt20M) {
self.$message.warning('视频文件不能大于20M'); self.$message.warning("视频文件不能大于20M");
return; return;
} }
let updateFlag = self.checkUpdate(file.name); let updateFlag = self.checkUpdate(file.name);
if(updateFlag == false) return; if (updateFlag == false) return;
//如果没有选择文件,返回 //如果没有选择文件,返回
if (isEmptyUtils(file)) return; if (isEmptyUtils(file)) return;
console.log('object :>> ', file.type.split('/')); console.log("object :>> ", file.type.split("/"));
let filety = "." + file.type.split('/')[1]; let filety = "." + file.type.split("/")[1];
if(filety != ".mp4"){ if (filety != ".mp4") {
self.$message.error('仅支持上传mp4格式视频'); self.$message.error("仅支持上传mp4格式视频");
return; return;
} }
var name_ = file.name.split('_'); var name_ = file.name.split("_");
if(name_.length != 4){ if (name_.length != 4) {
self.$message.error('上传视频文件名格式不正确:举例(GXY_001_02_03.mp4)'); self.$message.error(
"上传视频文件名格式不正确:举例(GXY_001_02_03.mp4)"
);
return; return;
} }
self.$message.info('开始上传'); self.$message.info("开始上传");
const videoPath = createFilePath(file,file.name) const videoPath = createFilePath(file, file.name);
doUpload(self, file, videoPath,"preview4","uploadProgress1","").then(function (result) { doUpload(self, file, videoPath, "preview4", "uploadProgress1", "").then(
function (result) {
// self.videoModel.videoFullPath = result.fullPath; // self.videoModel.videoFullPath = result.fullPath;
let fileItem = { let fileItem = {
goodsImgUrl: result.fullPath, goodsImgUrl: result.fullPath,
...@@ -1457,29 +1934,30 @@ import draggable from "vuedraggable"; ...@@ -1457,29 +1934,30 @@ import draggable from "vuedraggable";
imageType: 5, imageType: 5,
goodsId: self.formData.goodsId, goodsId: self.formData.goodsId,
id: null, id: null,
deleteFlag: 0 deleteFlag: 0,
} };
self.fileIntrList.push(fileItem); self.fileIntrList.push(fileItem);
console.log('object :>> ', self.fileIntrList); console.log("object :>> ", self.fileIntrList);
return false; return false;
}); }
);
}, },
//删除图片 //删除图片
deleteImg(item,d) { deleteImg(item, d) {
let index = '' let index = "";
for(let i=0;i<d.length;i++){ for (let i = 0; i < d.length; i++) {
if(item.url == d[i].url){ if (item.url == d[i].url) {
index = i; index = i;
break break;
} }
} }
d.splice(index,1) d.splice(index, 1);
}, },
// 获取裁剪的图片数据 // 获取裁剪的图片数据
getCropImg(argument) { getCropImg(argument) {
this.showCropper = false; this.showCropper = false;
this.cropData = argument[1] this.cropData = argument[1];
vm.doUploadQiNiu(argument[2]) vm.doUploadQiNiu(argument[2]);
argument[3] && argument[3].destroy(); argument[3] && argument[3].destroy();
// vm.slide2.oriUrl = ""; // vm.slide2.oriUrl = "";
}, },
...@@ -1491,12 +1969,11 @@ import draggable from "vuedraggable"; ...@@ -1491,12 +1969,11 @@ import draggable from "vuedraggable";
this.formData1.leastCount = this.formData.leastCount; this.formData1.leastCount = this.formData.leastCount;
} }
} else if (type === 2) { } else if (type === 2) {
if(this.formData.mostCount > -1){ if (this.formData.mostCount > -1) {
this.formData.mostCount -= 1; this.formData.mostCount -= 1;
this.formData1.mostCount = this.formData.mostCount; this.formData1.mostCount = this.formData.mostCount;
} }
} } else if (type === 3) {
else if(type === 3){
if (this.formData.minWhole >= 2) { if (this.formData.minWhole >= 2) {
this.formData.minWhole -= 1; this.formData.minWhole -= 1;
} }
...@@ -1512,8 +1989,7 @@ import draggable from "vuedraggable"; ...@@ -1512,8 +1989,7 @@ import draggable from "vuedraggable";
} else if (type === 2) { } else if (type === 2) {
this.formData.mostCount += 1; this.formData.mostCount += 1;
this.formData1.mostCount = this.formData.mostCount; this.formData1.mostCount = this.formData.mostCount;
} } else if (type === 3) {
else if(type === 3){
this.formData.minWhole += 1; this.formData.minWhole += 1;
} }
// if (this.formData.mostCount < this.formData.leastCount) { // if (this.formData.mostCount < this.formData.leastCount) {
...@@ -1521,106 +1997,110 @@ import draggable from "vuedraggable"; ...@@ -1521,106 +1997,110 @@ import draggable from "vuedraggable";
// } // }
}, },
// 上传七牛 // 上传七牛
doUploadQiNiu(file){ doUploadQiNiu(file) {
doUpload(
doUpload(this,file, getFilePath(file,null), 'preview4', 'uploadProgress1', '').then(function (path) { this,
file,
getFilePath(file, null),
"preview4",
"uploadProgress1",
""
).then(function (path) {
vm.formData.headUrl = path.fullPath; vm.formData.headUrl = path.fullPath;
vm.$message.success('上传成功'); vm.$message.success("上传成功");
}); });
}, },
addBuyingLimit(){ addBuyingLimit() {
if(this.buyLimitDtoList != null && this.buyLimitDtoList.length == 2){ if (this.buyLimitDtoList != null && this.buyLimitDtoList.length == 2) {
this.$message({ this.$message({
message: '最多添加两个限制条件', message: "最多添加两个限制条件",
type: 'warning' type: "warning",
}); });
return; return;
} }
if(this.buyLimitDtoList == null || this.buyLimitDtoList.length == 0){ if (this.buyLimitDtoList == null || this.buyLimitDtoList.length == 0) {
this.buyLimitDtoList.push({ this.buyLimitDtoList.push({
days:0, days: 0,
daysType:1, daysType: 1,
limitCount:0, limitCount: 0,
limitUserType:1 limitUserType: 1,
}) });
return; return;
} }
if(this.buyLimitDtoList.length < 2){ if (this.buyLimitDtoList.length < 2) {
let limitUserType = 1; let limitUserType = 1;
if(this.buyLimitDtoList[0].limitUserType == 1){ if (this.buyLimitDtoList[0].limitUserType == 1) {
limitUserType = 2; limitUserType = 2;
} }
this.buyLimitDtoList.push({ this.buyLimitDtoList.push({
days:0, days: 0,
daysType:1, daysType: 1,
limitCount:0, limitCount: 0,
limitUserType:limitUserType limitUserType: limitUserType,
}) });
} }
// this.limitVisibleFlag = true; // this.limitVisibleFlag = true;
}, },
delLimit(index){ delLimit(index) {
this.buyLimitDtoList.splice(index,1); this.buyLimitDtoList.splice(index, 1);
}, },
changeLimitUserType(item,index){ changeLimitUserType(item, index) {
if(item.limitUserType == 1){ if (item.limitUserType == 1) {
if(this.buyLimitDtoList.length == 2 && index == 0){ if (this.buyLimitDtoList.length == 2 && index == 0) {
this.buyLimitDtoList[1].limitUserType = 2; this.buyLimitDtoList[1].limitUserType = 2;
} } else if (this.buyLimitDtoList.length == 2 && index == 1) {
else if(this.buyLimitDtoList.length == 2 && index == 1){
this.buyLimitDtoList[0].limitUserType = 2; this.buyLimitDtoList[0].limitUserType = 2;
} }
} } else {
else { if (this.buyLimitDtoList.length == 2 && index == 0) {
if(this.buyLimitDtoList.length == 2 && index == 0){
this.buyLimitDtoList[1].limitUserType = 1; this.buyLimitDtoList[1].limitUserType = 1;
} } else if (this.buyLimitDtoList.length == 2 && index == 1) {
else if(this.buyLimitDtoList.length == 2 && index == 1){
this.buyLimitDtoList[0].limitUserType = 1; this.buyLimitDtoList[0].limitUserType = 1;
} }
} }
}, },
checkCount(){ checkCount() {
let flag = true; let flag = true;
if(this.formData.saleType == 1 && this.formData.mostCount == 0){ if (this.formData.saleType == 1 && this.formData.mostCount == 0) {
flag = false; flag = false;
this.$message({ this.$message({
message: '单次购买上限不能为0', message: "单次购买上限不能为0",
type: 'warning' type: "warning",
}); });
return flag; return flag;
} }
if(this.formData.saleType == 1 && this.formData.mostCount != -1 && this.formData.mostCount < this.formData.leastCount){ if (
this.formData.saleType == 1 &&
this.formData.mostCount != -1 &&
this.formData.mostCount < this.formData.leastCount
) {
flag = false; flag = false;
this.$message({ this.$message({
message: '单次购买上限不能小于最小起购件数', message: "单次购买上限不能小于最小起购件数",
type: 'warning' type: "warning",
}); });
return flag; return flag;
} }
return flag; return flag;
}, },
goShopDeatil() { goShopDeatil() {
this.$router.push({ this.$router.push({
path: `/create-shop`, path: `/create-shop`,
query:{ query: {
storeId: this.storeId, storeId: this.storeId,
// storeData: JSON.stringify(row), // storeData: JSON.stringify(row),
} },
}) });
}, },
//店铺是否配置售后地址 //店铺是否配置售后地址
getStoreAdress() { getStoreAdress() {
getStoreAdressRepot(this.storeId).then(res => { getStoreAdressRepot(this.storeId).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
// repotList 地址数组 // repotList 地址数组
if(res.data && res.data.repotList && res.data.repotList.length) { if (res.data && res.data.repotList && res.data.repotList.length) {
this.hasRepoFlag = true; this.hasRepoFlag = true;
} else { } else {
this.hasRepoFlag = false; this.hasRepoFlag = false;
...@@ -1628,21 +2108,20 @@ import draggable from "vuedraggable"; ...@@ -1628,21 +2108,20 @@ import draggable from "vuedraggable";
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}) });
}, },
// 视频 // 视频
deleteVideo(videoList) { deleteVideo(videoList) {
this.videoList = []; this.videoList = [];
this.videoModel.videoFullPath=''; this.videoModel.videoFullPath = "";
}, },
beforeVideoUpload(file) { beforeVideoUpload(file) {
const video2M = file.size / 1024 /1024 < 20; const video2M = file.size / 1024 / 1024 < 20;
console.log(file.size, 'video2Mvideo2Mvideo2M') console.log(file.size, "video2Mvideo2Mvideo2M");
if (!video2M) { if (!video2M) {
this.$message.error('上传视频大小不能超过20M!'); this.$message.error("上传视频大小不能超过20M!");
} } else {
else {
this.doVideoUpload(file, 1); this.doVideoUpload(file, 1);
} }
}, },
...@@ -1656,29 +2135,29 @@ import draggable from "vuedraggable"; ...@@ -1656,29 +2135,29 @@ import draggable from "vuedraggable";
}, },
checkUpdate(name) { checkUpdate(name) {
let flag = true; let flag = true;
for(let i=0;i<this.videoList.length;i++) { for (let i = 0; i < this.videoList.length; i++) {
if(this.videoList[i].name == name) { if (this.videoList[i].name == name) {
flag = false; flag = false;
this.$message.warning('上传文件重发'); this.$message.warning("上传文件重发");
} }
} }
console.log('name',name,'',this.videoList) console.log("name", name, "", this.videoList);
return flag; return flag;
}, },
doVideoUpload(file, index) { doVideoUpload(file, index) {
console.log('file',file); console.log("file", file);
//console.log('videoList项目列表:',this.videoList); //console.log('videoList项目列表:',this.videoList);
this.videoModel.videoFullPath = ''; this.videoModel.videoFullPath = "";
if(file.name.indexOf(' ') != -1){ if (file.name.indexOf(" ") != -1) {
this.$message.warning('文件名不能包含空格'); this.$message.warning("文件名不能包含空格");
return; return;
} }
let updateFlag = this.checkUpdate(file.name); let updateFlag = this.checkUpdate(file.name);
if(updateFlag == false) { if (updateFlag == false) {
return; return;
} }
var ext = file.type var ext = file.type;
var arr = ext.split('/'); var arr = ext.split("/");
var filety = "." + arr[1]; var filety = "." + arr[1];
/*if (filety.indexOf(".pdf") < 0 && filety.indexOf(".jpeg") < 0 && filety.indexOf(".jpg") < 0 /*if (filety.indexOf(".pdf") < 0 && filety.indexOf(".jpeg") < 0 && filety.indexOf(".jpg") < 0
&& filety.indexOf(".png") < 0 && filety.indexOf(".mp4") < 0) { && filety.indexOf(".png") < 0 && filety.indexOf(".mp4") < 0) {
...@@ -1692,47 +2171,54 @@ import draggable from "vuedraggable"; ...@@ -1692,47 +2171,54 @@ import draggable from "vuedraggable";
return; return;
} }
console.log('file.type', file.type) console.log("file.type", file.type);
if(filety != ".mp4"){ if (filety != ".mp4") {
// if (file.type !== 'video/mp4') { // if (file.type !== 'video/mp4') {
self.$message.error('仅支持上传mp4格式视频'); self.$message.error("仅支持上传mp4格式视频");
return; return;
} }
var arr = file.name.split('_'); var arr = file.name.split("_");
if(arr.length != 4){ if (arr.length != 4) {
self.$message.error('上传视频文件名格式不正确:举例(GXY_001_02_03.mp4)'); self.$message.error(
"上传视频文件名格式不正确:举例(GXY_001_02_03.mp4)"
);
return; return;
} }
self.$message.info('开始上传'); self.$message.info("开始上传");
self.videoModel.videoPath = createFilePath(file,file.name) self.videoModel.videoPath = createFilePath(file, file.name);
// let videoPath = createFilePath(file,file.name) // let videoPath = createFilePath(file,file.name)
doUpload(self,file,self.videoModel.videoPath,"preview4", doUpload(
self,
file,
self.videoModel.videoPath,
"preview4",
"uploadProgress1", "uploadProgress1",
"").then(function (result) { ""
console.log('成功result',result); ).then(function (result) {
console.log("成功result", result);
self.videoModel.videoFullPath = result.fullPath; self.videoModel.videoFullPath = result.fullPath;
// self.model.size = result.size; // self.model.size = result.size;
// self.model.ext = result.ext; // self.model.ext = result.ext;
// self.model.name = self.model.videoPath; // self.model.name = self.model.videoPath;
let fileItem = { let fileItem = {
goodsImgUrl: result.fullPath, goodsImgUrl: result.fullPath,
uid: '', uid: "",
imageUrl: result.fullPath, imageUrl: result.fullPath,
imageType: 9, imageType: 9,
goodsId: self.formData.goodsId, goodsId: self.formData.goodsId,
id: null, id: null,
deleteFlag: 0 deleteFlag: 0,
} };
self.videoList.push(fileItem); self.videoList.push(fileItem);
self.$message.success('上传成功'); self.$message.success("上传成功");
console.log('sumFile',self.sumFile,'videoList',self.videoList); console.log("sumFile", self.sumFile, "videoList", self.videoList);
return false; return false;
}); });
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./create-good-new.scss"; @import "./create-good-new.scss";
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册