Commit b78a2d22 by 王志慧

commit

1 parent c0544bce
......@@ -23,11 +23,11 @@ const purchaseOrderCancelOrCheck = (params) => {
method: 'POST',
data: params,
sign: true,
returnAll:true
returnAll: true
})
}
// 查看采购订单
const purchaseOrderDetail=(params)=> {
const purchaseOrderDetail = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.view`
return http({
......@@ -38,7 +38,7 @@ const purchaseOrderDetail=(params)=> {
})
}
// 分页查询采购商城素材信息
const listWithPagePurchaseInfo=(params)=> {
const listWithPagePurchaseInfo = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}listWithPage.purchaseInfo`
return http({
......@@ -50,7 +50,7 @@ const listWithPagePurchaseInfo=(params)=> {
}
// 获取当前登录园区店商户收货地址
const addressGet=(params = {}) =>{
const addressGet = (params = {}) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.get`
return http({
......@@ -63,7 +63,7 @@ const addressGet=(params = {}) =>{
// 保存园区店商户收货地址
const addressSave=(params)=> {
const addressSave = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.save`
return http({
......@@ -75,7 +75,7 @@ const addressSave=(params)=> {
}
// 按商品类目分组获取购物车列表
const listGroupByGoodsType=(params)=> {
const listGroupByGoodsType = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.listGroupByGoodsType`
return http({
......@@ -88,7 +88,7 @@ const listGroupByGoodsType=(params)=> {
// 更新购物车商品选中标识
const updateSelectedFlag=(params)=> {
const updateSelectedFlag = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.updateSelectedFlag`
return http({
......@@ -99,7 +99,7 @@ const updateSelectedFlag=(params)=> {
})
}
// 移除购物车商品
const shoppingCarRemove=(params)=> {
const shoppingCarRemove = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.remove`
return http({
......@@ -111,7 +111,7 @@ const shoppingCarRemove=(params)=> {
}
// 添加到购物车
const shoppingCarAdd=(params)=> {
const shoppingCarAdd = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.add`
return http({
......@@ -128,7 +128,11 @@ const shoppingCarAdd=(params)=> {
export function shoppingCarUpdateNumber(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.updateNumber`
return http(params)
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params
})
}
......@@ -138,15 +142,29 @@ export function shoppingCarUpdateNumber(params) {
// 添加采购订单
// export function purchaseOrderAdd(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path}purchaseOrder.add`
// return http(data, "post")
// }
export function purchaseOrderAdd(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.add`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export function exportExcel(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.export`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取下单/入库门店
......@@ -165,4 +183,4 @@ export function shoppingCarUpdateNumber(params) {
// return http(data)
// }
export default {shoppingCarAdd,shoppingCarRemove,updateSelectedFlag, listGroupByGoodsType,getPurchaseOrderList,purchaseOrderCancelOrCheck,purchaseOrderDetail ,listWithPagePurchaseInfo,addressGet,addressSave}
\ No newline at end of file
export default {exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
\ No newline at end of file
......@@ -19,7 +19,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token:globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
......@@ -34,7 +34,7 @@
</el-tabs>
</div>
<div class="searchCon">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" ></GLCombiForm>
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleRest"></GLCombiForm>
</div>
<div class="goodsCon">
<div class="goodsItemCon" v-for="(item, index) in purchaseList" :class="[{ active: item.active }, { last: index === purchaseList.length - 1 }]" :key="index">
......@@ -82,7 +82,6 @@ export default {
emptyImgUrl: require('@/assets/empty.png'),
showFormData: [
{
name: 'goodsName',
type: 'input',
placeholder: '商品名称/系列',
......@@ -127,18 +126,20 @@ export default {
this.page.pageNum = 1
this.listWithPagePurchaseInfo()
},
handleRest() {
this.searchForm.goodsName = ''
this.page.pageNum = 1
this.listWithPagePurchaseInfo()
},
handleDetail(item, index) {
this.selectItem = item
this.goodsDetailComVisible = true
const list = this.$common.utils.deepClone(this.purchaseList)
this.purchaseList = list.map((item, itemIndex) => {
console.log('itemIndex', itemIndex == index)
item.active = itemIndex == index
// item.active = true
item.active = itemIndex == index
return item
})
console.log(this.purchaseList)
},
listWithPagePurchaseInfo() {
......@@ -177,20 +178,7 @@ export default {
this.$apis.purchaseShopping
.addressGet()
.then(result => {
// this.addressInfo = result
this.addressInfo = {
id: 1,
yqMerchantId: 44211025,
yqMerchantName: '流程测试园区门店',
contactName: '宋司机',
contactPhone: '13750523252',
contactAddress: '111111111111111111111111111111111111111111111111',
createdBy: 'aa123456',
createdDate: 1676619043000,
updatedBy: 'aa123456',
updatedDate: 1678093448000,
deletedFlag: 'N'
}
this.addressInfo = result
if (this.showOrderCom) {
this.showOrderCom = false
this.$refs.shoppingCartCom.validateGoodsNumber()
......@@ -228,10 +216,10 @@ export default {
.d2-header-switch {
display: none;
}
.d2-container-content{
margin:20px auto;
background: #fff;
}
.d2-container-content {
margin: 20px auto;
background: #fff;
}
.shopMallCon {
padding: 0 0 20px !important;
}
......@@ -279,8 +267,7 @@ export default {
}
.viewPurchase {
// font-weight: 500;
// font-size: 14px;
font-size: 14px;
color: #185efe;
}
}
......
<template>
<!-- <div>商品详情</div> -->
<GLDialog :visible.sync="dialogShow" title="产品详情" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<GLDialog destroy-on-close="true" :visible.sync="dialogShow" mode="big" bigTitle="产品详情" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<div class="detail-content">
<!-- 商品详情 -->
<div class="goodsInfoCom">
......@@ -119,6 +119,7 @@ export default {
watch: {
visible(val) {
if (val) {
this.handleItemInfo.goodsNumber = 1
this.getGoodsDetail()
}
}
......
<template>
<div class="shopCarCon">
<el-button class="carBtnCon" type="primary" :data-attr="goodsTotalNumber" icon="carIcon" @click="drawer = true">购物车</el-button>
<div class="carBtnCon" :data-attr="goodsTotalNumber" @click="drawer = true">
<i class="carIcon"></i>
<span class="car-txt">购物车</span>
</div>
<el-drawer class="shoppingCartDrawerCon" title="购物车" :visible.sync="drawer" size="500px" :direction="direction">
<div class="headerCon" v-if="goodsList.length">
<div class="left">
......@@ -58,7 +61,7 @@
<el-button class="submitBtn" @click="validateGoodsNumber" type="primary">结算</el-button>
</div>
</el-drawer>
<GLDialog class="addressDialog" title="结算确认" okText="确定结算" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false">
<GLDialog class="addressDialog" mode="big" bigTitle="结算确认" okText="确定结算" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false">
<h4 class="title">确认要结算订单吗?</h4>
<div class="info">
<p class="tips">
......@@ -194,8 +197,6 @@ export default {
},
shoppingCarList: this.selectList
}
// console.log(params)
// return
this.throttleSubmit = true
this.$apis.purchaseShopping.purchaseOrderAdd(params).then(result => {
this.drawer = false
......@@ -348,8 +349,8 @@ li {
}
.shoppingCartDrawerCon {
box-sizing: border-box;
margin-top: 20vh;
// box-sizing: border-box;
// margin-top: 20vh;
font-size: 14px;
::v-deep .el-drawer__header {
......@@ -405,7 +406,7 @@ li {
}
}
::v-deep.carBtnCon {
.carBtnCon {
// position: absolute;
position: fixed;
top: 30vh;
......@@ -415,10 +416,18 @@ li {
align-items: center;
padding: 32px 12px;
z-index: 2;
// width: 52px;
// height: 158px;
width: 52px;
height: 158px;
box-sizing: border-box;
background: #185efe;
box-shadow: 0 9px 28px 8px #0000000d, 0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f;
border-radius: 4px;
.car-txt {
font-size: 14px;
color: #ffffff;
writing-mode:vertical-rl;
}
&::after {
// content: "123";
content: attr(data-attr);
......@@ -433,6 +442,7 @@ li {
padding: 1px 4px 0;
color: #185efe;
background: #ffffff;
font-size: 10px;
// width: 100%;
// height: 100%;
// background: url(../assets/img/car.png) no-repeat;
......@@ -572,11 +582,15 @@ li {
text-align: center;
font-size: 20px;
color: #f8ba37;
margin:20px 0 40px 0;
}
.tips {
display: flex;
justify-content: space-between;
span{
margin-bottom:20px;
}
}
.info {
......
......@@ -30,7 +30,7 @@
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<el-button type="text" @click="handleCancel(scope.scope)">取消</el-button>
<el-button type="text" v-show="scope.scope.status == 1" @click="handleCancel(scope.scope)">取消</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -320,12 +320,10 @@ export default {
this.$router.push('/purchaseOrder/add')
},
exportExcel() {
this.exportLoading = true
var params = this.getParams()
// this.$apis.couponManage.exportReceiveRecordApi(params).then(res => {
// this.exportLoading = false
// window.location.href = res
// })
this.$apis.purchaseShopping.exportExcel(params).then(res => {
window.location.href = res
})
},
handleSearch() {
this.$refs.orderRef.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!