张雄 3 years ago
parent a333210877
commit 4e07c0c780

@ -1,3 +1,3 @@
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant' VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/admin' VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/merchant/'

@ -1,3 +1,3 @@
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant' VUE_APP_URL = 'https://saas.kaidalai.cn/api/merchant'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource' VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/merchant/'

@ -0,0 +1,37 @@
import httpService from "@/request"
// 账号-查询所有商品
export function getGoodsList(params) {
return httpService({
url: `/user/goods/list`,
method: 'get',
params: params,
})
}
// 账号-添加商品
export function addGood(params) {
return httpService({
url: `/user/goods/insert`,
method: 'post',
data: params,
})
}
// 批量删除物品
export function delGoods(params) {
return httpService({
url: `/user/goods/delete`,
method: 'post',
data: params,
})
}
// 上下架
export function isShelf(params) {
return httpService({
url: `/user/goods/isShelf`,
method: 'get',
params: params,
})
}

@ -25,4 +25,58 @@ export function getCityList(params) {
method: 'get', method: 'get',
params: params, params: params,
}) })
} }
// 添加店铺
export function addShop(params) {
return httpService({
url: `/user/authentication/subjectAuthenticationPre`,
method: 'post',
data: params,
})
}
// 根据店铺主键id查询店铺信息
export function getShopDetail(params) {
return httpService({
url: `/user/shop/detail`,
method: 'get',
params: params,
})
}
// 根据店铺主键id查询主体信息
export function getCertiDetail(params) {
return httpService({
url: `/user/authentication/authenticationFBI`,
method: 'get',
params: params,
})
}
// 修改主体认证
export function updateCertification(params) {
return httpService({
url: `/user/authentication/updateSubjectAuthentication`,
method: 'post',
data: params,
})
}
// 查询所有的商品分类(级联)
export function getItemCategory(params) {
return httpService({
url: `/user/goods/findAllGoodsCategory`,
method: 'get',
params: params,
})
}
// 店铺认证(已废弃)
// export function subjectAuthentication(params) {
// return httpService({
// url: `/user/authentication/subjectAuthentication`,
// method: 'post',
// data: params,
// })
// }

@ -0,0 +1,10 @@
import httpService from "@/request"
// 账号-查询所有店铺
export function getAllShop(params) {
return httpService({
url: `/user/shop/list`,
method: 'get',
params: params,
})
}

@ -50,7 +50,7 @@ export default {
previewVisible: false, previewVisible: false,
previewImage: "", previewImage: "",
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
}; };
}, },

@ -12,10 +12,10 @@ export default {
install(Vue) { install(Vue) {
Vue.mixin({ Vue.mixin({
computed: { computed: {
...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity','getUserInfo']) ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity','getUserInfo','getShopInfo'])
}, },
methods: { methods: {
...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity','setUserInfo']) ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity','setUserInfo','setShopInfo'])
} }
}) })
} }

@ -26,7 +26,7 @@ function filterRequestData(obj) {
//创建axios的实例 //创建axios的实例
const httpService = axios.create({ const httpService = axios.create({
baseURL: process.env.VUE_APP_URL ,// TODO:具体的配置可以根据项目情况而来 baseURL: process.env.VUE_APP_URL ,// TODO:具体的配置可以根据项目情况而来
timeout: 5000 timeout: 10000
}) })
//axios的拦截--request //axios的拦截--request

@ -25,6 +25,9 @@ const actions = {
setUserInfo: ({commit}, log) => { setUserInfo: ({commit}, log) => {
commit('setUserInfo', log) commit('setUserInfo', log)
}, },
setShopInfo: ({commit}, log) => {
commit('setShopInfo', log)
},
} }
export default actions export default actions

@ -24,7 +24,10 @@ const getters = {
}, },
getUserInfo(state) { getUserInfo(state) {
return state.userInfo return state.userInfo
} },
getShopInfo(state) {
return state.shopInfo
},
} }
export default getters export default getters

@ -32,6 +32,11 @@ const mutations = {
state.userInfo = log state.userInfo = log
let str = JSON.stringify(log); let str = JSON.stringify(log);
sessionStorage.setItem('userInfo', str); sessionStorage.setItem('userInfo', str);
},
setShopInfo (state, log) {
state.shopInfo = log
let str = JSON.stringify(log);
sessionStorage.setItem('shopInfo', str);
} }
} }

@ -13,5 +13,6 @@ const state = {
communityCode: sessionStorage.getItem('communityCode') || "", communityCode: sessionStorage.getItem('communityCode') || "",
cityList:[], cityList:[],
userInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {}, userInfo: JSON.parse(sessionStorage.getItem('userInfo')) || {},
shopInfo: JSON.parse(sessionStorage.getItem('shopInfo')) || {},
} }
export default state export default state

@ -7,16 +7,10 @@ export default {
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
Vue.prototype.qs = qs Vue.prototype.qs = qs
// 上传 // 上传
// Vue.prototype.$upload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/upload/uploadImg' Vue.prototype.$upload = process.env.VUE_APP_URL + '/user/upload/uploadImg'
// 上传员工/房屋/住户/单元/楼栋EXCEL
// Vue.prototype.$excelUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importManageUserExcel'
// Vue.prototype.$houseUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importEstateExcel'
// Vue.prototype.$residentUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importResidentExcel'
// Vue.prototype.$unitUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importUnitExcel'
// Vue.prototype.$buildingUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importBuildingExcel'
// 静态地址 // 静态地址
Vue.prototype.$ImgUrl = (src) => { Vue.prototype.$ImgUrl = (src) => {
return process.env.VUE_APP_STATIC + store.getters.getCommunityCode + '/' + src return process.env.VUE_APP_STATIC + '/' + src
} }
// 时间格式化 // 时间格式化
Vue.prototype.formatDate = (time, fmt) => { Vue.prototype.formatDate = (time, fmt) => {

@ -213,5 +213,5 @@ export const options = {
}; };
import store from "@/store"; import store from "@/store";
export const uploadHeaders = { export const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}; };

@ -284,7 +284,7 @@ export default {
type: "add", type: "add",
// //
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }
}; };
}, },

@ -140,5 +140,5 @@ export const unitColumns = [
] ]
import store from "@/store"; import store from "@/store";
export const uploadHeaders = { export const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }

@ -88,7 +88,7 @@ export default {
editId:undefined, editId:undefined,
// //
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }
}; };
}, },

@ -95,5 +95,5 @@ export const options = {
// 请求头 // 请求头
import store from "@/store"; import store from "@/store";
export const uploadHeaders = { export const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }

@ -309,7 +309,7 @@ export default {
}, },
// //
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }
}; };
}, },

@ -65,5 +65,5 @@ export const rules = {
// 请求头 // 请求头
import store from "@/store"; import store from "@/store";
export const uploadHeaders = { export const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }

@ -234,7 +234,7 @@ export default {
}, },
// //
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
fileList: [] fileList: []
}; };

@ -80,7 +80,7 @@
import store from "@/store"; import store from "@/store";
import {finish} from "@/api/basic/Workorder"; import {finish} from "@/api/basic/Workorder";
const uploadHeaders = { const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }
function getBase64(file) { function getBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

@ -94,5 +94,5 @@ export const options = {
// 请求头 // 请求头
import store from "@/store"; import store from "@/store";
export const uploadHeaders = { export const uploadHeaders = {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
} }

@ -14,40 +14,35 @@
></commonUpload> ></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="商品名称"> <a-form-model-item label="商品名称">
<a-input></a-input> <a-input v-model="form.name"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="商品类目"> <a-form-model-item label="商品类目">
<a-input></a-input> <a-cascader :options="typeData" @change="typeChange" placeholder="请选择"
<div style="color: #BBB">准确选择商品类目有助于完善商品信息</div> style="width: 312px" :field-names="{ label: 'name', value: 'id', children: 'categoryVoList' }">
</a-cascader>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<h3 style="padding: 15px">价格信息</h3> <h3 style="padding: 15px">价格信息</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="价格"> <a-form-model-item label="价格">
<a-input-group compact> ¥ <a-input-number :min="0" :step="0.1" v-model="form.sellPrice"></a-input-number>
<a-input style="width: 10%" disabled default-value="¥" />
<a-input style="width: 50%" />
</a-input-group>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="划线价"> <a-form-model-item label="划线价">
<a-input-group compact> ¥ <a-input-number :min="0" :step="0.1" v-model="form.discountPrice"></a-input-number>
<a-input style="width: 10%" disabled default-value="¥" />
<a-input style="width: 50%" />
</a-input-group>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="库存扣减方式"> <a-form-model-item label="库存扣减方式">
付款减库存 付款减库存
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="库存"> <a-form-model-item label="库存">
<a-input disabled></a-input> <a-input-number :min="0" v-model="form.stock"></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<h3 style="padding: 15px">物流信息</h3> <h3 style="padding: 15px">物流信息</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 6}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 6}">
<a-form-model-item label="配送方式"> <a-form-model-item label="配送方式">
<a-radio-group v-model="form.shipWay"> <a-radio-group v-model="form.distributionType">
<a-radio :value="1">快递发货</a-radio> <!-- <a-radio :value="1">快递发货</a-radio> -->
<a-radio :value="2">到店自提</a-radio> <a-radio :value="1">到店自提</a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择城市"> <a-form-model-item label="选择城市">
@ -56,7 +51,7 @@
></a-cascader> ></a-cascader>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="自提地址"> <a-form-model-item label="自提地址">
<a-input></a-input> <a-input v-model="form.selfLiftingAddress"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-tab-pane> </a-tab-pane>
@ -71,7 +66,7 @@
/> />
<Editor <Editor
style="height: 500px; overflow-y: hidden;" style="height: 500px; overflow-y: hidden;"
v-model="form.content" v-model="form.details"
:defaultConfig="editorConfig" :defaultConfig="editorConfig"
mode="simple" mode="simple"
@onCreated="onCreated" @onCreated="onCreated"
@ -90,7 +85,8 @@
<script> <script>
import { Editor, Toolbar } from '@wangeditor/editor-for-vue' import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { getCityList } from "@/api/public" import { getCityList, getItemCategory } from "@/api/public"
import { addGood } from "@/api/Item"
import { columns1,tableData1,tableData2,tableData3 } from "./depend/config" import { columns1,tableData1,tableData2,tableData3 } from "./depend/config"
export default { export default {
name: 'certification', name: 'certification',
@ -103,21 +99,22 @@ export default {
tableData1: tableData1, tableData1: tableData1,
tableData2: tableData2, tableData2: tableData2,
tableData3: tableData3, tableData3: tableData3,
zOption: [{label:'食品流通许可证',value:1},{label:'食品经营许可证',value:2},
{label:'食品生产许可证',value:3},{label:'食品小作坊登记证',value:4},
{label:'国境口岸卫生许可证',value:5},{label:'预包装食品备案凭证',value:6},],
fileList: [], fileList: [],
cityList: [], cityList: [],
typeData: [],
form: { form: {
type: 1, shopId: undefined,
isLongtime: 0, goodsImgUrls: [],
isIdCardLongtime: 0, name: '',
sellTimeStart: 1, categoryId: undefined,
shipWay: 1, sellPrice: 0.0,
shipFeeType: 1, discountPrice: 0.0,
unsell: 1, stockType: 1,
zList: [], stock: 0,
content: '<p>请输入内容</p>' distributionType: 1,
selfLiftingCity: undefined,
selfLiftingAddress: '',
details: '<p>请输入内容</p>'
}, },
// //
editor: null, editor: null,
@ -126,6 +123,7 @@ export default {
} }
}, },
created() { created() {
this.form.shopId = this.getShopInfo.id;
this.getApi(); this.getApi();
}, },
beforeDestroy() { beforeDestroy() {
@ -138,24 +136,36 @@ export default {
getCityList().then(res => { getCityList().then(res => {
let data = res.data; let data = res.data;
this.cityList = data; this.cityList = data;
}) });
getItemCategory().then(res => {
this.typeData = res.data;
})
}, },
onCreated(editor) { onCreated(editor) {
this.editor = Object.seal(editor) // Object.seal() this.editor = Object.seal(editor) // Object.seal()
}, },
submit() { submit() {
this.$message.success('上传成功') addGood(this.form).then(res => {
this.$router.push({name:'ItemList'}); if(res.code == 200) {
this.$message.success(res.msg)
this.$router.push({name:'ItemList'});
} else {
this.$message.error(res.msg)
}
})
}, },
handleChange(data) { handleChange(data) {
// this.fileList = data; this.fileList = data;
// this.form.imgList = []; this.form.goodsImgUrls = [];
// data.forEach(ele => { data.forEach(ele => {
// if(ele.status == 'done') { if(ele.status == 'done') {
// this.form.imgList.push(ele.response.data) this.form.goodsImgUrls.push(ele.response.data)
// } }
// }) })
} },
typeChange(value) {
this.form.categoryId = value[2];
},
} }
} }
</script> </script>

@ -5,9 +5,9 @@ export const columns = [
dataIndex: "status", dataIndex: "status",
customRender: function (status) { customRender: function (status) {
switch (status) { switch (status) {
case false: case 2:
return '已下架' return '已下架'
case true: case 1:
return '上架中' return '上架中'
default: default:
break; break;
@ -17,56 +17,47 @@ export const columns = [
{ {
title: "商品编号", title: "商品编号",
width: "11%", width: "11%",
dataIndex: "skuNumber", dataIndex: "code",
}, },
{ {
title: "商品图片", title: "商品图片",
width: "8%", width: "8%",
dataIndex: "mainPhoto", dataIndex: "imgList",
scopedSlots: { customRender: "mainPhoto"} scopedSlots: { customRender: "mainPhoto"}
}, },
{ {
title: "商品名称", title: "商品名称",
width: "11%", width: "9%",
dataIndex: "skuName", dataIndex: "name",
}, },
{ {
title: "所属分类", title: "所属分类",
width: "6%", width: "14%",
dataIndex: "mallType", dataIndex: "categoryNamePath",
customRender: function (mallType) {
switch (mallType) {
case 1:
return 'Jcook'
default:
return ''
}
}
}, },
{ {
title: "店铺名称", title: "售卖价(元)",
width: "10%",
dataIndex: "shopName",
},
{
title: "售货价",
width: "8%", width: "8%",
dataIndex: "price", dataIndex: "sellPrice",
}, },
{ {
title: "库存", title: "库存",
width: "8%", width: "8%",
dataIndex: "discountPrice", dataIndex: "stock",
}, },
{ {
title: "销量", title: "销量",
width: "7%", width: "7%",
dataIndex: "viewsNum", dataIndex: "salesVolume",
}, },
{ {
title: "创建时间", title: "创建时间",
width: "10%", width: "10%",
dataIndex: "creatTime", dataIndex: "createDate",
customRender: function (createDate) {
let date = new Date(createDate).toLocaleString();
return date
}
}, },
{ {
title: "操作", title: "操作",

@ -3,7 +3,6 @@
<div class="cardTitle"> <div class="cardTitle">
<span>商品列表</span> <span>商品列表</span>
</div> </div>
<!-- <searchForm :formItem="formItem" @getSearch="search($event)"></searchForm> -->
<div class="search-box"> <div class="search-box">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
@ -11,19 +10,23 @@
<a-form-model layout="inline"> <a-form-model layout="inline">
<a-form-model-item label="商品类目"> <a-form-model-item label="商品类目">
<a-cascader v-model="casVal" :options="typeData" @change="typeChange" placeholder="请选择" <a-cascader v-model="casVal" :options="typeData" @change="typeChange" placeholder="请选择"
:field-names="{ label: 'name', value: 'id', children: 'shopCategoryVoList' }"> style="width: 312px" :field-names="{ label: 'name', value: 'id', children: 'categoryVoList' }">
</a-cascader> </a-cascader>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="付款方式"> <a-form-model-item label="店铺名称">
<a-select style="width: 200px"></a-select> <a-select v-model="form.shopId" style="width: 200px">
<a-select-option v-for="item in shopData" :key="item.id" :value="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="商品名称"> <a-form-model-item label="商品名称">
<a-input style="width: 200px"></a-input> <a-input v-model="form.name" style="width: 200px"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="商品编"> <a-form-model-item label="商品编">
<a-input style="width: 200px"></a-input> <a-input v-model="form.code" style="width: 200px"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="下单时间"> <a-form-model-item label="创建时间">
<a-range-picker style="width: 312px"></a-range-picker> <a-range-picker style="width: 312px"></a-range-picker>
</a-form-model-item> </a-form-model-item>
<a-form-model-item> <a-form-model-item>
@ -35,11 +38,10 @@
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<a-radio-group style="padding: 24px" v-model="form.status" buttonStyle="solid"> <a-radio-group style="padding: 24px" v-model="form.status" @change="getData" buttonStyle="solid">
<a-radio-button :value="undefined">全部</a-radio-button> <a-radio-button :value="undefined">全部</a-radio-button>
<a-radio-button :value="1">上架中</a-radio-button> <a-radio-button :value="1">上架中</a-radio-button>
<a-radio-button :value="2">已售罄</a-radio-button> <a-radio-button :value="2">已下架</a-radio-button>
<a-radio-button :value="3">已下架</a-radio-button>
</a-radio-group> </a-radio-group>
<div style="margin-left: 24px"> <div style="margin-left: 24px">
<a-button @click="goAdd" type="primary" ghost><a-icon type="plus" />添加商品</a-button> <a-button @click="goAdd" type="primary" ghost><a-icon type="plus" />添加商品</a-button>
@ -49,7 +51,7 @@
:columns="columns" :columns="columns"
:data-source="tableData" :data-source="tableData"
:pagination="pagination" :pagination="pagination"
:scroll="{ x: 2400 }" :scroll="{ x: 2000 }"
@change="handleTableChange" @change="handleTableChange"
:loading="loading" :loading="loading"
:row-selection="{ :row-selection="{
@ -62,30 +64,23 @@
} }
" "
> >
<template slot="point" slot-scope="text,row">
<a-switch
checked-children="开"
un-checked-children="关"
:checked="row.isPointsGoods"
@change="changePoingGood(row)"
></a-switch>
</template>
<span slot="action" slot-scope="text, row"> <span slot="action" slot-scope="text, row">
<a-space> <a-space>
<a class="ant-dropdown-link" @click="onSell([row.id])"></a> <a v-if="row.status == 2" class="ant-dropdown-link" @click="shelf(row.id,row.status)"></a>
<a class="ant-dropdown-link" @click="offSell([row.id])"></a> <a v-if="row.status == 1" class="ant-dropdown-link" @click="shelf(row.id,row.status)"></a>
<a class="ant-dropdown-link" @click="edit(row.id)"></a> <a class="ant-dropdown-link" @click="edit(row.id)"></a>
</a-space> </a-space>
</span> </span>
<span slot="mainPhoto" slot-scope="text, row"> <span slot="mainPhoto" slot-scope="text, row">
<img :src="row.mainPhoto" class="table-img" alt="" /> <img v-for="(item,index) in row.imgList" :src="'https://saas.kaidalai.cn/resource/merchant/'+item.url" :key="index" class="table-img" />
</span> </span>
</a-table> </a-table>
<div class="action"> <div class="action">
<a-dropdown :disabled="!hasSelected"> <a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick"> <a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="on"> 批量上架 </a-menu-item> <!-- <a-menu-item key="on"> 批量上架 </a-menu-item>
<a-menu-item key="off"> 批量下架 </a-menu-item> <a-menu-item key="off"> 批量下架 </a-menu-item> -->
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu> </a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button> <a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown> </a-dropdown>
@ -99,26 +94,29 @@
</template> </template>
<script> <script>
import { getItemCategory } from "@/api/public"
import { getGoodsList, delGoods, isShelf } from "@/api/Item"
import { columns, pagination, formItem } from "./depend/config.js"; import { columns, pagination, formItem } from "./depend/config.js";
import { getAllShop } from "@/api/shopChoose"
export default { export default {
data() { data() {
return { return {
form: { form: {
status: undefined status: undefined,
shopId: undefined,
code: '',
categoryId: undefined,
name: '',
createDateStart: '',
createDateEnd: ''
}, },
drawer: { drawer: {
show: false, show: false,
}, },
searchForm: {
skuId: undefined,
skuName: undefined,
categoryFirstId: undefined,
categorySecondId: undefined,
categoryThirdId: undefined,
},
loading: false, loading: false,
typeData: [], typeData: [],
casVal: [], casVal: [],
shopData: [],
columns, columns,
goodsId:null, goodsId:null,
pagination, pagination,
@ -128,14 +126,25 @@ export default {
}; };
}, },
mounted() { mounted() {
this.form.shopId = this.getShopInfo.id;
this.getApi();
this.getData();
}, },
methods: { methods: {
getApi() { getApi() {
getItemCategory().then(res => {
this.typeData = res.data;
});
getAllShop({pageNum:1,size:100}).then(res => {
this.shopData = res.data.rows;
})
}, },
getData() { getData() {
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
getGoodsList(obj).then(res => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
})
}, },
reset() { reset() {
this.getData() this.getData()
@ -155,12 +164,13 @@ export default {
this.goodsId = id; this.goodsId = id;
this.drawer.show = true; this.drawer.show = true;
}, },
onSell(ids) { //
shelf(ids,status) {
this.$confirm({ this.$confirm({
title: "是否上架", title: status==1?'是否下架':'是否上架',
icon: "caret-up", icon: "delete",
onOk: async () => { onOk: async () => {
let res = await onShelf({ ids: ids }); let res = await isShelf({ merchantGoodsId: ids ,shopId: this.getShopInfo.id});
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
@ -170,12 +180,12 @@ export default {
}, },
}); });
}, },
offSell(ids) { multiDel(ids) {
this.$confirm({ this.$confirm({
title: "是否下架", title: "是否删除",
icon: "caret-down", icon: "delete",
onOk: async () => { onOk: async () => {
let res = await offShelf({ ids: ids }); let res = await delGoods({ ids: ids ,shopId: this.getShopInfo.id});
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
@ -190,15 +200,14 @@ export default {
this.onSell(this.selectedRowKeys); this.onSell(this.selectedRowKeys);
} else if (data.key === "off") { } else if (data.key === "off") {
this.offSell(this.selectedRowKeys); this.offSell(this.selectedRowKeys);
} else if (data.key === "del") {
this.multiDel(this.selectedRowKeys);
} }
}, },
addClose() { addClose() {
this.drawer.show = false; this.drawer.show = false;
this.goodsId = null; this.goodsId = null;
}, },
success() {
this.getData();
},
// //
changePoingGood(val) { changePoingGood(val) {
isEnableRedeem({appGoodsPushId: val.id}).then(res => { isEnableRedeem({appGoodsPushId: val.id}).then(res => {
@ -211,9 +220,7 @@ export default {
}) })
}, },
typeChange(value) { typeChange(value) {
this.searchForm.categoryFirstId = value[0]; this.form.categoryId = value[2];
this.searchForm.categorySecondId = value[1];
this.searchForm.categoryThirdId = value[2];
}, },
// //
goAdd() { goAdd() {

@ -7,22 +7,26 @@
<a-divider></a-divider> <a-divider></a-divider>
<a-form-model> <a-form-model>
<a-form-model-item label="主体类型"> <a-form-model-item label="主体类型">
<a-radio-group @change="changeType" v-model="form.type" size="large" buttonStyle="solid"> <a-radio-group disabled @change="changeType" v-model="form.type" size="large" buttonStyle="solid">
<a-radio-button :value="3">个体户</a-radio-button> <a-radio-button :value="1">个体户</a-radio-button>
<a-radio-button :value="2">企业</a-radio-button> <a-radio-button :value="2">企业</a-radio-button>
<a-radio-button :value="1">个人</a-radio-button> <a-radio-button :value="3">个人</a-radio-button>
</a-radio-group> </a-radio-group>
<div> <div>
<a-card class="card-item" size="small" :bordered="false"> <a-card class="card-item" size="small" :bordered="false">
<span v-if="form.type == 3"></span> <span v-if="form.type == 1"></span>
<span v-if="form.type == 2"></span> <span v-if="form.type == 2"></span>
<span v-if="form.type == 1"> </span> <span v-if="form.type == 3"> </span>
<div v-if="form.type == 1">(10)</div> <div v-if="form.type == 3">(10)</div>
</a-card> </a-card>
</div> </div>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="经营类目"> <a-form-model-item label="经营类目">
<a-select mode="multiple" style="width: 467px" v-model="form.authenticationOperateInfoUpdateDTO.categoryIds">
<a-select-option v-for="(item) in cateList" :key="item.id" :value="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
@ -49,14 +53,14 @@
<a-alert message=" <a-alert message="
切实履行账户实名管理商户身份核实交易风险管理等职责需核实相关信息感谢你的配合" type="info" show-icon /> 切实履行账户实名管理商户身份核实交易风险管理等职责需核实相关信息感谢你的配合" type="info" show-icon />
<a-tabs v-model="activeTab" style="margin-top: 24px"> <a-tabs v-model="activeTab" style="margin-top: 24px">
<a-tab-pane :key="1" tab="填写主体信息" v-if="form.type == 3 || form.type == 2"> <a-tab-pane :key="1" tab="填写主体信息" v-if="form.type == 1 || form.type == 2">
<h3 style="padding: 16px">主体类型</h3> <h3 style="padding: 16px">主体类型</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="主体类型"> <a-form-model-item label="主体类型">
<a-radio-group v-model="form.type" disabled> <a-radio-group v-model="form.type" disabled>
<a-radio :value="3">个体户</a-radio> <a-radio :value="1">个体户</a-radio>
<a-radio :value="2">企业</a-radio> <a-radio :value="2">企业</a-radio>
<a-radio :value="1">个人</a-radio> <a-radio :value="3">个人</a-radio>
</a-radio-group> </a-radio-group>
<div><span>如需修改主体类型请返回<a>上一步</a>进行操作</span></div> <div><span>如需修改主体类型请返回<a>上一步</a>进行操作</span></div>
</a-form-model-item> </a-form-model-item>
@ -87,27 +91,27 @@
<h3 style="padding: 16px">主体证件照片</h3> <h3 style="padding: 16px">主体证件照片</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="统一社会信用代码证"> <a-form-model-item label="统一社会信用代码证">
<commonUpload <!-- <commonUpload
:fileList="fileList" :fileList="fileList"
@handleChange="handleChange" @handleChange="handleChange"
></commonUpload> ></commonUpload> -->
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="其他资质证明"> <a-form-model-item label="其他资质证明">
<commonUpload <!-- <commonUpload
:fileList="fileList" :fileList="fileList"
@handleChange="handleChange" @handleChange="handleChange"
></commonUpload> ></commonUpload> -->
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :key="2" tab="填写个人信息"> <a-tab-pane :key="2" tab="填写个人信息">
<h3 v-if="form.type==1" style="padding: 16px"></h3> <h3 v-if="form.type==3" style="padding: 16px"></h3>
<a-form-model v-if="form.type==1" style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model v-if="form.type==3" style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="主体类型"> <a-form-model-item label="主体类型">
<a-radio-group v-model="form.type" disabled> <a-radio-group v-model="form.type" disabled>
<a-radio :value="3">个体户</a-radio> <a-radio :value="1">个体户</a-radio>
<a-radio :value="2">企业</a-radio> <a-radio :value="2">企业</a-radio>
<a-radio :value="1">个人</a-radio> <a-radio :value="3">个人</a-radio>
</a-radio-group> </a-radio-group>
<div><span>如需修改主体类型请返回<a>上一步</a>进行操作</span></div> <div><span>如需修改主体类型请返回<a>上一步</a>进行操作</span></div>
</a-form-model-item> </a-form-model-item>
@ -116,20 +120,20 @@
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="手持身份证照"> <a-form-model-item label="手持身份证照">
<commonUpload <commonUpload
:fileList="fileList" :fileList="fileList.handheldIdCardImgUrls"
@handleChange="handleChange" @handleChange="handlehhChange"
></commonUpload> ></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="证件照正面"> <a-form-model-item label="证件照正面">
<commonUpload <commonUpload
:fileList="fileList" :fileList="fileList.idCardFrontImgUrls"
@handleChange="handleChange" @handleChange="handlefrontChange"
></commonUpload> ></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="证件照反面"> <a-form-model-item label="证件照反面">
<commonUpload <commonUpload
:fileList="fileList" :fileList="fileList.idCardBackImgUrls"
@handleChange="handleChange" @handleChange="handlebackChange"
></commonUpload> ></commonUpload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
@ -140,31 +144,31 @@
大陆身份证 大陆身份证
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="法定代表人姓名"> <a-form-model-item label="法定代表人姓名">
<a-input v-model="form.authenticationPersonalInfoDTO.name"></a-input> <a-input v-model="form.authenticationPersonalInfoUpdateDTO.name"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="证件号码"> <a-form-model-item label="证件号码">
<a-input v-model="form.authenticationPersonalInfoDTO.idNumber"></a-input> <a-input v-model="form.authenticationPersonalInfoUpdateDTO.idNumber"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="出生日期"> <a-form-model-item label="出生日期">
<a-date-picker v-model="form.authenticationPersonalInfoDTO.birthday"></a-date-picker> <a-date-picker v-model="form.authenticationPersonalInfoUpdateDTO.birthday" value-format="YYYY-MM-DD HH:mm:ss"></a-date-picker>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="证件有效期"> <a-form-model-item label="证件有效期">
<a-radio-group v-model="isIdCardLongtime"> <a-radio-group v-model="isIdCardLongtime">
<a-radio :value="0">区间有效</a-radio> <a-radio :value="0">区间有效</a-radio>
<a-radio :value="1">长期有效</a-radio> <a-radio :value="1">长期有效</a-radio>
</a-radio-group> </a-radio-group>
<a-date-picker v-model="form.authenticationPersonalInfoDTO.idValidityStart" v-if="isIdCardLongtime == 1"></a-date-picker> <a-date-picker v-model="form.authenticationPersonalInfoUpdateDTO.idValidityStart" value-format="YYYY-MM-DD HH:mm:ss" v-if="isIdCardLongtime == 1"></a-date-picker>
<a-range-picker v-model="selTime2" v-if="isIdCardLongtime == 0"></a-range-picker> <a-range-picker v-model="selTime2" v-if="isIdCardLongtime == 0" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="性别"> <a-form-model-item label="性别">
<a-select v-model="form.authenticationPersonalInfoDTO.sex"> <a-select v-model="form.authenticationPersonalInfoUpdateDTO.sex">
<a-select-option :value="1"></a-select-option> <a-select-option :value="1"></a-select-option>
<a-select-option :value="2"></a-select-option> <a-select-option :value="2"></a-select-option>
<a-select-option :value="3">保密</a-select-option> <a-select-option :value="3">保密</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="职业"> <a-form-model-item label="职业">
<a-input v-model="form.authenticationPersonalInfoDTO.occupation"></a-input> <a-input v-model="form.authenticationPersonalInfoUpdateDTO.occupation"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-tab-pane> </a-tab-pane>
@ -172,26 +176,26 @@
<h3 style="padding: 16px">联系人</h3> <h3 style="padding: 16px">联系人</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="联系人姓名"> <a-form-model-item label="联系人姓名">
<a-input v-model="form.authenticationOperateInfoDTO.name"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.name"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="手机号"> <a-form-model-item label="手机号">
<a-input v-model="form.authenticationOperateInfoDTO.tel"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.tel"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="常用邮箱"> <a-form-model-item label="常用邮箱">
<a-input v-model="form.authenticationOperateInfoDTO.email"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.email"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="客服电话"> <a-form-model-item label="客服电话">
<a-input v-model="form.authenticationOperateInfoDTO.customerServiceTel"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.customerServiceTel"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<h3 style="padding: 16px">结算账户信息</h3> <h3 style="padding: 16px">结算账户信息</h3>
<a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}"> <a-form-model style="margin-left: 12px" :labelCol="{span: 3}" :wrapperCol="{span: 5}">
<a-form-model-item label="结算类型">支付宝</a-form-model-item> <a-form-model-item label="结算类型">支付宝</a-form-model-item>
<a-form-model-item label="支付宝用户名称"> <a-form-model-item label="支付宝用户名称">
<a-input v-model="form.authenticationOperateInfoDTO.alipayName"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.alipayName"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="支付宝账号"> <a-form-model-item label="支付宝账号">
<a-input v-model="form.authenticationOperateInfoDTO.alipayAccount"></a-input> <a-input v-model="form.authenticationOperateInfoUpdateDTO.alipayAccount"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<h3 style="padding: 16px">经营信息</h3> <h3 style="padding: 16px">经营信息</h3>
@ -203,30 +207,53 @@
<a-cascader :options="cityList" placeholder="请选择" <a-cascader :options="cityList" placeholder="请选择"
:field-names="{ label: 'name', value: 'id', children: 'cityList', }" @change="changeBusCity" :field-names="{ label: 'name', value: 'id', children: 'cityList', }" @change="changeBusCity"
></a-cascader> ></a-cascader>
<a-textarea v-model="form.authenticationOperateInfoDTO.operateAddressDetail"></a-textarea> <a-textarea v-model="form.authenticationOperateInfoUpdateDTO.operateAddressDetail"></a-textarea>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="经营类型"> <a-form-model-item v-if="form.type == 3" label="经营类型">
<a-select v-model="form.authenticationOperateInfoDTO.operateType"> <a-select v-model="form.authenticationOperateInfoUpdateDTO.operateType">
<a-select-option :value="1">个人销售自产农副产品</a-select-option>
<a-select-option :value="2">个人销售家庭手工业产品</a-select-option>
<a-select-option :value="3">个人利用自己的技能从事便民劳务活动</a-select-option>
<a-select-option :value="4">个人从事零星小额交易活动</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="经营类目"> <a-form-model-item label="经营类目">
<a-checkbox-group v-model="form.authenticationOperateInfoDTO.categoryIds"></a-checkbox-group> <a-select mode="multiple" v-model="form.authenticationOperateInfoUpdateDTO.categoryIds">
<a-select-option v-for="(item) in cateList" :key="item.id" :value="item.id">
{{item.name}}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
<h4 style="padding: 12px">食品>生鲜果蔬特殊资质证明</h4> <h4 style="padding: 12px">食品>生鲜果蔬特殊资质证明</h4>
<a-form-model-item label="具体资质"> <a-form-model-item label="具体资质">
<a-checkbox-group v-model="form.qualificationDTO" :options="zOption"></a-checkbox-group> <a-checkbox-group v-model="form.qualificationDTO" @change="qualificationChange" :options="zOption"></a-checkbox-group>
</a-form-model-item> </a-form-model-item>
<!-- <a-form-model-item label="许可证资质证明"> <!-- <a-form-model-item label="许可证资质证明">
</a-form-model-item> </a-form-model-item> -->
<a-form-model-item label="门店门头照片"> <a-form-model-item label="门店门头照片">
<commonUpload
:fileList="fileList.doorHeadImgUrls"
@handleChange="handleDoorHeadChange"
></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="门店内景照片"> <a-form-model-item label="门店内景照片">
<commonUpload
:fileList="fileList.indoorSceneImgUrls"
@handleChange="handleDoorInsideChange"
></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="收银台照片"> <a-form-model-item label="收银台照片">
<commonUpload
:fileList="fileList.cashierImgUrls"
@handleChange="handleCashChange"
></commonUpload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="补充信息"> <a-form-model-item label="补充信息">
</a-form-model-item> --> <commonUpload
:fileList="fileList.otherImgUrls"
@handleChange="handleOtherChange"
></commonUpload>
</a-form-model-item>
</a-form-model> </a-form-model>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
@ -247,7 +274,8 @@
<script> <script>
import { columns1,tableData1,tableData2,tableData3 } from "./depend/config" import { columns1,tableData1,tableData2,tableData3 } from "./depend/config"
import { merchantList, getCityList } from "@/api/public" import { merchantList, getCityList, updateCertification } from "@/api/public"
import { getCertiDetail } from "@/api/public"
export default { export default {
name: 'certification', name: 'certification',
data() { data() {
@ -263,9 +291,10 @@ export default {
{label:'食品生产许可证',value:3},{label:'食品小作坊登记证',value:4}, {label:'食品生产许可证',value:3},{label:'食品小作坊登记证',value:4},
{label:'国境口岸卫生许可证',value:5},{label:'预包装食品备案凭证',value:6},], {label:'国境口岸卫生许可证',value:5},{label:'预包装食品备案凭证',value:6},],
form: { form: {
id: undefined,
type: 3, type: 3,
// //
authenticationPersonalInfoDTO: { authenticationPersonalInfoUpdateDTO: {
handheldIdCardImgUrls: [], // handheldIdCardImgUrls: [], //
idCardFrontImgUrls: [], // idCardFrontImgUrls: [], //
idCardBackImgUrls: [], // idCardBackImgUrls: [], //
@ -279,7 +308,7 @@ export default {
occupation: '', occupation: '',
}, },
// //
authenticationOperateInfoDTO: { authenticationOperateInfoUpdateDTO: {
name: '', name: '',
tel: '', tel: '',
email: '', email: '',
@ -310,11 +339,20 @@ export default {
otherImgUrls: [], // otherImgUrls: [], //
}, },
cityList: [], cityList: [],
cateList: [],
isLongtime: 1, isLongtime: 1,
isIdCardLongtime: 1, isIdCardLongtime: 1,
selTime: [], selTime: [],
selTime2: [], selTime2: [],
fileList: [], fileList: {
handheldIdCardImgUrls: [],
idCardFrontImgUrls: [],
idCardBackImgUrls: [],
doorHeadImgUrls: [],
indoorSceneImgUrls: [],
cashierImgUrls: [],
otherImgUrls:[],
},
} }
}, },
created() { created() {
@ -324,22 +362,53 @@ export default {
getApi() { getApi() {
merchantList({type: this.form.type}).then(res => { merchantList({type: this.form.type}).then(res => {
let data = res.data; let data = res.data;
let arr = [];
data.forEach(ele => {
ele.childList.forEach(e => {
let obj = {
id: e.id,
name: ele.name+'-'+e.name
};
arr.push(obj)
})
})
this.cateList = arr;
}); });
getCityList().then(res => { getCityList().then(res => {
let data = res.data; let data = res.data;
this.cityList = data; this.cityList = data;
});
getCertiDetail({merchantShopId: this.getShopInfo.id}).then(res => {
let data = res.data;
//
this.form.id = data.id;
this.form.type = data.type;
//
//
}) })
}, },
changeType() { changeType() {
merchantList({type: this.form.type}).then(res => { merchantList({type: this.form.type}).then(res => {
let data = res.data; let data = res.data;
let arr = [];
data.forEach(ele => {
ele.childList.forEach(e => {
let obj = {
id: e.id,
name: ele.name+'-'+e.name
};
arr.push(obj)
})
})
this.cateList = arr;
}); });
}, },
changeCity(value) { changeCity(value) {
this.conpanyForm.registerAddress = value[2] this.conpanyForm.registerAddress = value[2]
}, },
changeBusCity(value) { changeBusCity(value) {
this.form.authenticationOperateInfoDTO.operateAddress = value[2] this.form.authenticationOperateInfoUpdateDTO.operateAddress = value[2]
}, },
goNext() { goNext() {
if(this.isChecked == true) { if(this.isChecked == true) {
@ -352,10 +421,101 @@ export default {
} }
}, },
submit() { submit() {
this.stage = 1; if(this.form.type == 3) {
updateCertification(this.form).then(res => {
if(res.code == 200) {
this.$message.success(res.msg);
this.$router.go(-1);
} else {
this.$message.error(res.msg);
}
})
} else {
let obj = Object.assign(this.form,this.conpanyForm);
updateCertification(obj).then(res => {
if(res.code == 200) {
this.$message.success(res.msg);
this.$router.go(-1);
} else {
this.$message.error(res.msg);
}
})
}
}, },
handleChange(data) { handlehhChange(data) { //
this.fileList.handheldIdCardImgUrls = data;
this.form.authenticationPersonalInfoUpdateDTO.handheldIdCardImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationPersonalInfoUpdateDTO.handheldIdCardImgUrls.push(ele.response.data)
}
})
},
handlefrontChange(data) { //
this.fileList.idCardFrontImgUrls = data;
this.form.authenticationPersonalInfoUpdateDTO.idCardFrontImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationPersonalInfoUpdateDTO.idCardFrontImgUrls.push(ele.response.data)
}
})
},
handlebackChange(data) { //
this.fileList.idCardBackImgUrls = data;
this.form.authenticationPersonalInfoUpdateDTO.idCardBackImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationPersonalInfoUpdateDTO.idCardBackImgUrls.push(ele.response.data)
}
})
},
handleDoorHeadChange(data) { //
this.fileList.doorHeadImgUrls = data;
this.form.authenticationOperateInfoUpdateDTO.doorHeadImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationOperateInfoUpdateDTO.doorHeadImgUrls.push(ele.response.data)
}
})
},
handleDoorInsideChange(data) { //
this.fileList.indoorSceneImgUrls = data;
this.form.authenticationOperateInfoUpdateDTO.indoorSceneImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationOperateInfoUpdateDTO.indoorSceneImgUrls.push(ele.response.data)
}
})
},
handleCashChange(data) { //
this.fileList.cashierImgUrls = data;
this.form.authenticationOperateInfoUpdateDTO.cashierImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationOperateInfoUpdateDTO.cashierImgUrls.push(ele.response.data)
}
})
},
handleOtherChange(data) { //
this.fileList.otherImgUrls = data;
this.form.authenticationOperateInfoUpdateDTO.otherImgUrls = [];
data.forEach(ele => {
if(ele.status == 'done') {
this.form.authenticationOperateInfoUpdateDTO.otherImgUrls.push(ele.response.data)
}
})
},
//
qualificationChange(value) {
let arr = [];
value.forEach(ele => {
let obj = {
id: ele,
qualificationsImgUrls: []
};
arr.push(obj)
});
this.qualificationDTO = arr;
} }
} }
} }

@ -1,14 +1,16 @@
<template> <template>
<div class="content"> <div class="content">
<div class="top-info"> <div class="top-info">
<a-alert style="width: 93%" message="依据《中华人民共和国电子商务法》规定,店铺对外经营需完成主体认证。为避免影响店铺经营,请尽快完成。" type="info" show-icon /> <a-alert v-if="currentStatus == 1" style="width: 93%" message="依据《中华人民共和国电子商务法》规定,店铺对外经营需完成主体认证。为避免影响店铺经营,请尽快完成。" type="info" show-icon />
<a-button @click="goCerti" type="primary">前往认证</a-button> <a-button v-if="currentStatus == 1" @click="goCerti" type="primary"></a-button>
<a-alert v-if="currentStatus == 2" style="width: 100%" message="资料正在审核中将在1-5个工作日内答复您。" type="warning" show-icon />
<a-alert v-if="currentStatus == 9" style="width: 93%" message="您提交的主体认证审核被驳回,请查看原因,并按要求修改资料后重新提交审核。" type="error" show-icon />
<a-button v-if="currentStatus == 9" type="primary"></a-button>
</div> </div>
<div class="realtime-info"> <div class="realtime-info">
<div style="padding: 24px 24px 24px 0px"> <!-- <div style="padding: 24px 24px 24px 0px">
<!-- 图片占位 -->
<img style="width: 100px;height: 100px" src="" alt="" /> <img style="width: 100px;height: 100px" src="" alt="" />
</div> </div> -->
<div> <div>
<a-descriptions :column="2"> <a-descriptions :column="2">
<template slot="title"> <template slot="title">
@ -17,24 +19,17 @@
<a @click="changeShop"></a> <a @click="changeShop"></a>
</div> </div>
</template> </template>
<a-descriptions-item label="店铺编号">dp000000001</a-descriptions-item> <a-descriptions-item label="店铺编号">{{shopData.code}}</a-descriptions-item>
<a-descriptions-item label="经营范围">--</a-descriptions-item> <a-descriptions-item label="经营范围">{{shopData.businessScope}}</a-descriptions-item>
<a-descriptions-item label="店铺名称"> <a-descriptions-item label="店铺名称">
个人店铺0220608000031 <a>编辑</a> {{shopData.name}} <a>编辑</a>
</a-descriptions-item>
<a-descriptions-item label="店铺账号">
13777777777
</a-descriptions-item>
<a-descriptions-item label="创建时间">
2022/03/23
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="联系人姓名">--</a-descriptions-item> <a-descriptions-item label="店铺账号">{{shopData.account}}</a-descriptions-item>
<a-descriptions-item label="主体信息"> <a-descriptions-item label="创建时间"> {{shopData.createDate}}</a-descriptions-item>
<a @click="goCerti"></a> <a-descriptions-item label="联系人姓名">{{shopData.operateName}}</a-descriptions-item>
</a-descriptions-item> <a-descriptions-item label="主体信息"><a @click="goCerti"></a></a-descriptions-item>
<a-descriptions-item label="联系电话">0</a-descriptions-item> <a-descriptions-item label="联系电话">{{shopData.operateTel}}</a-descriptions-item>
<a-descriptions-item label="店铺简介">0</a-descriptions-item> <a-descriptions-item label="店铺简介">{{shopData.introduction}}</a-descriptions-item>
<a-descriptions-item label="上架社区">0</a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
</div> </div>
@ -42,8 +37,24 @@
</template> </template>
<script> <script>
import { getShopDetail } from "@/api/public"
export default { export default {
data() {
return {
currentStatus: 3,
shopData: {}
}
},
mounted() {
this.getApi()
},
methods: { methods: {
getApi() {
getShopDetail({shopId: this.getShopInfo.id}).then(res => {
this.shopData = res.data;
this.currentStatus = res.data.status
})
},
goCerti() { goCerti() {
this.$router.push({name:'Certification'}); this.$router.push({name:'Certification'});
}, },

@ -1,8 +1,11 @@
<template> <template>
<div class="content"> <div class="content">
<div class="top-info"> <div class="top-info">
<a-alert style="width: 93%" message="依据《中华人民共和国电子商务法》规定,店铺对外经营需完成主体认证。为避免影响店铺经营,请尽快完成。" type="info" show-icon /> <a-alert v-if="currentStatus == 1" style="width: 93%" message="依据《中华人民共和国电子商务法》规定,店铺对外经营需完成主体认证。为避免影响店铺经营,请尽快完成。" type="info" show-icon />
<a-button @click="goCerti" type="primary">前往认证</a-button> <a-button v-if="currentStatus == 1" @click="goCerti" type="primary"></a-button>
<a-alert v-if="currentStatus == 2" style="width: 100%" message="资料正在审核中将在1-5个工作日内答复您。" type="warning" show-icon />
<a-alert v-if="currentStatus == 9" style="width: 93%" message="您提交的主体认证审核被驳回,请查看原因,并按要求修改资料后重新提交审核。" type="error" show-icon />
<a-button v-if="currentStatus == 9" type="primary"></a-button>
</div> </div>
<div class="order-info"> <div class="order-info">
<div class="order-info-item"> <div class="order-info-item">
@ -52,7 +55,18 @@
<script> <script>
export default { export default {
data() {
return {
currentStatus: 1
}
},
mounted() {
this.getApi()
},
methods: { methods: {
getApi() {
this.currentStatus = this.getShopInfo.status;
},
goCerti() { goCerti() {
this.$router.push({name:'Certification'}); this.$router.push({name:'Certification'});
} }

@ -117,7 +117,7 @@ export default {
fileList: [], fileList: [],
documentList: [], documentList: [],
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
}; };
}, },

@ -212,7 +212,7 @@ export default {
// //
documentList: [], documentList: [],
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
// //
detailShow: false, detailShow: false,

@ -134,7 +134,7 @@ export default {
deleteId: [], //Id deleteId: [], //Id
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
activeIndex: undefined, activeIndex: undefined,
}; };

@ -112,7 +112,7 @@ export default {
deleteId: [], //Id deleteId: [], //Id
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "merchant-login-token": store.getters.getToken,
}, },
activeIndex: undefined, activeIndex: undefined,
}; };

@ -21,19 +21,26 @@
<a-button @click="createShop" type="primary">创建店铺</a-button> <a-button @click="createShop" type="primary">创建店铺</a-button>
</div> </div>
<div style="padding: 32px"> <div style="padding: 32px">
<a-input-search placeholder="店铺名称" style="width: 308px" @search="getData" /> <a-input-search v-model="searchForm.name" placeholder="店铺名称" style="width: 308px" @search="getData" />
</div> </div>
<div> <div>
<a-row style="padding: 0px 0px 0px 32px"> <a-row style="padding: 0px 0px 0px 0px">
<a-col :span="6"> <a-col :span="6" v-for="item in shopData" :key="item.id">
<a-card title="小蜜蜂旗舰店"> <a-card :title="item.name">
<a slot="extra" @click="handlerGo"></a> <a slot="extra" @click="handlerGo(item.id)" style="margin-left: 24px"></a>
<p>店铺状态营业中</p> <p>店铺状态{{item.status == 2?'审核中':item.status == 3?'已认证':item.status == 1?'未认证':'已驳回'}}</p>
<p>经营地址北京市北京市丰台区和义街道 19 单元 107 </p> <p>经营地址{{item.operateAddress}}</p>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<a-pagination
style="float: right;padding: 12px"
v-model="pagination.current"
:page-size.sync="pagination.pageSize"
:total="pagination.total"
@change="pageChange"
/>
</div> </div>
</a-layout-content> </a-layout-content>
<a-modal v-model="visible" :closable="false" :footer="null"> <a-modal v-model="visible" :closable="false" :footer="null">
@ -52,15 +59,16 @@
<a-input style="width: 80%"></a-input> <a-input style="width: 80%"></a-input>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<a-button @click="stage = 2" type="primary" ghost style="margin-top: 90px">下一步</a-button> <a-button @click="nextStage" type="primary" ghost style="margin-top: 90px">下一步</a-button>
</div> </div>
<div v-if="stage == 2"> <div v-if="stage == 2">
<a-form-model layout="vertical"> <a-form-model layout="vertical">
<a-form-model-item v-if="form.type == 1 || form.type == 2" label="经营类目"> <a-form-model-item label="经营类目">
<a-select style="width: 80%"></a-select> <a-select mode="multiple" v-model="form.categoryIds">
</a-form-model-item> <a-select-option v-for="(item) in cateList" :key="item.id" :value="item.id">
<a-form-model-item v-if="form.type == 3" label="您的主营行业是?"> {{item.name}}
<a-select style="width: 80%"></a-select> </a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<a-button @click="submit" type="primary" style="margin-top: 90px">提交</a-button> <a-button @click="submit" type="primary" style="margin-top: 90px">提交</a-button>
@ -71,19 +79,62 @@
<script> <script>
import { quit } from "@/api/login"; import { quit } from "@/api/login";
import { addShop, merchantList, getShopDetail} from "@/api/public"
import { getAllShop } from "@/api/shopChoose"
export default { export default {
data() { data() {
return { return {
visible: false, visible: false,
stage: 1, stage: 1,
searchForm: {
name: ''
},
form: { form: {
type: 2 type: 2,
} companyName: '',
categoryIds: [],
},
pagination: {
current: 1,
pageSize: 12,
total: 0
},
shopData: [],
cateList: []
} }
}, },
mounted() {
this.getData();
},
methods: { methods: {
getData() { getData() {
let obj = Object.assign(this.searchForm,{pageNum: this.pagination.current,size: this.pagination.pageSize})
getAllShop(obj).then(res => {
this.shopData = res.data.rows;
this.pagination.total = res.total;
})
},
pageChange(current,size) {
this.pagination.current = current;
this.pagination.pageSize = size;
this.getData();
},
nextStage() {
this.stage = 2;
merchantList({type: this.form.type}).then(res => {
let data = res.data;
let arr = [];
data.forEach(ele => {
ele.childList.forEach(e => {
let obj = {
id: e.id,
name: ele.name+'-'+e.name
};
arr.push(obj)
})
})
this.cateList = arr;
});
}, },
async logout(){ async logout(){
let res = await quit() let res = await quit()
@ -98,9 +149,21 @@ export default {
this.visible = true this.visible = true
}, },
submit() { submit() {
addShop(this.form).then(res => {
if(res.code == 200) {
this.$message.success(res.msg);
this.getData();
this.visible = false;
} else {
this.$message.error(res.msg);
}
})
}, },
handlerGo() { handlerGo(id) {
getShopDetail({shopId: id}).then(res => {
let obj = {id: res.data.id,status: res.data.status}
this.setShopInfo(obj)
})
this.$router.push({name:'WorkBench'}); this.$router.push({name:'WorkBench'});
} }
} }

Loading…
Cancel
Save