Browse Source

Revert 益兽园撤回

xdd 2 days ago
parent
commit
10011c8f03

+ 0 - 7
src/api/his/storeOrder.js

@@ -164,13 +164,6 @@ export function updateStoreOrder(data) {
     data: data
     data: data
   })
   })
 }
 }
-export function updateAddressErpFsStoreOrder(data) {
-  return request({
-    url: '/his/storeOrder/updateAddressErpFsStoreOrder',
-    method: 'put',
-    data: data
-  })
-}
 
 
 export function updateDelivery(data) {
 export function updateDelivery(data) {
   return request({
   return request({

+ 1 - 7
src/api/hisStore/storeOrder.js

@@ -103,13 +103,7 @@ export function updateStoreOrder(data) {
     data: data
     data: data
   })
   })
 }
 }
-export function updateAddressErpFsStoreOrder(data) {
-  return request({
-    url: '/store/store/storeOrder/updateAddressErpFsStoreOrder',
-    method: 'put',
-    data: data
-  })
-}
+
 // 修改物流编号
 // 修改物流编号
 export function updateDeliveryId(data) {
 export function updateDeliveryId(data) {
   return request({
   return request({

+ 53 - 86
src/views/components/his/storeOrderDetails.vue

@@ -351,7 +351,7 @@
                       v-model="payMoney"
                       v-model="payMoney"
                       :precision="2"
                       :precision="2"
                       :step="0.1"
                       :step="0.1"
-                      disabled
+                      disabled   
                     />
                     />
                   </el-form-item>
                   </el-form-item>
                   <el-form-item label="物流代收金额">
                   <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 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 type="selection" width="55" align="center" />
-
+                  
                   <el-table-column label="商品编码" width="110" align="center">
                   <el-table-column label="商品编码" width="110" align="center">
                     <template slot-scope="scope">
                     <template slot-scope="scope">
                       <p>{{ JSON.parse(scope.row.jsonInfo).barCode }}</p>
                       <p>{{ JSON.parse(scope.row.jsonInfo).barCode }}</p>
@@ -467,10 +467,10 @@
 
 
                   <el-table-column label="退款单价" width="200" align="center">
                   <el-table-column label="退款单价" width="200" align="center">
                     <template slot-scope="scope">
                     <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"
                         :min="0"
                         size="mini"
                         size="mini"
                       />
                       />
@@ -479,17 +479,17 @@
 
 
                   <el-table-column label="退款数量" width="200" align="center">
                   <el-table-column label="退款数量" width="200" align="center">
                     <template slot-scope="scope">
                     <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"
                         size="mini"
                       />
                       />
                     </template>
                     </template>
                   </el-table-column>
                   </el-table-column>
 
 
                 </el-table>
                 </el-table>
-
+               
                 <div style="margin-top:10px;">
                 <div style="margin-top:10px;">
                   合计退款金额:
                   合计退款金额:
                   <span style="color:red; font-weight:bold;">
                   <span style="color:red; font-weight:bold;">
@@ -509,44 +509,13 @@
 </template>
 </template>
 
 
 <script>
 <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,
-  updateAddressErpFsStoreOrder
-} 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} from "@/api/his/storeOrder";
 import inquiryOrderDetails from '../his/inquiryOrderDetails.vue';
 import inquiryOrderDetails from '../his/inquiryOrderDetails.vue';
 import packageOrderDetails from '../his/packageOrderDetails2.vue';
 import packageOrderDetails from '../his/packageOrderDetails2.vue';
 import prescribeDetails from '../his/prescribeDetails.vue';
 import prescribeDetails from '../his/prescribeDetails.vue';
 import msgDetails from '../../components/his/followMsgDetails.vue';
 import msgDetails from '../../components/his/followMsgDetails.vue';
 import { getTcmScheduleList } from "@/api/company/schedule";
 import { getTcmScheduleList } from "@/api/company/schedule";
 import {getCitys} from "@/api/store/city";
 import {getCitys} from "@/api/store/city";
-
   export default {
   export default {
     name: "orderDe",
     name: "orderDe",
     props:["data"],
     props:["data"],
@@ -809,7 +778,7 @@ import {getCitys} from "@/api/store/city";
       },
       },
       handlePhone(){
       handlePhone(){
         const orderId = this.item.orderId;
         const orderId = this.item.orderId;
-        return getOrderUserPhone(orderId).then(response =>{
+        getOrderUserPhone(orderId).then(response =>{
             this.item.userPhone = response.userPhone;
             this.item.userPhone = response.userPhone;
         })
         })
       },
       },
@@ -910,7 +879,7 @@ import {getCitys} from "@/api/store/city";
           payPrice: this.payPrice,
           payPrice: this.payPrice,
         };
         };
 
 
-        updateAddressErpFsStoreOrder(payload).then(response => {
+        updateStoreOrder(payload).then(response => {
           if (response.code === 200) {
           if (response.code === 200) {
             this.msgSuccess("操作成功");
             this.msgSuccess("操作成功");
             this.edit.open = false;
             this.edit.open = false;
@@ -928,49 +897,47 @@ import {getCitys} from "@/api/store/city";
         });
         });
     },
     },
     editOrder() {
     editOrder() {
-      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;
-          }
+      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(){
     updateExpress(){
       var that=this;
       var that=this;
@@ -1100,7 +1067,7 @@ import {getCitys} from "@/api/store/city";
         } else {
         } else {
           this.refund(); //正常退款
           this.refund(); //正常退款
         }
         }
-
+        
       },
       },
       submitRefundForm(){
       submitRefundForm(){
         if(this.refundForm.refundAmount<=0){
         if(this.refundForm.refundAmount<=0){

+ 11 - 41
src/views/hisStore/components/productOrder.vue

@@ -495,29 +495,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,
-  updateAddressErpFsStoreOrder
-} 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} from "@/api/hisStore/storeOrder";
 import { getTcmScheduleList } from "@/api/company/schedule";
 import { getTcmScheduleList } from "@/api/company/schedule";
 export default {
 export default {
   name: "order",
   name: "order",
@@ -617,7 +595,7 @@ export default {
   methods: {
   methods: {
     handleAddress(){
     handleAddress(){
         const id = this.order.id;
         const id = this.order.id;
-        return getStoreOrderAddress(id).then(response =>{
+        getStoreOrderAddress(id).then(response =>{
             this.order.userAddress = response.address;
             this.order.userAddress = response.address;
         })
         })
       },
       },
@@ -699,7 +677,7 @@ export default {
     submitEditForm(){
     submitEditForm(){
         this.$refs["editForm"].validate(valid => {
         this.$refs["editForm"].validate(valid => {
         if (valid) {
         if (valid) {
-          updateAddressErpFsStoreOrder(this.editForm).then(response => {
+          updateStoreOrder(this.editForm).then(response => {
             if (response.code === 200) {
             if (response.code === 200) {
               this.msgSuccess("操作成功");
               this.msgSuccess("操作成功");
               this.edit.open = false;
               this.edit.open = false;
@@ -808,24 +786,16 @@ export default {
           this.getOrder(this.order.id);
           this.getOrder(this.order.id);
         }).catch(function() {});
         }).catch(function() {});
     },
     },
-    async editOrder(){
-      try {
-        // 先获取地址信息
-        const response = await getStoreOrderAddress(this.order.id);
-        this.order.userAddress = response.address;
-
-        // 等待地址获取完成后打开编辑对话框
-        this.edit.open = true;
-        this.editForm.id = this.order.id;
-        this.editForm.mark = this.order.mark;
-        this.editForm.orderType = this.order.orderType.toString();
+    editOrder(){
+        this.edit.open=true;
+        this.editForm.id=this.order.id;
+        this.editForm.mark=this.order.mark
+        this.editForm.orderType=this.order.orderType.toString();
         this.editForm.status = this.order.status.toString();
         this.editForm.status = this.order.status.toString();
-        this.editForm.userAddress = response.address;
+        this.editForm.userAddress = this.order.userAddress.toString();
         this.editForm.scheduleId = this.order.scheduleId;
         this.editForm.scheduleId = this.order.scheduleId;
-      } catch (error) {
-        console.error('获取地址失败:', error);
-        this.msgError('获取地址信息失败');
-      }
+        // this.editForm.extendOrderId = this.order.extendOrderId.toString();
+
     },
     },
     //推送管易按钮
     //推送管易按钮
     addErpOrder(){
     addErpOrder(){