update:新增店铺顺丰ID重新生成功能
This commit is contained in:
parent
e2845261a9
commit
6c270ee2c5
@ -123,3 +123,33 @@ export function createSubStore(data) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function checkReCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: URL.shop.store.base.checkReCreate,
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
},
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function reCreate(data) {
|
||||||
|
return request({
|
||||||
|
url: URL.shop.store.base.checkReCreate,
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
},
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDdistrict(params) {
|
||||||
|
return request({
|
||||||
|
url: URL.shop.store.base.district+'?district_parent_id='+params,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -933,6 +933,9 @@ let url = {
|
|||||||
statisticState: api_url + '/admin/shop/shop-store-base/statisticState',
|
statisticState: api_url + '/admin/shop/shop-store-base/statisticState',
|
||||||
getBaseStoreId: api_url + '/admin/shop/shop-store-base/getBaseStoreId',
|
getBaseStoreId: api_url + '/admin/shop/shop-store-base/getBaseStoreId',
|
||||||
FindStoreLevel: api_url + '/admin/shop/shop-store-base/getGrade',
|
FindStoreLevel: api_url + '/admin/shop/shop-store-base/getGrade',
|
||||||
|
checkReCreate: api_url + '/admin/shop/store/sf-supplier/check-recreate-shopid',
|
||||||
|
reCreate: api_url + '/admin/shop/store/sf-supplier/recreate-shopid',
|
||||||
|
district: api_url + '/admin/shop/open/shop-base-district/list',
|
||||||
//商家端-获取门店信息
|
//商家端-获取门店信息
|
||||||
get: api_url + '/admin/shop/shop-store-base/get',
|
get: api_url + '/admin/shop/shop-store-base/get',
|
||||||
exportFile: api_url + '/admin/shop/shop-store-base/exportFile',
|
exportFile: api_url + '/admin/shop/shop-store-base/exportFile',
|
||||||
|
|||||||
173
src/views/settings/config/plateformDeliverFee/checkReCreate.vue
Normal file
173
src/views/settings/config/plateformDeliverFee/checkReCreate.vue
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog :title="title" :visible.sync="dialogVisible" @open="openDialog" :modal-append-to-body="false"
|
||||||
|
:append-to-body="true" :close-on-click-modal="false" width="30%">
|
||||||
|
<avue-form ref="formref" style="max-height: 700px; overflow-y: auto; margin-bottom: 50px" :key="formkey"
|
||||||
|
:option="option" v-model="form"></avue-form>
|
||||||
|
<span class="avue-dialog__footer avue-dialog__footer--right" v-if="['add', 'edit'].includes(ntype)">
|
||||||
|
<el-button icon="el-icon-circle-plus" type="primary" :loading="btnLoading"
|
||||||
|
@click="submitBtnSave">重新生成</el-button>
|
||||||
|
<el-button icon="el-icon-circle-close" @click="dialogVisible = false">取消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { reCreate,checkReCreate, getDdistrict } from '@/api/store/base'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '校验结果',
|
||||||
|
dialogVisible: false,
|
||||||
|
ntype: 'add',
|
||||||
|
formkey: 1,
|
||||||
|
obj_detail: {},
|
||||||
|
btnLoading: false,
|
||||||
|
form: {},
|
||||||
|
option: {
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
type: 'title',
|
||||||
|
label: '注意',
|
||||||
|
span: 24,
|
||||||
|
display: true,
|
||||||
|
prop: 'message',
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
styles:{
|
||||||
|
color:'red',
|
||||||
|
fontSize:'18px',
|
||||||
|
fontWeight:'bold',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '原顺丰店铺id',
|
||||||
|
span: 24,
|
||||||
|
display: true,
|
||||||
|
prop: 'supplier_id',
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '未找到原有id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
label: '原地区',
|
||||||
|
span: 24,
|
||||||
|
display: true,
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '省',
|
||||||
|
span: 8,
|
||||||
|
display: true,
|
||||||
|
prop: 'pro',
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '未找到原有省份',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '市',
|
||||||
|
span: 8,
|
||||||
|
display: true,
|
||||||
|
prop: 'cit',
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '未找到原有市',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '区',
|
||||||
|
span: 8,
|
||||||
|
display: true,
|
||||||
|
prop: 'dis',
|
||||||
|
required: true,
|
||||||
|
disabled: true,
|
||||||
|
placeholder: '未找到原有地区',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
labelPosition: 'right',
|
||||||
|
labelSuffix: ':',
|
||||||
|
labelWidth: '80px',
|
||||||
|
gutter: 0,
|
||||||
|
menuBtn: false,
|
||||||
|
detail: false,
|
||||||
|
submitBtn: false,
|
||||||
|
submitText: '提交',
|
||||||
|
emptyBtn: false,
|
||||||
|
emptyText: '清空',
|
||||||
|
menuPosition: 'center',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async init() {
|
||||||
|
this.form = {}
|
||||||
|
this.formkey++
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
openDialog() {
|
||||||
|
this.get_detail()
|
||||||
|
},
|
||||||
|
async get_detail() {
|
||||||
|
let reData = await checkReCreate({ store_id: this.obj_detail.store_id })
|
||||||
|
if (reData.status != 200){
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: reData.msg,
|
||||||
|
})
|
||||||
|
this.dialogVisible = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let proRes = await getDdistrict(0)
|
||||||
|
proRes.data.forEach(item => {
|
||||||
|
if (reData.data.province_id == item.district_id) {
|
||||||
|
this.form.pro = item.district_name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let citRes = await getDdistrict(reData.data.province_id)
|
||||||
|
citRes.data.forEach(item => {
|
||||||
|
if (reData.data.city_id == item.district_id) {
|
||||||
|
this.form.cit = item.district_name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let disRes = await getDdistrict(reData.data.city_id)
|
||||||
|
disRes.data.forEach(item => {
|
||||||
|
if (reData.data.district_id == item.district_id) {
|
||||||
|
this.form.dis = item.district_name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.form = reData.data
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
submitBtnSave() {
|
||||||
|
this.$confirm(this.form.message, {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
let data = {
|
||||||
|
store_id: this.obj_detail.store_id,
|
||||||
|
supplier_id: this.form.supplier_id,
|
||||||
|
}
|
||||||
|
return reCreate(data)
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$emit('callback_fun_reCreate')
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.btnLoading = false
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '操作成功!',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user