|
@@ -16,6 +16,7 @@
|
|
|
</span>
|
|
</span>
|
|
|
<div class="operate-button-container" >
|
|
<div class="operate-button-container" >
|
|
|
<el-button size="mini" @click="editOrder()" v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
|
|
<el-button size="mini" @click="editOrder()" v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
|
|
|
|
|
+ <el-button size="mini" @click="editOfflinePay()" v-hasPermi="['store:storeOrder:edit']" >修改线下支付金额</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="operate-button-container" v-hasPermi="['store:storeOrder:finishOrder']" v-if="order.status===2">
|
|
<div class="operate-button-container" v-hasPermi="['store:storeOrder:finishOrder']" v-if="order.status===2">
|
|
|
<el-button size="mini" @click="finishOrder()" >确认收货</el-button>
|
|
<el-button size="mini" @click="finishOrder()" >确认收货</el-button>
|
|
@@ -208,11 +209,16 @@
|
|
|
<p>¥{{(scope.row.originalPrice ? scope.row.originalPrice.toFixed(2) : JSON.parse(scope.row.jsonInfo).price.toFixed(2))}}</p>
|
|
<p>¥{{(scope.row.originalPrice ? scope.row.originalPrice.toFixed(2) : JSON.parse(scope.row.jsonInfo).price.toFixed(2))}}</p>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="单价" width="240" align="center">
|
|
|
|
|
|
|
+ <el-table-column label="线上单价" width="200" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
|
|
<p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="线下单价" width="200" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <p>¥{{(scope.row.offlinePrice || 0).toFixed(2)}}</p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="规格" width="240" align="center">
|
|
<el-table-column label="规格" width="240" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{JSON.parse(scope.row.jsonInfo).sku}}
|
|
{{JSON.parse(scope.row.jsonInfo).sku}}
|
|
@@ -230,14 +236,14 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="小计" align="center">
|
|
<el-table-column label="小计" align="center">
|
|
|
<template slot-scope="scope" >
|
|
<template slot-scope="scope" >
|
|
|
- ¥{{scope.row.num*JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}
|
|
|
|
|
|
|
+ ¥{{((JSON.parse(scope.row.jsonInfo).price + (scope.row.offlinePrice || 0)) * scope.row.num).toFixed(2)}}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div style="float: right;margin: 20px" v-if="order!=null">
|
|
<div style="float: right;margin: 20px" v-if="order!=null">
|
|
|
<span style="color: #909399;text-decoration: line-through;">原价合计:¥{{originalTotal.toFixed(2)}}</span>
|
|
<span style="color: #909399;text-decoration: line-through;">原价合计:¥{{originalTotal.toFixed(2)}}</span>
|
|
|
|
|
|
|
|
- 合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
|
|
|
|
|
|
|
+ 合计:<span class="color-danger">¥{{newTotal.toFixed(2)}}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin: 60px 0px 20px 0px">
|
|
<div style="margin: 60px 0px 20px 0px">
|
|
|
<span class="font-small">费用信息</span>
|
|
<span class="font-small">费用信息</span>
|
|
@@ -399,19 +405,7 @@
|
|
|
<el-form-item label="订单手机号" prop="userPhone" >
|
|
<el-form-item label="订单手机号" prop="userPhone" >
|
|
|
<el-input v-model="editForm.userPhone" placeholder="请输入手机号" style="width:200px"/>
|
|
<el-input v-model="editForm.userPhone" placeholder="请输入手机号" style="width:200px"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 线下支付金额 -->
|
|
|
|
|
- <el-form-item label="线下支付金额" prop="offlinePayAmount" >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.number="editForm.offlinePayAmount"
|
|
|
|
|
- type="number"
|
|
|
|
|
- step="0.01"
|
|
|
|
|
- placeholder="请输入"
|
|
|
|
|
- :min="0"
|
|
|
|
|
- @blur="formatAmount"
|
|
|
|
|
- style="width:200px"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="详情地址" prop="userAddress" >
|
|
|
|
|
|
|
+ <el-form-item label="详情地址" prop="userAddress" >
|
|
|
<el-input v-model="editForm.userAddress" placeholder="请输入" />
|
|
<el-input v-model="editForm.userAddress" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="erp单号" prop="extendOrderId" >
|
|
<!-- <el-form-item label="erp单号" prop="extendOrderId" >
|
|
@@ -426,6 +420,57 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog title="修改线下支付金额" :visible.sync="offlinePayDialog.open" width="900px" append-to-body>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ border
|
|
|
|
|
+ v-if="items!=null && items.length>0"
|
|
|
|
|
+ :data="items"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ style="width: 100%" >
|
|
|
|
|
+ <el-table-column label="商品图片" width="100" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 50px">
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="商品名称" min-width="200" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="线下支付单价" width="180" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ v-model="scope.row.offlinePrice"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ :precision="2"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ style="width:140px"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="数量" width="100" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ {{scope.row.num}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="小计" width="150" align="center">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span class="color-danger">
|
|
|
|
|
+ ¥{{((scope.row.offlinePrice || 0) * scope.row.num).toFixed(2)}}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <div style="text-align: right; margin-top: 15px; margin-bottom: 10px; clear: both" v-if="items!=null && items.length>0">
|
|
|
|
|
+ 线下合计:<span class="color-danger">¥{{offlineTotal.toFixed(2)}}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="submitOfflinePayForm" :loading="offlineSaving">保 存</el-button>
|
|
|
|
|
+ <el-button @click="offlinePayDialog.open = false">取 消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
|
|
<el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
|
|
|
<el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="120px">
|
|
<el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="120px">
|
|
|
<!-- <div v-hasPermi="['store:storeOrder:updateErpOrder']" style="margin-bottom: 20px;" >
|
|
<!-- <div v-hasPermi="['store:storeOrder:updateErpOrder']" style="margin-bottom: 20px;" >
|
|
@@ -529,7 +574,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {auditPayRemain,addTuiMoney,syncExpress,updateExpress,getEroOrder,refundOrderMoney, editTuiMoney,getExpress,finishOrder,listStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportStoreOrder,updateDeliveryId, createErpOrder,updateErp,getStoreOrderAddress,getStoreOrderPhone} from "@/api/hisStore/storeOrder";
|
|
|
|
|
|
|
+import {auditPayRemain,addTuiMoney,syncExpress,updateExpress,getEroOrder,refundOrderMoney, editTuiMoney,getExpress,finishOrder,listStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportStoreOrder,updateDeliveryId, createErpOrder,updateErp,getStoreOrderAddress,getStoreOrderPhone, saveOfflinePayAmount} from "@/api/hisStore/storeOrder";
|
|
|
import { getTcmScheduleList } from "@/api/company/schedule";
|
|
import { getTcmScheduleList } from "@/api/company/schedule";
|
|
|
export default {
|
|
export default {
|
|
|
name: "order",
|
|
name: "order",
|
|
@@ -574,6 +619,10 @@ export default {
|
|
|
offlinePayAmount: 0.00,
|
|
offlinePayAmount: 0.00,
|
|
|
orderMedium:null,
|
|
orderMedium:null,
|
|
|
},
|
|
},
|
|
|
|
|
+ offlinePayDialog:{
|
|
|
|
|
+ title:"修改线下支付金额",
|
|
|
|
|
+ open:false,
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
editDyRules:{
|
|
editDyRules:{
|
|
|
deliverySn: [
|
|
deliverySn: [
|
|
@@ -607,6 +656,7 @@ export default {
|
|
|
tuiMoneyLogs:[],
|
|
tuiMoneyLogs:[],
|
|
|
erpOrder:null,
|
|
erpOrder:null,
|
|
|
auditLogs: [],
|
|
auditLogs: [],
|
|
|
|
|
+ offlineSaving: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -644,14 +694,22 @@ export default {
|
|
|
const price = item.originalPrice != null ? item.originalPrice : info.price;
|
|
const price = item.originalPrice != null ? item.originalPrice : info.price;
|
|
|
return sum + (price * item.num);
|
|
return sum + (price * item.num);
|
|
|
}, 0);
|
|
}, 0);
|
|
|
|
|
+ },
|
|
|
|
|
+ offlineTotal() {
|
|
|
|
|
+ if (!this.items) return 0;
|
|
|
|
|
+ return this.items.reduce((sum, item) => {
|
|
|
|
|
+ return sum + ((item.offlinePrice || 0) * item.num);
|
|
|
|
|
+ }, 0);
|
|
|
|
|
+ },
|
|
|
|
|
+ newTotal() {
|
|
|
|
|
+ if (!this.items) return 0;
|
|
|
|
|
+ return this.items.reduce((sum, item) => {
|
|
|
|
|
+ const info = JSON.parse(item.jsonInfo);
|
|
|
|
|
+ return sum + ((info.price + (item.offlinePrice || 0)) * item.num);
|
|
|
|
|
+ }, 0);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- formatAmount() {
|
|
|
|
|
- if (typeof this.editForm.offlinePayAmount === 'number') {
|
|
|
|
|
- this.editForm.offlinePayAmount = parseFloat(this.editForm.offlinePayAmount.toFixed(2));
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
handleAddress(){
|
|
handleAddress(){
|
|
|
const id = this.order.id;
|
|
const id = this.order.id;
|
|
|
getStoreOrderAddress(id).then(response =>{
|
|
getStoreOrderAddress(id).then(response =>{
|
|
@@ -862,6 +920,33 @@ export default {
|
|
|
// this.editForm.extendOrderId = this.order.extendOrderId.toString();
|
|
// this.editForm.extendOrderId = this.order.extendOrderId.toString();
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ editOfflinePay(){
|
|
|
|
|
+ this.offlinePayDialog.open = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ submitOfflinePayForm(){
|
|
|
|
|
+ const list = this.items.map(item => ({
|
|
|
|
|
+ itemId: item.itemId,
|
|
|
|
|
+ offlinePrice: item.offlinePrice || 0
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.offlineSaving = true;
|
|
|
|
|
+ saveOfflinePayAmount({
|
|
|
|
|
+ orderId: this.order.id,
|
|
|
|
|
+ offlinePayAmount: this.offlineTotal,
|
|
|
|
|
+ items: list
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.msgSuccess('保存成功');
|
|
|
|
|
+ this.offlinePayDialog.open = false;
|
|
|
|
|
+ this.getOrder(this.order.id);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.msgError(response.msg || '保存失败');
|
|
|
|
|
+ }
|
|
|
|
|
+ this.offlineSaving = false;
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.msgError('保存失败');
|
|
|
|
|
+ this.offlineSaving = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
//推送管易按钮
|
|
//推送管易按钮
|
|
|
addErpOrder(){
|
|
addErpOrder(){
|
|
|
var that=this;
|
|
var that=this;
|