|
|
@@ -351,7 +351,7 @@
|
|
|
v-model="payMoney"
|
|
|
:precision="2"
|
|
|
:step="0.1"
|
|
|
- disabled
|
|
|
+ disabled
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="物流代收金额">
|
|
|
@@ -446,7 +446,7 @@
|
|
|
>
|
|
|
<el-table border v-if="refundShowProd!=null" :data="refundShowProd" ref="refundTable" size="small" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
-
|
|
|
+
|
|
|
<el-table-column label="商品编码" width="110" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<p>{{ JSON.parse(scope.row.jsonInfo).barCode }}</p>
|
|
|
@@ -467,10 +467,10 @@
|
|
|
|
|
|
<el-table-column label="退款单价" width="200" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.money"
|
|
|
- :precision="2"
|
|
|
- :step="0.1"
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.money"
|
|
|
+ :precision="2"
|
|
|
+ :step="0.1"
|
|
|
:min="0"
|
|
|
size="mini"
|
|
|
/>
|
|
|
@@ -479,17 +479,17 @@
|
|
|
|
|
|
<el-table-column label="退款数量" width="200" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.num"
|
|
|
- :min="0"
|
|
|
- :max="scope.row.originNum"
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.num"
|
|
|
+ :min="0"
|
|
|
+ :max="scope.row.originNum"
|
|
|
size="mini"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<div style="margin-top:10px;">
|
|
|
合计退款金额:
|
|
|
<span style="color:red; font-weight:bold;">
|
|
|
@@ -509,13 +509,44 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getMsgFollow,sendMsg,msgList,updateMoney,getGoods,getEroOrder,editTuiMoney,updateDelivery,createErpOrder,updateExpress,updateErp, afterSales,sendgoods,logList,listOrder,getExpress,syncExpress, listOrderitem,getOrder, delOrder, addOrder, updateStoreOrder, exportOrder,payment,tuiOrder ,getPrescribe,getOrderUserPhone,returnCost} from "@/api/his/storeOrder";
|
|
|
+import {
|
|
|
+ getMsgFollow,
|
|
|
+ sendMsg,
|
|
|
+ msgList,
|
|
|
+ updateMoney,
|
|
|
+ getGoods,
|
|
|
+ getEroOrder,
|
|
|
+ editTuiMoney,
|
|
|
+ updateDelivery,
|
|
|
+ createErpOrder,
|
|
|
+ updateExpress,
|
|
|
+ updateErp,
|
|
|
+ afterSales,
|
|
|
+ sendgoods,
|
|
|
+ logList,
|
|
|
+ listOrder,
|
|
|
+ getExpress,
|
|
|
+ syncExpress,
|
|
|
+ listOrderitem,
|
|
|
+ getOrder,
|
|
|
+ delOrder,
|
|
|
+ addOrder,
|
|
|
+ updateStoreOrder,
|
|
|
+ exportOrder,
|
|
|
+ payment,
|
|
|
+ tuiOrder,
|
|
|
+ getPrescribe,
|
|
|
+ getOrderUserPhone,
|
|
|
+ returnCost,
|
|
|
+ updateAddressErpFsStoreOrder
|
|
|
+} from "@/api/his/storeOrder";
|
|
|
import inquiryOrderDetails from '../his/inquiryOrderDetails.vue';
|
|
|
import packageOrderDetails from '../his/packageOrderDetails2.vue';
|
|
|
import prescribeDetails from '../his/prescribeDetails.vue';
|
|
|
import msgDetails from '../../components/his/followMsgDetails.vue';
|
|
|
import { getTcmScheduleList } from "@/api/company/schedule";
|
|
|
import {getCitys} from "@/api/store/city";
|
|
|
+
|
|
|
export default {
|
|
|
name: "orderDe",
|
|
|
props:["data"],
|
|
|
@@ -778,7 +809,7 @@ import {getCitys} from "@/api/store/city";
|
|
|
},
|
|
|
handlePhone(){
|
|
|
const orderId = this.item.orderId;
|
|
|
- getOrderUserPhone(orderId).then(response =>{
|
|
|
+ return getOrderUserPhone(orderId).then(response =>{
|
|
|
this.item.userPhone = response.userPhone;
|
|
|
})
|
|
|
},
|
|
|
@@ -879,7 +910,7 @@ import {getCitys} from "@/api/store/city";
|
|
|
payPrice: this.payPrice,
|
|
|
};
|
|
|
|
|
|
- updateStoreOrder(payload).then(response => {
|
|
|
+ updateAddressErpFsStoreOrder(payload).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.edit.open = false;
|
|
|
@@ -897,47 +928,49 @@ import {getCitys} from "@/api/store/city";
|
|
|
});
|
|
|
},
|
|
|
editOrder() {
|
|
|
- this.edit.open = true;
|
|
|
- this.editForm.orderId = this.item.orderId;
|
|
|
- this.editForm.remark = this.item.remark;
|
|
|
-
|
|
|
- // 先设置其他同步的字段
|
|
|
- this.editForm.userPhone = this.item.userPhone != null ? this.item.userPhone.toString() : "";
|
|
|
- this.editForm.status = this.item.status != null ? this.item.status.toString() : "";
|
|
|
- this.editForm.deliveryType = this.item.deliveryType;
|
|
|
- this.editForm.deliveryStatus = this.item.deliveryStatus;
|
|
|
- this.payMoney= this.item.payMoney;
|
|
|
- this.payRemain = this.item.payRemain;
|
|
|
- this.payPrice= this.item.payPrice;
|
|
|
- // 等城市数据加载后再解析地址
|
|
|
- const currentAddress = (this.item.userAddress || "").toString().trim();
|
|
|
- this.getCitys().then(() => {
|
|
|
- if (!currentAddress) {
|
|
|
- this.cityIds = [];
|
|
|
- this.editForm.userAddress = "";
|
|
|
- return;
|
|
|
- }
|
|
|
+ this.handlePhone().then((res)=>{
|
|
|
+ this.edit.open = true;
|
|
|
+ this.editForm.orderId = this.item.orderId;
|
|
|
+ this.editForm.remark = this.item.remark;
|
|
|
+
|
|
|
+ // 先设置其他同步的字段
|
|
|
+ this.editForm.userPhone = this.item.userPhone != null ? this.item.userPhone.toString() : "";
|
|
|
+ this.editForm.status = this.item.status != null ? this.item.status.toString() : "";
|
|
|
+ this.editForm.deliveryType = this.item.deliveryType;
|
|
|
+ this.editForm.deliveryStatus = this.item.deliveryStatus;
|
|
|
+ this.payMoney= this.item.payMoney;
|
|
|
+ this.payRemain = this.item.payRemain;
|
|
|
+ this.payPrice= this.item.payPrice;
|
|
|
+ // 等城市数据加载后再解析地址
|
|
|
+ const currentAddress = (this.item.userAddress || "").toString().trim();
|
|
|
+ this.getCitys().then(() => {
|
|
|
+ if (!currentAddress) {
|
|
|
+ this.cityIds = [];
|
|
|
+ this.editForm.userAddress = "";
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- // 假设格式为:省 市 区 详细地址(空格分隔)
|
|
|
- const parts = currentAddress.split(/\s+/);
|
|
|
- const detail = parts.pop() || ""; // 最后一段作为详细地址
|
|
|
- const provLabel = parts[0];
|
|
|
- const cityLabel = parts[1];
|
|
|
- const areaLabel = parts[2];
|
|
|
+ // 假设格式为:省 市 区 详细地址(空格分隔)
|
|
|
+ const parts = currentAddress.split(/\s+/);
|
|
|
+ const detail = parts.pop() || ""; // 最后一段作为详细地址
|
|
|
+ const provLabel = parts[0];
|
|
|
+ const cityLabel = parts[1];
|
|
|
+ const areaLabel = parts[2];
|
|
|
|
|
|
- const province = this.citys.find(p => p.label === provLabel);
|
|
|
- const city = province?.children?.find(c => c.label === cityLabel);
|
|
|
- const area = city?.children?.find(a => a.label === areaLabel);
|
|
|
+ const province = this.citys.find(p => p.label === provLabel);
|
|
|
+ const city = province?.children?.find(c => c.label === cityLabel);
|
|
|
+ const area = city?.children?.find(a => a.label === areaLabel);
|
|
|
|
|
|
- if (province && city && area) {
|
|
|
- this.cityIds = [province.value, city.value, area.value];
|
|
|
- } else {
|
|
|
- console.warn("未匹配到完整省市区:", { provLabel, cityLabel, areaLabel });
|
|
|
- this.cityIds = [];
|
|
|
- }
|
|
|
- // 把详细地址写回到输入框(只保留详细地址,不含省市区)
|
|
|
- this.editForm.userAddress = detail;
|
|
|
- });
|
|
|
+ if (province && city && area) {
|
|
|
+ this.cityIds = [province.value, city.value, area.value];
|
|
|
+ } else {
|
|
|
+ console.warn("未匹配到完整省市区:", { provLabel, cityLabel, areaLabel });
|
|
|
+ this.cityIds = [];
|
|
|
+ }
|
|
|
+ // 把详细地址写回到输入框(只保留详细地址,不含省市区)
|
|
|
+ this.editForm.userAddress = detail;
|
|
|
+ });
|
|
|
+ })
|
|
|
},
|
|
|
updateExpress(){
|
|
|
var that=this;
|
|
|
@@ -1067,7 +1100,7 @@ import {getCitys} from "@/api/store/city";
|
|
|
} else {
|
|
|
this.refund(); //正常退款
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
submitRefundForm(){
|
|
|
if(this.refundForm.refundAmount<=0){
|