商品分类修改绑定规格八阿哥

This commit is contained in:
lemon橪
2021-06-18 17:11:18 +08:00
parent 336643419e
commit d9368b7514
4 changed files with 61 additions and 97 deletions

View File

@@ -61,7 +61,7 @@ export function getCateById (id) {
// 店铺入驻协议 // 店铺入驻协议
export function agreement () { export function agreement () {
return request({ return request({
url: `/buyer/article/get/1349291301250293760`, url: `/buyer/article/type/STORE_REGISTER`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })

View File

@@ -9,23 +9,11 @@
<Step title="其他信息"></Step> <Step title="其他信息"></Step>
<Step title="提交审核"></Step> <Step title="提交审核"></Step>
</Steps> </Steps>
<first-apply <first-apply v-if="currentIndex == 0 && dataReview" :content="firstData" @change="nextPage"></first-apply>
v-if="currentIndex == 0 && dataReview"
:content="firstData"
@change="nextPage"
></first-apply>
<second-apply <second-apply v-if="currentIndex == 1 && dataReview" :content="secondData" @change="nextPage"></second-apply>
v-if="currentIndex == 1 && dataReview"
:content="secondData"
@change="nextPage"
></second-apply>
<third-apply <third-apply v-if="currentIndex == 2 && dataReview" :content="thirdData" @change="nextPage"></third-apply>
v-if="currentIndex == 2 && dataReview"
:content="thirdData"
@change="nextPage"
></third-apply>
<div class="success-page" v-if="currentIndex == 3"> <div class="success-page" v-if="currentIndex == 3">
<span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功等待平台审核</span> <span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功等待平台审核</span>
@@ -37,59 +25,48 @@
<Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button> <Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button>
</div> </div>
<Modal <Modal title="店铺入驻协议" v-model="showAgreement" width="1200" :closable="false" :mask-closable="false">
title="店铺入驻协议"
v-model="showAgreement"
width="1200"
:closable="false"
:mask-closable="false"
>
<div class="agreeent-con" v-html="agreementCon"></div> <div class="agreeent-con" v-html="agreementCon"></div>
<div slot="footer" style="text-align: center"> <div slot="footer" style="text-align: center">
<p><Checkbox v-model="checked">我已同意以上协议</Checkbox></p> <p>
<Button <Checkbox v-model="checked">我已同意以上协议</Checkbox>
type="primary" </p>
:disabled="!checked" <Button type="primary" :disabled="!checked" class="margin" @click="showAgreement = false">同意协议填写资质信息</Button>
class="margin"
@click="showAgreement = false"
>同意协议填写资质信息</Button
>
</div> </div>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import { agreement, applyStatus } from '@/api/shopentry'; import { agreement, applyStatus } from "@/api/shopentry";
import firstApply from './first-apply'; import firstApply from "./first-apply";
import secondApply from './second-apply'; import secondApply from "./second-apply";
import thirdApply from './third-apply'; import thirdApply from "./third-apply";
export default { export default {
components: { components: {
firstApply, firstApply,
secondApply, secondApply,
thirdApply thirdApply,
}, },
data() { data() {
return { return {
currentIndex: 0, // 当前步骤 currentIndex: 0, // 当前步骤
showAgreement: false, // 协议显示 showAgreement: false, // 协议显示
agreementCon: '', // 协议内容 agreementCon: "", // 协议内容
checked: false, // 选中协议 checked: false, // 选中协议
applyData: {}, // 申请数据 applyData: {}, // 申请数据
firstData: {}, // 第一步数据 firstData: {}, // 第一步数据
secondData: {}, // 第二步数据 secondData: {}, // 第二步数据
thirdData: {}, // 第三步数据 thirdData: {}, // 第三步数据
storeDisable: '', // APPLY OPEN 开店中 CLOSED 关闭 REFUSED 拒绝 APPLYING 申请中,审核 storeDisable: "", // APPLY OPEN 开店中 CLOSED 关闭 REFUSED 拒绝 APPLYING 申请中,审核
dataReview: true // 根据接口返回判断是否可展示数据 dataReview: true, // 根据接口返回判断是否可展示数据
}; };
}, },
methods: { methods: {
getArticle() { getArticle() {
// 入驻协议 // 入驻协议
agreement().then((res) => { agreement().then((res) => {
console.log(res); this.agreementCon = res.result.content;
this.agreementCon = res.result;
}); });
}, },
getData() { getData() {
@@ -101,34 +78,34 @@ export default {
this.dataReview = false; this.dataReview = false;
let data = res.result; let data = res.result;
let first = [ let first = [
'addressIdPath', "addressIdPath",
'addressPath', "addressPath",
'companyAddress', "companyAddress",
'companyEmail', "companyEmail",
'companyName', "companyName",
'employeeNum', "employeeNum",
'legalId', "legalId",
'legalName', "legalName",
'licencePhoto', "licencePhoto",
'legalPhoto', "legalPhoto",
'licenseNum', "licenseNum",
'linkName', "linkName",
'linkPhone', "linkPhone",
'registeredCapital', "registeredCapital",
'scope' "scope",
]; ];
let second = [ let second = [
'settlementBankAccountName', "settlementBankAccountName",
'settlementBankAccountNum', "settlementBankAccountNum",
'settlementBankBranchName', "settlementBankBranchName",
'settlementBankJointName' "settlementBankJointName",
]; ];
let third = [ let third = [
'goodsManagementCategory', "goodsManagementCategory",
'storeCenter', "storeCenter",
'storeDesc', "storeDesc",
'storeLogo', "storeLogo",
'storeName' "storeName",
]; ];
this.storeDisable = data.storeDisable; this.storeDisable = data.storeDisable;
@@ -143,7 +120,7 @@ export default {
this.thirdData[e] = data[e]; this.thirdData[e] = data[e];
}); });
if (this.storeDisable === 'APPLY') { if (this.storeDisable === "APPLY") {
this.currentIndex = 0; this.currentIndex = 0;
} else { } else {
this.currentIndex = 3; this.currentIndex = 3;
@@ -156,11 +133,12 @@ export default {
}, },
nextPage(step) { nextPage(step) {
this.currentIndex = step; this.currentIndex = step;
} },
}, },
mounted() { mounted() {
this.getData(); this.getData();
} this.getArticle();
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -21,10 +21,10 @@ export default {
// buyer: "https://buyer-api.pickmall.cn", // buyer: "https://buyer-api.pickmall.cn",
// seller: "https://store-api.pickmall.cn", // seller: "https://store-api.pickmall.cn",
// manager: "https://admin-api.pickmall.cn" // manager: "https://admin-api.pickmall.cn"
common: "http://192.168.0.100:8890", common: "http://192.168.0.109:8890",
buyer: "http://192.168.0.100:8888", buyer: "http://192.168.0.109:8888",
seller: "http://192.168.0.100:8889", seller: "http://192.168.0.109:8889",
manager: "http://192.168.0.100:8887" manager: "http://192.168.0.109:8887"
}, },
api_prod: { api_prod: {

View File

@@ -106,7 +106,7 @@
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500"> <Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
<Form ref="specForm" :model="specForm" :label-width="100"> <Form ref="specForm" :model="specForm" :label-width="100">
<Select v-model="specForm.category_specs" multiple> <Select v-model="specForm.categorySpecs" multiple>
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName"> <Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
</Option> </Option>
</Select> </Select>
@@ -134,7 +134,6 @@ import {
} from "@/api/goods"; } from "@/api/goods";
import TreeTable from "@/views/my-components/tree-table/Table/Table"; import TreeTable from "@/views/my-components/tree-table/Table/Table";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
import * as filters from "@/utils/filters";
export default { export default {
name: "lili-components", name: "lili-components",
@@ -153,7 +152,7 @@ export default {
specifications: [], //规格集合 specifications: [], //规格集合
categoryId: "", // 分类id categoryId: "", // 分类id
category_brands: [], //已经选择的品牌 category_brands: [], //已经选择的品牌
category_specs: [], //已经选择的规格 categorySpecs: [], //已经选择的规格
expandLevel: 1, // 展开层级 expandLevel: 1, // 展开层级
modalType: 0, // 添加或编辑标识 modalType: 0, // 添加或编辑标识
modalVisible: false, // 添加或编辑显示 modalVisible: false, // 添加或编辑显示
@@ -240,7 +239,8 @@ export default {
//获取所有规格 //获取所有规格
getSpecList() { getSpecList() {
getSpecificationList().then((res) => { getSpecificationList().then((res) => {
if (res.success) { if (res.length != 0) {
this.specifications = res; this.specifications = res;
} }
}); });
@@ -261,7 +261,8 @@ export default {
getCategorySpecListData(v.id).then((res) => { getCategorySpecListData(v.id).then((res) => {
this.categoryId = v.id; this.categoryId = v.id;
this.modalSpecTitle = "规格关联"; this.modalSpecTitle = "规格关联";
this.specForm.category_specs = res.map((item) => item.id); console.log(res);
this.specForm.categorySpecs = res.map((item) => item.id);
this.modalSpecVisible = true; this.modalSpecVisible = true;
}); });
}, },
@@ -396,7 +397,6 @@ export default {
this.categoryList = res.result; this.categoryList = res.result;
this.$nextTick(() => { this.$nextTick(() => {
this.$set(this, "tableData", [res.result[this.categoryIndex]]); this.$set(this, "tableData", [res.result[this.categoryIndex]]);
}); });
@@ -459,22 +459,8 @@ export default {
background: #fff; background: #fff;
padding: 20px; padding: 20px;
} }
.article {
font-size: 16px;
font-weight: 400;
margin: 12px 0;
}
.href-text {
font-size: 12px;
}
.operation { .operation {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-count {
font-weight: 600;
color: #40a9ff;
}
</style> </style>