瀏覽代碼

提交一下

1
mo 2 年之前
父節點
當前提交
4a5ccdd3b7

+ 1 - 1
src/api/login.js

@@ -20,7 +20,7 @@ export function getInfo() {
 export function logout() {
   return request({
     url: '/api-auth/exit',
-    method: 'get',
+    method: 'post',
     requestType: 'form'
   })
 }

+ 66 - 52
src/views/oms/order/deliverOrderList.vue

@@ -1,37 +1,44 @@
-<template> 
+<template>
+   
   <div class="app-container">
     <el-card class="operate-container" shadow="never">
       <i class="el-icon-tickets"></i>
       <span>发货列表</span>
     </el-card>
     <div class="table-container">
-      <el-table ref="deliverOrderTable"
-                style="width: 100%;"
-                :data="list" border>
+      <el-table ref="deliverOrderTable" style="width: 100%" :data="list" border>
         <el-table-column label="订单编号" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.orderSn}}</template>
+          <template slot-scope="scope">{{ scope.row.orderSn }}</template>
         </el-table-column>
         <el-table-column label="收货人" width="180" align="center">
-          <template slot-scope="scope">{{scope.row.receiverName}}</template>
+          <template slot-scope="scope">{{ scope.row.receiverName }}</template>
         </el-table-column>
         <el-table-column label="手机号码" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.receiverPhone}}</template>
+          <template slot-scope="scope">{{ scope.row.receiverPhone }}</template>
         </el-table-column>
         <el-table-column label="邮政编码" width="160" align="center">
-          <template slot-scope="scope">{{scope.row.receiverPostCode}}</template>
+          <template slot-scope="scope">{{
+            scope.row.receiverPostCode
+          }}</template>
         </el-table-column>
         <el-table-column label="收货地址" align="center">
-          <template slot-scope="scope">{{scope.row.address}}</template>
+          <template slot-scope="scope">
+            {{ scope.row.address }}
+          </template>
         </el-table-column>
         <el-table-column label="配送方式" width="160" align="center">
           <template slot-scope="scope">
-            <el-select placeholder="请选择物流公司"
-                       v-model="scope.row.deliveryCompany"
-                       size="small">
-              <el-option v-for="item in companyOptions"
-                         :key="item"
-                         :label="item"
-                         :value="item">
+            <el-select
+              placeholder="请选择物流公司"
+              v-model="scope.row.deliveryCompany"
+              size="small"
+            >
+              <el-option
+                v-for="item in companyOptions"
+                :key="item"
+                :label="item"
+                :value="item"
+              >
               </el-option>
             </el-select>
           </template>
@@ -42,7 +49,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <div style="margin-top: 15px;text-align: center">
+      <div style="margin-top: 15px; text-align: center">
         <el-button @click="cancel">取消</el-button>
         <el-button @click="confirm" type="primary">确定</el-button>
       </div>
@@ -50,49 +57,56 @@
   </div>
 </template>
 <script>
-  import {deliveryOrder} from '@/api/order'
-  const defaultLogisticsCompanies=["顺丰快递","圆通快递","中通快递","韵达快递"];
-  export default {
-    name: 'deliverOrderList',
-    data() {
-      return {
-        list:[],
-        companyOptions:defaultLogisticsCompanies
-      }
-    },
-    created(){
-      this.list= this.$route.query.list;
-      //当list不为数组时转换为数组
-      if(this.list instanceof Array===false){
-        this.list=[];
-      }
+import { deliveryOrder } from "@/api/order";
+const defaultLogisticsCompanies = [
+  "顺丰快递",
+  "圆通快递",
+  "中通快递",
+  "韵达快递",
+];
+export default {
+  name: "deliverOrderList",
+  data() {
+    return {
+      list: [],
+      companyOptions: defaultLogisticsCompanies,
+    };
+  },
+  created() {
+    this.list = this.$route.query.list;
+    //当list不为数组时转换为数组
+    if (this.list instanceof Array === false) {
+      this.list = [];
+    }
+  },
+  methods: {
+    cancel() {
+      this.$router.back();
     },
-    methods:{
-      cancel(){
-        this.$router.back();
-      },
-      confirm(){
-        this.$confirm('是否要进行发货操作?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          deliveryOrder(this.list).then(response=>{
+    confirm() {
+      this.$confirm("是否要进行发货操作?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          deliveryOrder(this.list).then((response) => {
             this.$router.back();
             this.$message({
-              type: 'success',
-              message: '发货成功!'
+              type: "success",
+              message: "发货成功!",
             });
           });
-        }).catch(() => {
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消发货'
+            type: "info",
+            message: "已取消发货",
           });
         });
-      }
-    }
-  }
+    },
+  },
+};
 </script>
 <style></style>
 

+ 39 - 8
src/views/oms/order/orderDetail.vue

@@ -161,9 +161,19 @@
           <el-col :span="6" class="table-cell">{{
             order.receiverPostCode
           }}</el-col>
-          <el-col :span="6" class="table-cell">{{
-            order | formatAddress
-          }}</el-col>
+          <el-col :span="6" class="table-cell">
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="formatAddresss(order)"
+              placement="top"
+            >
+            <p class="address">{{  formatAddresss(order)}}</p>
+
+            </el-tooltip>
+
+            </el-col
+          >
         </el-row>
       </div>
       <div style="margin-top: 20px">
@@ -517,7 +527,7 @@ export default {
       messageDialogVisible: false,
       message: { title: null, content: null },
       closeDialogVisible: false,
-      closeInfo: { note: '', id: '' },
+      closeInfo: { note: "", id: "" },
       markOrderDialogVisible: false,
       markInfo: { note: null },
       logisticsDialogVisible: false,
@@ -626,6 +636,16 @@ export default {
     },
   },
   methods: {
+    formatAddresss(order) {
+      let str = order.receiverProvince;
+      if (order.receiverCity != null) {
+        str += "  " + order.receiverCity;
+      }
+      str += "  " + order.receiverRegion;
+      str += "  " + order.receiverDetailAddress;
+      console.log('str',str)
+      return str;
+    },
     onSelectRegion(data) {
       this.receiverInfo.receiverProvince = data.province.value;
       this.receiverInfo.receiverCity = data.city.value;
@@ -730,7 +750,7 @@ export default {
     },
     showCloseOrderDialog() {
       this.closeDialogVisible = true;
-      this.closeInfo.note = '';
+      this.closeInfo.note = "";
       this.closeInfo.id = this.id;
     },
     handleCloseOrder() {
@@ -761,7 +781,7 @@ export default {
     showMarkOrderDialog() {
       this.markOrderDialogVisible = true;
       this.markInfo.id = this.id;
-      this.markInfo.note = '';
+      this.markInfo.note = "";
     },
     handleMarkOrder() {
       this.$confirm("是否要备注订单?", "提示", {
@@ -773,7 +793,11 @@ export default {
         // params.append("id", this.markInfo.id);
         // params.append("note", this.markInfo.note);
         // params.append("status", this.order.status);
-        let obj = {id:this.markInfo.id,note:this.markInfo.note,status:this.order.status}
+        let obj = {
+          id: this.markInfo.id,
+          note: this.markInfo.note,
+          status: this.order.status,
+        };
         updateOrderNote(obj).then((response) => {
           this.markOrderDialogVisible = false;
           this.$message({
@@ -794,7 +818,7 @@ export default {
       }).then(() => {
         // let params = new URLSearchParams();
         // params.append("ids", [this.id]);
-        let obj = {ids:this.id}
+        let obj = { ids: this.id };
         deleteOrder(obj).then((response) => {
           this.$message({
             message: "删除成功!",
@@ -857,6 +881,13 @@ export default {
   font-size: 14px;
   color: #303133;
 }
+
+.address {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  margin: 0;
+}
 </style>
 
 

+ 2 - 2
src/views/pms/product/components/ProductAttrDetail.vue

@@ -176,7 +176,7 @@
           </div>
         </el-card>
       </el-form-item>
-      <el-form-item label="商品参数:">
+      <!-- <el-form-item label="商品参数:">
         <el-card shadow="never" class="cardBg">
           <div
             v-for="(item, index) in selectProductParam"
@@ -205,7 +205,7 @@
             ></el-input>
           </div>
         </el-card>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="商品相册:">
         <multi-upload
           v-model="selectProductPics"

+ 2 - 2
src/views/pms/product/components/ProductSaleDetail.vue

@@ -27,13 +27,13 @@
         </el-switch>
       </el-form-item>
       <el-form-item label="商品推荐:">
-        <span style="margin-right: 10px">新品</span>
+        <!-- <span style="margin-right: 10px">新品</span>
         <el-switch
           v-model="value.newStatus"
           :disabled="!isEdit"
           :active-value="1"
           :inactive-value="0">
-        </el-switch>
+        </el-switch> -->
         <span style="margin-left: 10px;margin-right: 10px">推荐</span>
         <el-switch
           v-model="value.recommandStatus"