Commit a37724de by 王志慧

采购商城,订单接口切换

1 parent ce0220b4
...@@ -6,7 +6,7 @@ const path3 = 'dj.api.smartcarlife.' ...@@ -6,7 +6,7 @@ const path3 = 'dj.api.smartcarlife.'
// 获取当前登录园区店商户收货地址 // 获取当前登录园区店商户收货地址
const addressGet = (params = {}) => { const addressGet = (params = {}) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.get` params.routerMethod = `dj.api.smarcarlife.yqMerchantDeliveryAddress.getByNoLogin`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -29,7 +29,7 @@ const getAreaInfoApi = function (params) { ...@@ -29,7 +29,7 @@ const getAreaInfoApi = function (params) {
// 分页查询采购订单 // 分页查询采购订单
const getPurchaseOrderList = (params) => { const getPurchaseOrderList = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseApply.page` params.routerMethod = `dj.api.smarcarlife.purchaseApply.page.noLogin`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -68,7 +68,7 @@ const listWithPagePurchaseInfo = (params) => { ...@@ -68,7 +68,7 @@ const listWithPagePurchaseInfo = (params) => {
// 保存园区店商户收货地址 // 保存园区店商户收货地址
const addressSave = (params) => { const addressSave = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.save` params.routerMethod = `dj.api.smarcarlife.yqMerchantDeliveryAddress.saveByNoLogin`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -138,7 +138,7 @@ export function purchaseOrderAdd(params) { ...@@ -138,7 +138,7 @@ export function purchaseOrderAdd(params) {
export function exportExcel(params) { export function exportExcel(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseApply.export` params.routerMethod = `dj.api.smarcarlife.purchaseApply.export.noLogin`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
......
<template> <template>
<el-drawer ref="drawerRef" class="shoppingCartDrawerCon" v-bind="$attrs" title="收货地址管理" size="774px" <el-drawer ref="drawerRef" class="shoppingCartDrawerCon" v-bind="$attrs" title="收货地址管理" size="774px" :direction="direction" :before-close="cancel">
:direction="direction" :before-close="cancel"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="154px" defaultWidth="432px" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="154px" defaultWidth="432px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<span slot="provincesAndCities"> <span slot="provincesAndCities">
<el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" <el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" style="width: 432px" :options="provincesAndCities_options" :props="{ label: 'name', value: 'code', children: 'childrenList' }" />
style="width:432px" :options="provincesAndCities_options"
:props="{ label: 'name', value: 'code', children: 'childrenList' }" />
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<div class="footer-btn"> <div class="footer-btn">
<span class="btn"> <span class="btn">
<el-button size="small" @click="cancel">取消</el-button> <el-button size="small" @click="cancel">取消</el-button>
<el-button size="small" @click="submit" type="primary">保存</el-button> <el-button size="small" @click="submit" type="primary">保存</el-button>
</span> </span>
</div> </div>
</el-drawer> </el-drawer>
</template> </template>
...@@ -106,8 +101,6 @@ export default { ...@@ -106,8 +101,6 @@ export default {
this.editForm = {} this.editForm = {}
} }
} }
} }
}, },
created() { created() {
...@@ -118,7 +111,6 @@ export default { ...@@ -118,7 +111,6 @@ export default {
getAreaInfo() { getAreaInfo() {
this.$apis.purchase.getAreaInfoApi({ areaType: '2' }).then(res => { this.$apis.purchase.getAreaInfoApi({ areaType: '2' }).then(res => {
this.provincesAndCities_options = res.areaList this.provincesAndCities_options = res.areaList
}) })
}, },
getProvincesAndCities() { getProvincesAndCities() {
...@@ -137,7 +129,11 @@ export default { ...@@ -137,7 +129,11 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
this.getProvincesAndCities() this.getProvincesAndCities()
let { merchantId, accountName, merchantName } = this.$globalState.session
const params = this.$common.utils.deepClone(this.editForm) const params = this.$common.utils.deepClone(this.editForm)
params.merchantId = merchantId
params.merchantName = merchantName
params.updatedBy = accountName
delete params.provincesAndCities delete params.provincesAndCities
this.$apis.purchase this.$apis.purchase
.addressSave(params) .addressSave(params)
...@@ -149,7 +145,7 @@ export default { ...@@ -149,7 +145,7 @@ export default {
this.$parent.addressComVisible = false this.$parent.addressComVisible = false
this.$emit('handleConfirmAddress') this.$emit('handleConfirmAddress')
}) })
.catch(err => { }) .catch(err => {})
} }
}) })
}, },
...@@ -157,8 +153,7 @@ export default { ...@@ -157,8 +153,7 @@ export default {
this.$parent.addressComVisible = false this.$parent.addressComVisible = false
}, },
validPhone(mobile) { validPhone(mobile) {
const myreg = const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
/^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile) return myreg.test(mobile)
} }
} }
...@@ -167,7 +162,6 @@ export default { ...@@ -167,7 +162,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.shoppingCartDrawerCon { .shoppingCartDrawerCon {
// position: relative; // position: relative;
/deep/ .el-drawer__header { /deep/ .el-drawer__header {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
...@@ -178,26 +172,26 @@ export default { ...@@ -178,26 +172,26 @@ export default {
} }
/deep/ .el-textarea { /deep/ .el-textarea {
width: 580px!important; width: 580px !important;
.el-textarea__inner { .el-textarea__inner {
height: auto !important; height: auto !important;
} }
} }
.footer-btn { .footer-btn {
width: 774px; width: 774px;
height: 64px; height: 64px;
border-radius: 4px; border-radius: 4px;
border-top: 1px solid #E5E5E5; border-top: 1px solid #e5e5e5;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
text-align: right; text-align: right;
line-height: 64px; line-height: 64px;
.btn { .btn {
text-align: right; text-align: right;
margin-right: 20px; margin-right: 20px;
}
} }
}
} }
</style> </style>
...@@ -196,6 +196,7 @@ export default { ...@@ -196,6 +196,7 @@ export default {
params.orderTimeStr[0] = new Date(this.searchForm.placeOrderTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.orderTimeStr[0] = new Date(this.searchForm.placeOrderTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.orderTimeStr[1] = new Date(this.searchForm.placeOrderTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.orderTimeStr[1] = new Date(this.searchForm.placeOrderTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
params.merchantId = this.$globalState.session.merchantId
delete params.placeOrderTimeStr delete params.placeOrderTimeStr
return params return params
}, },
...@@ -229,7 +230,7 @@ export default { ...@@ -229,7 +230,7 @@ export default {
}, },
//取消 //取消
handleCancel(row) { handleCancel(row) {
this.secondConfirm('取消', '订单取消后即自动作废该订单,且无法撤回。是否确定取消?', 'purchase', 'purchaseOrderCancelOrCheck', { id: row.id }) this.secondConfirm('取消', '订单取消后即自动作废该订单,且无法撤回。是否确定取消?', 'purchase', 'purchaseOrderCancelOrCheck', { id: row.id,updatedBy:this.$globalState.session.accountName })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
......
...@@ -191,8 +191,11 @@ export default { ...@@ -191,8 +191,11 @@ export default {
}, },
methods: { methods: {
getAddressInfo() { getAddressInfo() {
const { merchantId } = this.$globalState.session
this.$apis.purchase this.$apis.purchase
.addressGet() .addressGet({
merchantId
})
.then(result => { .then(result => {
if (result) { if (result) {
this.addressInfo = result this.addressInfo = result
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!