店长的商品订单

version/0412
fanfan 1 year ago
parent 5f8c8af9d0
commit 231dc63679
  1. 16
      api/newFun.js
  2. 18
      pages.json
  3. 3
      pages/news3/LogisticsDetails.vue
  4. 514
      pages/news3/sendOutGoods.vue
  5. 1242
      pages/news3/shopOrder.vue
  6. 1303
      pages/news3/shopOrderDetails.vue
  7. 520
      pages/news3/updateAddr.vue
  8. 540
      pages/news3/updatePrice.vue
  9. 4
      pages/order/index.vue
  10. 1
      pages/order/refund/refund.vue

@ -163,6 +163,22 @@ export const wuliuList = (param) => {
export const updatePrice = (param) => { export const updatePrice = (param) => {
return request.post('storeKeeper/updatePrice', param) return request.post('storeKeeper/updatePrice', param)
} }
//店长 修改物流
export const updateDelivery = (param) => {
return request.post('StoreKeeper/updateDelivery', param)
}
//店长 修改地址
export const updateAddress = (param) => {
return request.post('StoreKeeper/updateAddress', param)
}
// 店长同意拒绝
export const audit = (param) => {
return request.post('storeKeeper/audit', param)
}
// 店长删除订单
export const oderDelete = (param) => {
return request.post('storeKeeper/oderDelete', param)
}
//地址智能识别 //地址智能识别
export const analysis = (param) => { export const analysis = (param) => {
return request.get('address/analysis', param) return request.get('address/analysis', param)

@ -1074,15 +1074,15 @@
"navigationBarTitleText": "确认订单" "navigationBarTitleText": "确认订单"
} }
}, },
// { {
// "path": "updatePrice", "path": "updatePrice",
// "style": { "style": {
// // "enablePullDownRefresh": true, // "enablePullDownRefresh": true,
// "navigationStyle": "default", "navigationStyle": "default",
// "navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
// "navigationBarTitleText": "修改价格" "navigationBarTitleText": "修改价格"
// } }
// }, },
{ {
"path": "updateAddr", "path": "updateAddr",
"style": { "style": {

@ -95,6 +95,9 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .u-empty {
padding: 100rpx 0;
}
page { page {
background-color: #F7F8FA; background-color: #F7F8FA;
min-height: 100%; min-height: 100%;

@ -1,274 +1,322 @@
<template> <template>
<view class="updatePrice"> <view class="updatePrice">
<view class="dispatchContent"> <view class="dispatchContent">
<view class="orderNum"> <view class="orderNum">
订单号{{orderInfo.order_no}} 订单号{{orderInfo.order_no}}
</view> </view>
<view class="dispatchItem" v-for="item in orderInfo.goods"> <view class="dispatchItem" v-for="item in orderInfo.goods">
<image :src="item.goods_image" mode="aspectFill"></image> <image :src="item.goods_image" mode="aspectFill"></image>
<view class="right"> <view class="right">
<view class="title"> <view class="title">
{{item.goods_name}} {{item.goods_name}}
</view> </view>
<view class="subTitle" v-for="p in item.goods_props" :key="p.group"> <view class="subTitle" v-for="p in item.goods_props" :key="p.group">
{{p.group.name}}:{{p.value.name}} {{p.group.name}}:{{p.value.name}}
</view> </view>
<view class="num"> <view class="num">
x{{item.total_num}} x{{item.total_num}}
</view> </view>
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <text style="font-size: 26upx;">¥</text>
<text>{{item.total_price}}</text> <text>{{item.total_price}}</text>
</view>
</view> </view>
</view> </view>
</view>
</view>
<view class="selectContent" style="border:none;background-color: #fff;">
<!-- <view class="left">
物流费用
</view> </view>
<view class="right"> <view class="selectContent" style="border:none;background-color: #fff;">
<view class="price"> <picker @change="changeOption" mode="selector" range-key="express_name" :value="index" :range="wlList">
<text style="font-size: 26upx;">¥</text> <u-field v-model="expressName" :disabled="true" label="物流公司" placeholder="请选择物流公司"
<text>288</text> right-icon="arrow-right">
</u-field>
</picker>
<view class="scan">
<u-field style="flex: 1;padding:30upx 0 30upx 30upx" v-model="codeNum" label="物流单号"
placeholder="请填写物流单号">
</u-field>
<image :src="$picUrl+'/static/news3/scan.png'" @click="scanCode" mode=""></image>
</view> </view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> <view class="footerBtn" @click="onCheck" v-if="source==1">
</view> --> <view class="wuliuBtn">
<u-field @click="wuliuShow=true" v-model="expressName" 物流链接
:disabled="true" label="物流公司" placeholder="请选择物流公司" </view>
right-icon="arrow-down-fill"
>
</u-field>
<u-action-sheet @click="selectedExpress" :list="wlList" v-model="wuliuShow"></u-action-sheet>
<view class="scan">
<u-field
style="flex: 1;padding:30upx 0 30upx 30upx"
v-model="codeNum"
label="物流单号"
placeholder="请填写物流单号"
>
</u-field>
<image :src="$picUrl+'/static/news3/scan.png'" mode=""></image>
</view>
<view class="footerBtn">
<view class="wuliuBtn">
物流链接
</view> </view>
</view> </view>
<view class="goods-fd">
<view class="btn" @click="sendGoodsHandle">{{source==1?'保存修改':'确认发货'}}</view>
</view>
</view> </view>
<view class="btn" @click="sendGoodsHandle">
确认发货
</view>
</view>
</template> </template>
<script> <script>
import * as newFunApi from '@/api/newFun' import * as newFunApi from '@/api/newFun'
export default{ export default {
data(){ data() {
return{ return {
modifyInfo:false, modifyInfo: false,
newPrice:null, newPrice: null,
wuliuShow:false, wlList: [
wlList:[
],
], codeNum: '',
codeNum:'', orderInfo: {},
orderInfo:{}, expressList: [],
expressList:[], expressId: null,
expressId:null, expressName: '',
expressName:'', source: 1
} }
},
methods:{
selectedExpress(val){
console.log(val,this.wlList)
this.expressId = this.wlList[val].id
this.expressName = this.wlList[val].text
}, },
async sendGoodsHandle(){ methods: {
let goosList = this.orderInfo.goods.map(item=>{ /**
return{ * 查快递
orderGoodsId:item.order_goods_id, */
deliveryNum:item.delivery_num onCheck() {
if (!this.codeNum) {
return this.$toast('请填写物流单号')
} }
}) uni.navigateTo({
let params={ url: "/pages/news3/LogisticsDetails?logisticsNum=" + this.codeNum
"orderId": this.orderInfo.order_no, })
"form": { },
"deliveryMethod":this.wuliu?10:20, scanCode() {
"packGoodsData": goosList, uni.scanCode({
"expressId": this.expressId, success: (res) => {
"expressNo": this.codeNum, this.codeNum = res.result;
"syncMpWeixinShipping": 1 },
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
},
//
changeOption(e) {
this.expressName = this.wlList[e.detail.value].express_name;
this.expressId = this.wlList[e.detail.value].express_id
},
async sendGoodsHandle() {
if (!this.expressId) {
return that.$toast('请选择物流公司')
} }
} if (!this.codeNum) {
let {status, message, data} = await newFunApi.sendGoods(params); return that.$toast('请填写物流单号')
if(status == 200){ }
uni.hideLoading(); let goosList = this.orderInfo.goods.map(item => {
uni.navigateBack({delta:1})
// this.goodsList = this.goodsList.concat(data.list.data)
// this.total = data.list.total
}
},
showAction(){
this.wuliuShow = true;
},
async getWuliuList(){
let {status, message, data} = await newFunApi.wuliuList();
if(status == 200){
uni.hideLoading();
let arr = data.list;
this.wlList = arr.map(item=>{
return { return {
text:item.express_name, orderGoodsId: item.order_goods_id,
id:item.express_id deliveryNum: item.delivery_num
} }
}) })
} let params = {
"orderId": this.orderInfo.order_id,
"form": {
"deliveryMethod": this.wuliu ? 10 : 20,
"packGoodsData": goosList,
"expressId": this.expressId,
"expressNo": this.codeNum,
"syncMpWeixinShipping": 1
}
}
let {
status,
message,
data
} = await newFunApi.sendGoods(params);
if (status == 200) {
uni.hideLoading();
uni.showToast({
title: this.source == 1?'修改成功':'发货成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
}
},
async getWuliuList() {
let {
status,
message,
data
} = await newFunApi.wuliuList();
if (status == 200) {
uni.hideLoading();
if (this.source == 1) {
if (this.expressId) {
data.list.forEach(item => {
if (item.express_id == this.expressId) {
this.expressName = item.express_name || '';
}
});
}
}
this.wlList = data.list
}
},
}, },
}, onLoad(option) {
onLoad(option){ this.orderInfo = JSON.parse(option.item)
console.log(option) this.source = option.source;
this.orderInfo = JSON.parse(option.item) if (this.source == 1) {
console.log(this.orderInfo) this.expressId = this.orderInfo.delivery[0].express_id
this.getWuliuList() this.codeNum = this.orderInfo.delivery[0].express_no
}
this.getWuliuList()
}
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
min-height: 100%; min-height: 100%;
background-color: #F7F8FA; background-color: #F7F8FA;
}
.orderNum{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #707070;
margin:10upx 30upx;
}
.dispatchContent{
margin:20upx 0;
background: #FFFFFF;
// border-radius: 6px 6px 6px 6px;
opacity: 1;
padding:20upx 10upx;
}
.dispatchItem{
display: flex;
align-items: center;
image{
width: 194upx;
height:194upx;
} }
.right{
flex:1;
margin-left:40upx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
.title{
font-size: 28upx; .orderNum {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
} font-size: 28upx;
.subTitle{ font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #707070;
margin: 10upx 0upx;
font-size: 28upx; }
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #7C7C7C;
margin:14upx 0;
} .dispatchContent {
.num{ margin: 20upx 0;
background: #FFFFFF;
// border-radius: 6px 6px 6px 6px;
opacity: 1;
padding: 20upx 30upx;
}
font-size: 28upx; .dispatchItem {
font-family: PingFang SC, PingFang SC; display: flex;
font-weight: 500; align-items: center;
color: #1E1E1E;
image {
width: 194upx;
height: 194upx;
} }
.price{
.right {
flex: 1;
margin-left: 40upx;
position: relative;
display: flex; display: flex;
align-items: center; flex-direction: column;
justify-content: flex-end; justify-content: space-around;
font-size: 32upx;
font-family: PingFang SC, PingFang SC; .title {
font-weight: 500;
color: #F21A1C; font-size: 28upx;
position: absolute; font-family: PingFang SC, PingFang SC;
right:20upx; font-weight: 500;
bottom:0upx; color: #3B3B3B;
z-index:9;
}
.subTitle {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #7C7C7C;
margin: 14upx 0;
}
.num {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #1E1E1E;
}
.price {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
position: absolute;
right: 20upx;
bottom: 0upx;
z-index: 9;
}
} }
} }
}
.scan{ .scan {
display: flex; display: flex;
align-items: center; align-items: center;
image{
width:40upx; image {
height:40upx; width: 40upx;
margin-right:32upx; height: 40upx;
margin-right: 32upx;
}
}
::v-deep .u-field {
padding: 30upx;
}
::v-deep .uni-input-wrapper {
text-align: right;
} }
}
::v-deep .u-field{
padding:30upx;
}
::v-deep .uni-input-wrapper{
text-align: right;
}
.footerBtn{
padding:30upx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.wuliuBtn{
// padding:8upx 46upx;
text-align: center;
height:60upx;
line-height: 60upx;
border:1px solid #F63116;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F83F11;
border-radius:20px;
width:200upx;
}
.btn{
width: 80%;
height: 100upx;
background: #FFAAA4;
border-radius: 6px 6px 6px 6px;
opacity: 1;
line-height: 100upx;
text-align: center;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin:140upx auto;
}
.footerBtn {
padding: 30upx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.wuliuBtn {
// padding:8upx 46upx;
text-align: center;
height: 60upx;
line-height: 60upx;
border: 1px solid #F63116;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F83F11;
border-radius: 20px;
width: 200upx;
}
.goods-fd {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
padding: 0.9375rem;
z-index: 99;
background-color: #fafafa;
box-sizing: border-box;
.btn {
width: 630rpx;
line-height: 88rpx;
background: #F34A40;
border-radius: 88rpx;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
margin: auto;
}
}
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,92 +1,462 @@
<template> <template>
<view> <view class="addressList">
<view class="top"> <view class="addressList-hd">
<u-field <view class="section" style="padding-top: 26upx;">
v-model="name" <u-input class="realAddr" type="textarea" placeholder="请粘贴或输入文本,点击“识别”自动识别姓名、电话和地址" v-model="content">
label="收货人" </u-input>
placeholder="请填写" <view class="btnContent">
> <view class="btn" @click="onIntelligence" :style="{'opacity': content?1:0.6 }">
</u-field> 识别
<u-field </view>
v-model="mobile" </view>
label="手机号" </view>
placeholder="请填写" <view class="item">
> <view class="a">收货人</view>
</u-field> <view class="b">
<u-field @click="showAction" v-model="address" <input v-model="form.name" type="text" placeholder="请输入收货人姓名" />
:disabled="true" label="所属城市" placeholder="请选择" </view>
right-icon="arrow-down-fill" </view>
></u-field> <view class="item">
<u-picker mode="region" v-model="show"></u-picker> <view class="a">手机号</view>
</view> <view class="b">
<view class="bottom"> <input v-model="form.phone" @blur="onPhone" maxlength="13" type="number" placeholder="请输入收货人手机号" />
<view class="title"> </view>
详细地址 </view>
<view class="item">
<view class="a">所属城市</view>
<view class="b">
<picker mode="multiSelector" @change="multiChange" @columnchange="columnChange"
value="{{multiIndex}}" :range="multiArray" range-key="name">
<view class="pbox" :style="{'color': cityInfo.province?'#303030':'gray' }">
{{cityInfo.province?cityInfo.province+cityInfo.city+cityInfo.area:'请选择省市区'}}
<u-icon name="arrow-right"></u-icon>
</view>
</picker>
</view>
</view>
<view class="items">
<view class="a">详细地址</view>
<view class="b">
<input v-model="form.detail" type="text" placeholder="请输入详细地址" />
</view>
</view> </view>
<u-input v-model="realAddr" placeholder="XX街道XX 小区1栋1单元101" type="textarea"></u-input>
</view> </view>
<view class="footerBtn"> <view class="addressList-fd">
保存修改 <view class="btn" @click="editAddress">保存修改</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default{ import * as newFunApi from '@/api/newFun'
data(){ import * as AddressApi from '@/api/address'
return{ export default {
name:'', data() {
mobile:'', return {
show:false, type: 'add',
address:'', checked: false,
} value: "",
}, cityInfo: {
methods:{ province: '请选择省市区',
showAction(){ city: '',
this.show = true; area: ''
},
form: {
name: '',
phone: '',
region: [],
detail: ''
},
content: '',
orderInfo: null,
multiIndex: [0, 0, 0],
multiArray: [],
multiData: []
};
}, },
}, onLoad(optios) {
mounted(){ console.log(JSON.parse(optios.item))
if (optios.item) {
this.orderInfo = JSON.parse(optios.item);
this.cityInfo.province = this.orderInfo.address.region.province;
this.cityInfo.city = this.orderInfo.address.region.city;
this.cityInfo.area = this.orderInfo.address.region.region;
this.form.name = this.orderInfo.address.name;
this.form.phone = this.orderInfo.address.phone;
this.form.region = [{
value: this.orderInfo.address.province_id,
label: this.orderInfo.address.region.province
}, {
value: this.orderInfo.address.city_id,
label: this.orderInfo.address.region.city
}, {
value: this.orderInfo.address.region_id,
label: this.orderInfo.address.region.region
}];
this.form.detail = this.orderInfo.address.detail;
} else {
this.cityInfo.province = ''
}
this.getProvinceAll()
},
methods: {
async getProvinceAll() {
let {
status,
message,
data
} = await AddressApi.province();
if (status == 200) {
this.multiData = data.list;
var multiIndex = this.multiIndex;
this.multiArray = [
this.multiData,
this.multiData[0].children,
this.multiData[0].children[0].children
]
}
},
onPhone(e) {
if (this.validatePhoneNumber(Number(e.detail.value))) {
this.form.phone = Number(e.detail.value)
} else {
this.form.phone = ''
return this.$toast('手机号格式不正确')
}
},
validatePhoneNumber(phone) {
//
var regExp = /^1[3456789]\d{9}$/;
if (regExp.test(phone)) {
return true; //
} else {
return false; //
}
},
//
onIntelligence() {
if (!this.content) {
return this.$toast('请输入识别内容')
}
newFunApi.analysis({
content: this.content
})
.then(res => {
if (res.status) {
let data = res.data.detail
this.cityInfo.province = data.region.province;
this.cityInfo.city = data.region.city;
this.cityInfo.area = data.region.region;
this.form.detail = data.detail
this.form.name = data.name;
this.form.phone = data.phone;
this.form.region = [{
value: data.province_id,
label: data.region.province
}, {
value: data.city_id,
label: data.region.city
}, {
value: data.region_id,
label: data.region.region
}];
uni.showToast({
title: '识别成功',
icon: 'none',
duration: 2000
})
} else {
uni.showToast({
title: '识别失败',
icon: 'none',
duration: 2000
})
}
})
.finally()
},
//
multiChange: function(e) {
this.multiIndex = e.detail.value;
let a_name = this.multiArray[0][e.detail.value[0]].name;
let a_id = this.multiArray[0][e.detail.value[0]].id;
let b_name = this.multiArray[1][e.detail.value[1]].name;
let b_id = this.multiArray[1][e.detail.value[1]].id;
let c_name = this.multiArray[2][e.detail.value[2]].name;
let c_id = this.multiArray[2][e.detail.value[2]].id;
this.cityInfo.province = a_name;
this.cityInfo.city = b_name;
this.cityInfo.area = c_name;
this.form.region = [{
value: a_id,
label: a_name
}, {
value: b_id,
label: b_name
}, {
value: c_id,
label: c_name
}];
},
//
columnChange: function(e) {
var _this = this;
var columnIndex = e.detail.column;
var columnValue = e.detail.value;
_this.multiIndex[columnIndex] = columnValue;
this.multiArray = [
_this.multiData,
_this.multiData[_this.multiIndex[0]].children,
_this.multiData[_this.multiIndex[0]].children[_this.multiIndex[1]].children
]
},
editAddress() {
//
const that = this
if (that.form.name == '') {
return that.$toast('请填写收货人姓名')
}
if (that.form.phone == '') {
return that.$toast('请填写收货人手机号')
}
if (that.form.region == []) {
return that.$toast('请选择所属地市')
}
if (!that.form.detail) {
return that.$toast('请输入详细地址')
}
let params = {
"orderId": this.orderInfo.order_id,
"form": that.form
}
newFunApi.updateAddress(params)
.then(result => {
that.$toast(result.message)
setTimeout(() => {
uni.navigateBack()
}, 1000)
})
.finally(() => {
})
},
}
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ .section {
min-height:100%; background-color: #fff;
background-color: #F7F8FA; padding: 0 18upx;
}
.top{ .realAddr {
background-color: #fff; padding: 10upx 0 !important;
padding:0 40upx;
margin-top:12upx; ::v-deep .uni-input-wrapper {
} text-align: left !important;
.bottom{ }
background-color: #fff;
margin-top:8upx; ::v-deep .uni-input-placeholder {
padding:26upx 40upx; white-space: pre-wrap;
.title{ }
font-size: 28upx; }
font-family: PingFang SC, PingFang SC;
font-weight: 500; .btnContent {
color: #3B3B3B; display: flex;
margin-bottom: 30upx; justify-content: flex-end;
padding-bottom: 30upx;
}
.btn {
width: 120upx;
height: 50upx;
background: #FE483B;
border-radius: 19px 19px 19px 19px;
opacity: 1;
line-height: 50upx;
text-align: center;
font-size: 24upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
.addrDetail {
padding: 0 10upx;
.addrTitle {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #303030;
margin-top: 32upx;
}
}
}
.addressList {
padding: 0 0 20rpx;
overflow: hidden;
&-hd {
background-color: #fff;
padding: 0 25rpx 25rpx;
overflow: hidden;
.item {
padding: 25rpx 10rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F7F7F7;
.b {
font-size: 28rpx;
color: #9D9D9D;
flex: 1;
text-align: right;
input {
width: 100%;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
}
.select {
color: #C7C7C7;
&-on {
color: #212121;
}
}
}
}
.items {
padding: 20rpx 0;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
.b {
font-size: 28rpx;
flex: 1;
text-align: left;
input {
width: 100%;
line-height: 50rpx;
font-size: 28rpx;
color: #212121;
margin-top: 20rpx;
}
}
}
}
&-bd {
background-color: #fff;
padding: 25rpx;
overflow: hidden;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
&-fd {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
padding: 30rpx;
background-color: #fafafa;
box-sizing: border-box;
.btn {
width: 100%;
line-height: 96rpx;
background: #F34A40;
border-radius: 8rpx;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
}
}
}
.list {
// border-bottom: 1rpx solid #eee;
padding: 0 0 0 18rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
position: relative;
.picker {
height: 92rpx;
width: 33%;
.pbox {
width: 100%;
height: 92rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
color: #808080;
view {
width: 100%;
text-align: right;
}
.icon-you {
font-size: 28rpx;
}
}
.pbox_hover {
color: #383838;
}
}
.name {
width: 168rpx;
font-size: 32rpx;
color: #383838;
}
.icon-you {
font-size: 28rpx;
color: #999999;
}
.input {
flex: 1;
height: 100%;
line-height: 92rpx;
color: #9080A1;
}
.textarea {
flex: 1;
height: 100%;
color: #A9A9A9;
}
} }
}
.footerBtn{
width:80%;
height: 100upx;
line-height: 100upx;
background: #FFAAA4;
border-radius: 6px 6px 6px 6px;
opacity: 1;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
text-align: center;
margin:64upx auto;
}
</style> </style>

@ -1,292 +1,216 @@
<template> <template>
<view class="updatePrice"> <view class="updatePrice">
<view class="orderNum"> <view class="orderNum">
订单号{{orderInfo.order_no}} 订单号{{orderInfo.order_no}}
</view> </view>
<view class="dispatchContent" v-for="(item,index) in orderInfo.goods" :key="index"> <view class="dispatchContent" v-for="(item,index) in orderInfo.goods" :key="index">
<view class="dispatchItem"> <view class="dispatchItem">
<image :src="item.goods_image" mode="aspectFill"></image> <image :src="item.goods_image" mode="aspectFill"></image>
<view class="right"> <view class="right">
<view class="title"> <view class="title">
{{item.goods_name}} {{item.goods_name}}
</view> </view>
<view class="subTitle" v-for="p in item.goods_props" :key="p.group"> <view class="subTitle" v-for="p in item.goods_props" :key="p.group">
{{p.group.name}}:{{p.value.name}} {{p.group.name}}:{{p.value.name}}
</view>
<view class="num">
x{{item.total_num}}
</view>
<view class="price">
<text style="font-size: 26upx;">¥</text>
<text>{{item.total_price}}</text>
</view>
</view> </view>
<view class="num"> </view>
x{{item.total_num}} <view class="selectContent" style="padding:36upx 0 10upx 0;" @click="setPrice(item)">
<view class="left">
修改单个商品价格
</view> </view>
<view class="price"> <view class="right">
<text style="font-size: 26upx;">¥</text> <view class="price">
<text>{{item.total_price}}</text> <text style="font-size: 26upx;">¥</text>
<text>{{item.total_price}}</text>
</view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view class="selectContent" @click="setPrice(item)"> <view class="selectContent" style="margin:20upx;border:none">
<view class="left"> <view class="left">
修改单个商品价格 物流费用
</view> </view>
<view class="right"> <view class="right">
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <!-- <text>{{orderInfo.express_price}}</text> -->
<text>{{item.total_price}}</text> <u-input :border-bottom="false" v-model="expressPrice" placeholder="请输入物流费用"></u-input>
<text style="font-size: 26upx;margin-left: 10rpx; color:#3B3B3B"></text>
</view> </view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> </view>
</view> </view>
</view> <view class="goods-fd">
<view class="selectContent" style="margin:20upx;border:none"> <view class="btn" @click="submitPrice">确认修改</view>
<view class="left">
物流费用
</view>
<view class="right">
<view class="price">
<text style="font-size: 26upx;">¥</text>
<!-- <text>{{orderInfo.express_price}}</text> -->
<u-input :border-bottom="false"
v-model="expressPrice"
></u-input>
</view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> </view>
<u-popup v-model="modifyInfo" width="80%" border-radius="10" :closeable="true" mode="bottom">
</view> <view class="modifyInfo">
<view class="filterTitle">
<view class="btn" @click="submitPrice"> 修改价格
保存修改
</view>
<u-popup v-model="modifyInfo" width="80%" border-radius="10" :closeable="true" mode="bottom">
<view class="modifyInfo">
<view class="filterTitle">
修改价格
</view>
<view class="form">
<view class="orginPrice">
<view class="formTitle">
商品价格
</view>
<view class="price">
<text style="font-size: 26upx;">¥</text>
<text>{{selectedGood.total_price}}</text>
</view>
</view> </view>
<view class="orginPrice"> <view class="form">
<view class="formTitle"> <view class="orginPrice">
修改单个商品价格 <view class="formTitle">
商品价格
</view>
<view class="price">
<text style="font-size: 26upx;">¥</text>
<text>{{selectedGood.total_price}}</text>
</view>
</view> </view>
<view class="price"> <view class="orginPrice">
<text style="font-size: 26upx;margin-right:10upx;">¥</text> <view class="formTitle">
<u-input placeholder="请输入" v-model="newPrice"></u-input> 修改单个商品价格
</view>
<view class="price">
<text style="font-size: 26upx;margin-right:10upx;">¥</text>
<u-input placeholder="请输入商品价格" v-model="newPrice"></u-input>
</view>
</view> </view>
</view> </view>
<view class="submit" :style="{'opacity': newPrice?1:0.6 }" @click="submitPrice">
确定
</view>
</view> </view>
<view class="submit" @click="submitPrice"> </u-popup>
确定 </view>
</view>
</view>
</u-popup>
</view>
</template> </template>
<script> <script>
import * as newFunApi from '@/api/newFun' import * as newFunApi from '@/api/newFun'
export default{ export default {
data(){ data() {
return{ return {
modifyInfo:false, modifyInfo: false,
newPrice:null, newPrice: null,
orderInfo:{}, orderInfo: {},
selectedGood:{}, selectedGood: {},
expressPrice:0, expressPrice: 0,
} }
},
methods:{
setPrice(item){
console.log(item)
this.selectedGood = item
this.modifyInfo = true
}, },
async submitPrice(){ methods: {
let params={ setPrice(item) {
"orderId": this.orderInfo.order_no, console.log(item)
"form": { this.selectedGood = item
"order_price": this.newPrice, // this.modifyInfo = true
"express_price": this.expressPrice // },
async submitPrice() {
let params = {
"orderId": this.orderInfo.order_id,
"form": {
"order_price": this.newPrice, //
"express_price": this.expressPrice //
}
} }
let {
status,
message,
data
} = await newFunApi.updatePrice(params);
uni.showToast({
title: '修改价格成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
} }
let {status, message, data} = await newFunApi.updatePrice({ },
onLoad(option) {
this.orderInfo = JSON.parse(option.item)
this.expressPrice = this.orderInfo.express_price || 0
});
uni.navigateBack({delta:1})
} }
},
onLoad(option){
console.log(option)
this.orderInfo = JSON.parse(option.item)
console.log(this.orderInfo)
this.expressPrice = this.orderInfo.express_price
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
min-height: 100%; min-height: 100%;
background-color: #F7F8FA; background-color: #F7F8FA;
}
.orderNum{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #707070;
margin:30upx;
}
.dispatchContent{
margin:20upx;
background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
opacity: 1;
padding:20upx 10upx;
}
.dispatchItem{
display: flex;
align-items: center;
image{
width: 194upx;
height:194upx;
} }
.right{
flex:1;
margin-left:40upx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
.title{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
}
.subTitle{
font-size: 28upx; ::v-deep .u-input {
font-family: PingFang SC, PingFang SC; width: 300rpx !important;
font-weight: 400; }
color: #7C7C7C;
margin:14upx 0;
}
.num{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #1E1E1E;
}
.price{
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
position: absolute;
right:20upx;
bottom:0upx;
z-index:9;
} .updatePrice {
margin-bottom: 200rpx;
} }
}
.selectContent{ .orderNum {
padding:40upx 24upx 34upx 24upx;
background-color: #fff;
border-top:1px solid #EBEBEB;
display: flex;
align-items: center;
justify-content: space-between;
.left{
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 400;
color: #3B3B3B; color: #707070;
margin: 30upx;
} }
.right{
// text{
// font-size: 28upx; .dispatchContent {
// font-family: PingFang SC, PingFang SC; margin: 20upx;
// font-weight: 500; background: #FFFFFF;
// color: #B0B0B0; border-radius: 6px 6px 6px 6px;
opacity: 1;
padding: 28upx;
}
// } .dispatchItem {
display: flex; display: flex;
align-items: center; align-items: center;
.price{
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
margin-right:20upx;
image {
width: 194upx;
height: 194upx;
} }
}
} .right {
.btn{ flex: 1;
width: 80%; margin-left: 40upx;
height: 100upx; position: relative;
background: #FFAAA4;
border-radius: 6px 6px 6px 6px;
opacity: 1;
line-height: 100upx;
text-align: center;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin:166upx auto;
}
.modifyInfo{
padding:32upx;
.filterTitle{
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #303030;
text-align: center;
}
.form{
.orginPrice{
display: flex; display: flex;
align-items: center; flex-direction: column;
padding:36upx 0; justify-content: space-around;
border-bottom: 1px solid #EAEAEA;
.formTitle{
font-size: 32upx; .title {
font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #3B3B3B; color: #3B3B3B;
} }
.price{
.subTitle {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #7C7C7C;
margin: 14upx 0;
}
.num {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #1E1E1E;
}
.price {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
@ -294,30 +218,142 @@ page{
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F21A1C; color: #F21A1C;
margin-right:20upx; position: absolute;
margin-left:20upx; right: 20upx;
bottom: 0upx;
z-index: 9;
} }
} }
} }
.submit{
.selectContent {
padding: 34upx 28upx;
background-color: #fff;
border-top: 1px solid #EBEBEB;
display: flex;
align-items: center;
justify-content: space-between;
.left {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
}
.right {
display: flex;
align-items: center;
.price {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
text-align: right;
margin-right: 10rpx;
::v-deep .uni-input-input {
text-align: right !important;
}
::v-deep .u-input {
width: 200rpx !important;
}
}
}
}
.goods-fd {
width: 100%; width: 100%;
height: 100rpx; position: fixed;
background: #FFAAA4; left: 0;
border-radius: 6px 6px 6px 6px; bottom: 0;
opacity: 1; padding: 0.9375rem;
line-height: 100rpx; z-index: 99;
font-size: 28upx; background-color: #fafafa;
font-family: PingFang SC, PingFang SC; box-sizing: border-box;
font-weight: 500;
color: #FFFFFF; .btn {
margin-top:210upx; width: 630rpx;
text-align: center; line-height: 88rpx;
background: #F34A40;
border-radius: 6px;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
margin: auto;
}
}
.modifyInfo {
padding: 34upx;
.filterTitle {
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #303030;
text-align: center;
}
.form {
.orginPrice {
display: flex;
align-items: center;
padding: 36upx 10rpx;
border-bottom: 1px solid #EAEAEA;
.formTitle {
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
}
.price {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
margin-right: 20upx;
margin-left: 20upx;
}
}
}
.submit {
width: 100%;
height: 100rpx;
background: #F21A1C;
border-radius: 6px 6px 6px 6px;
opacity: 1;
line-height: 100rpx;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 210upx;
text-align: center;
}
}
::v-deep .u-input {
width: 100rpx;
text-align: right;
} }
}
::v-deep .u-input{
width:100rpx;
text-align: right;
}
</style> </style>

@ -94,8 +94,8 @@
</view> </view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty> <u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view> </view>
<u-modal v-model="deleteShow" :show-cancel-button="true" :closable='false' @on-cancel="handleCancel" <u-modal v-model="deleteShow" :show-cancel-button="true" :closable='false' @cancel="deleteShow=false"
@on-ok="handleOk" title="确认删除订单?" confirm-color="#F55349"> @confirm="handleOk" title="确认删除订单?" confirm-color="#F55349">
<view class="slot-content order-modal"> <view class="slot-content order-modal">
<view class="content">删除之后订单无法恢复无法处理您的售后问题 请慎重考虑</view> <view class="content">删除之后订单无法恢复无法处理您的售后问题 请慎重考虑</view>
<view class="desc" @click="toggleImage()"> <view class="desc" @click="toggleImage()">

@ -239,7 +239,6 @@
receiveName: app.receiveState, receiveName: app.receiveState,
applyName: app.applyState, applyName: app.applyState,
} }
console.log(obj)
refundApi.apply(app.orderId, obj) refundApi.apply(app.orderId, obj)
.then(result => { .then(result => {
if (result.status == 200) { if (result.status == 200) {

Loading…
Cancel
Save