|
@@ -0,0 +1,287 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="wrapper">
|
|
|
|
+ <div class="title">商品详情</div>
|
|
|
|
+ <div class="status">
|
|
|
|
+ <div class="line"><div class="label">申请状态:</div><span :class="status==3?'statustext':''">{{statusName}}</span></div>
|
|
|
|
+ <div class="line" v-if="status==3"><div class="label">原因:</div><span class="reason">{{reject_reason}}</span></div>
|
|
|
|
+ <div class="line" v-if="status!=4"><div class="label">审核内容:</div><el-button type="text" @click="update">查看审核内容</el-button></div>
|
|
|
|
+ <div class="line" v-if="status==4"><el-button class="commitnew blackbtn" @click="commitNew">提交新审核</el-button></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-divider></el-divider>
|
|
|
|
+
|
|
|
|
+ <div class="empty" v-if="status==1||status==2">
|
|
|
|
+ <span class="emptytitle">暂无过审数据</span>
|
|
|
|
+ <img class="emptyimg" src="../../../../static/images/empty.png" />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-form class="form" ref="form" :model="form" label-width="80px" v-if="status==3||status==4">
|
|
|
|
+ <el-form-item class="single" label="商品名:" label-width="100px" >
|
|
|
|
+ <el-input class="pr-50" placeholder="请输入" v-model="form.title" maxlength="60" disabled show-word-limit>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="类目:" label-width="100px">
|
|
|
|
+ <el-select v-model="form.third_cat_audit" placeholder="请选择" clearable disabled filterable>
|
|
|
|
+ <el-option label="申请通过的类目" value="1"></el-option>
|
|
|
|
+ <el-option label="无需审核类目" value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="商品ID:" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" v-model="form.out_product_id" disabled maxlength="25">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="品牌:" label-width="100px">
|
|
|
|
+ <el-select v-model="form.has_brand" placeholder="请选择" clearable disabled filterable>
|
|
|
|
+ <el-option label="申请通过的品牌" value="1"></el-option>
|
|
|
|
+ <el-option label="无品牌" value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="商品库存:" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" type='number' maxlength="25" disabled v-model="form.stock_num">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="售卖价格:" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" type='number' maxlength="25" disabled v-model="form.sale_price">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="市场价格:" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" type='number' maxlength="25" disabled v-model="form.market_price">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="single" label="小程序链接:" label-width="100px">
|
|
|
|
+ <el-input class="pr-50" placeholder="请输入" v-model="form.path" disabled maxlength="100">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="一级类目:" v-if="false" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" disabled maxlength="25">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="二级类目:" v-if="false" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" disabled maxlength="25">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="三级类目:" v-if="form.third_cat_audit=='0'" label-width="100px">
|
|
|
|
+ <el-input placeholder="请输入" disabled maxlength="25" v-model="form.third_cat_id">
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="single" label="商品图片:" label-width="100px">
|
|
|
|
+ <upload ref="upload_goods" :file="goodsList" limitNum="1" :disabled="true" ></upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="single" label="商品资质图片:" label-width="100px">
|
|
|
|
+ <upload ref="upload_zizhi" :file="goodszizhiList" limitNum="1" :disabled="true"></upload>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ import store from '@/store/index'
|
|
|
|
+ import upload from '@/components/upload'
|
|
|
|
+ import {
|
|
|
|
+ add,detail
|
|
|
|
+ } from "@/api/goods";
|
|
|
|
+ export default {
|
|
|
|
+ name:'goodsDetail',
|
|
|
|
+ components: {
|
|
|
|
+ upload
|
|
|
|
+ },
|
|
|
|
+ props: {},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ goodsList:[],
|
|
|
|
+ goodszizhiList:[],
|
|
|
|
+ outProductId:'',
|
|
|
|
+ status:1,
|
|
|
|
+ statusName:'',
|
|
|
|
+ reject_reason:'',
|
|
|
|
+ form: {
|
|
|
|
+ title: '',
|
|
|
|
+ third_cat_audit: '',
|
|
|
|
+ out_product_id: '',
|
|
|
|
+ has_brand: '',
|
|
|
|
+ stock_num: '',
|
|
|
|
+ sale_price: '',
|
|
|
|
+ market_price: '',
|
|
|
|
+ path: '',
|
|
|
|
+ third_cat_id: '',
|
|
|
|
+ },
|
|
|
|
+ loading: false
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ watch: {},
|
|
|
|
+ computed: {},
|
|
|
|
+ methods: {
|
|
|
|
+ commit(){
|
|
|
|
+ if(this.goodsList.length==0){
|
|
|
|
+ this.$message.error('请选择至少一张商品图片');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let params={
|
|
|
|
+ brand_id:'2100000000',
|
|
|
|
+ has_brand:this.form.has_brand,
|
|
|
|
+ market_price:this.form.market_price,
|
|
|
|
+ out_product_id:this.form.out_product_id,
|
|
|
|
+ path:this.form.path,
|
|
|
|
+ qualificationImgs:this.goodszizhiList.join(","),
|
|
|
|
+ sale_price:this.form.sale_price,
|
|
|
|
+ stock_num:this.form.stock_num,
|
|
|
|
+ third_cat_audit:this.form.third_cat_audit,
|
|
|
|
+ third_cat_id:this.form.third_cat_id,
|
|
|
|
+ thumb_img:this.goodsList[0],
|
|
|
|
+ title:this.form.title
|
|
|
|
+ }
|
|
|
|
+ add(params).then(()=>{
|
|
|
|
+ store.commit('REMOVETAB','新增商品')
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
|
+ this.dialogImageUrl = file.url;
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ },
|
|
|
|
+ getDetail(){
|
|
|
|
+ detail({outProductId:this.outProductId}).then(res=>{
|
|
|
|
+ if(res.data.auditInfo.status){
|
|
|
|
+ this.status=res.data.auditInfo.status
|
|
|
|
+ }
|
|
|
|
+ this.statusName=res.data.auditInfo.statusName
|
|
|
|
+ this.reject_reason=res.data.auditInfo.reject_reason
|
|
|
|
+ this.form.title=res.data.title
|
|
|
|
+ this.form.third_cat_audit=res.data.third_cat_audit
|
|
|
|
+ this.form.out_product_id=res.data.out_product_id
|
|
|
|
+ this.form.has_brand=res.data.has_brand
|
|
|
|
+ this.form.stock_num=res.data.stock_num
|
|
|
|
+ this.form.sale_price=res.data.sale_price
|
|
|
|
+ this.form.market_price=res.data.market_price
|
|
|
|
+ this.form.path=res.data.path
|
|
|
|
+ this.form.third_cat_id=res.data.third_cat_id
|
|
|
|
+ this.goodsList=[{url:res.data.thumb_img}]
|
|
|
|
+ this.goodszizhiList=[]
|
|
|
|
+ if(res.data.qualificationImgs.length>0){
|
|
|
|
+ res.data.qualificationImgs.forEach(element => {
|
|
|
|
+ this.goodszizhiList.push({url:element})
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ commitNew(){ // 提交新审核
|
|
|
|
+ store.commit('SER_ADDOUTPRODUCTID',0)
|
|
|
|
+ this.$router.push("/goods/addGoods");
|
|
|
|
+ },
|
|
|
|
+ update(){ //更新审核
|
|
|
|
+ this.$router.push({name:"addGoods",params:{outProductId:this.outProductId}});
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ created() {},
|
|
|
|
+ mounted() {
|
|
|
|
+ if(this.$route.params.outProductId){
|
|
|
|
+ this.outProductId=this.$route.params.outProductId
|
|
|
|
+ store.commit('SER_OUTPRODUCTID',this.outProductId)
|
|
|
|
+ }else{
|
|
|
|
+ this.outProductId=store.getters.getOutProductId
|
|
|
|
+ }
|
|
|
|
+ this.getDetail()
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+</script>
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+ .wrapper {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ width: 100%;
|
|
|
|
+ text-align: left;
|
|
|
|
+ margin-left: 100px;
|
|
|
|
+ }
|
|
|
|
+ .status{
|
|
|
|
+ width: 75%;
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #232323;
|
|
|
|
+ font-weight: bolder;
|
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
+ .line{
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+ .commitnew{
|
|
|
|
+ margin-left: 40px;
|
|
|
|
+ }
|
|
|
|
+ .label{
|
|
|
|
+ width: 100px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ margin-right:30px;
|
|
|
|
+ }
|
|
|
|
+ .reason{
|
|
|
|
+ width: 80%;
|
|
|
|
+ }
|
|
|
|
+ .statustext{
|
|
|
|
+ color: #E02020;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .empty{
|
|
|
|
+ width: 75%;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+ margin-bottom: 30px;
|
|
|
|
+ .emptytitle{
|
|
|
|
+ text-align: center;
|
|
|
|
+ color: #999999;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ }
|
|
|
|
+ .emptyimg{
|
|
|
|
+ width: 400px;
|
|
|
|
+ height: auto;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .form {
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ width: 75%;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+
|
|
|
|
+ .el-form-item {
|
|
|
|
+ color: #232323;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 300px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-input {
|
|
|
|
+ width: 300px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .single {
|
|
|
|
+ width: 100%;
|
|
|
|
+
|
|
|
|
+ .el-input {
|
|
|
|
+ width: 875px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 875px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .commit{
|
|
|
|
+ width: 100%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+</style>
|