소스 검색

修复订单管理bug

hwb0 3 년 전
부모
커밋
e60d9b9509

+ 7 - 0
src/views/order/channel/components/SendGoods.vue

@@ -204,6 +204,13 @@ export default {
 
     // 选中盲票组序列号
     handleSelect(item) {
+      let index = this.list.findIndex(ele=>{
+        return item.pkgId == ele.pkgId
+      })
+      if(index != -1){
+        this.msgError("当前票包已选!");
+        return
+      }
       this.list.push(item);
     },
 

+ 2 - 1
src/views/order/channel/index.vue

@@ -133,7 +133,8 @@
           <div>{{ $numberFormat(row.payAmt) }}</div>
         </template>
       </el-table-column>
-      <el-table-column label="经销商/收货地址" prop="addr" min-width="120">
+      <el-table-column label="经销商" prop="channelName" min-width="80" />
+      <el-table-column label="收货人/收货地址" prop="addr" min-width="120">
         <template slot-scope="{ row }">
           <div>
             {{

+ 13 - 2
src/views/order/deliver/components/SendGoods.vue

@@ -124,6 +124,8 @@ export default {
       },
       // 快递下拉列表
       companyData: [],
+      // 选中sp
+      goodsList: [],
       // 选中商品ID
       ids: [],
       rules: {
@@ -154,7 +156,7 @@ export default {
 
     // 选中商品
     handleSelectionGoods(e) {
-      this.ids = e.map((item) => item.itemId);
+      this.goodsList = e
     },
 
     // 确认
@@ -175,11 +177,20 @@ export default {
 
     // 提交
     submitForm(form) {
-      if (!this.ids.length) {
+      if (!this.goodsList.length) {
         this.msgError("请选择发货的商品");
         this.loading = false;
         return;
       }
+      let index = this.goodsList.findIndex(item=>{
+        return item.deliveryFlowId
+      })
+      if(index != -1){
+        this.msgError(`${ this.goodsList[index].title }已发货!`);
+        this.loading = false;
+        return
+      }
+      this.ids = this.goodsList.map((item) => item.itemId);
       let data = {
         ...form,
         orderId: this.goodsInfo.orderId,

+ 1 - 1
src/views/order/deliver/detail.vue

@@ -77,7 +77,7 @@
       </div>
     </div>
     <!-- 物流信息 -->
-    <div class="info" v-if="status.value === 2">
+    <div class="info" v-if="status.value === 2 || status.value === 4">
       <div class="info-title">物流信息</div>
       <div class="info-item">
         <div

+ 3 - 2
src/views/order/deliver/index.vue

@@ -140,7 +140,8 @@
           <div>{{ $numberFormat(row.payAmt) }}</div>
         </template>
       </el-table-column>
-      <el-table-column label="用户/收货地址" prop="addr" min-width="120">
+      <el-table-column label="用户昵称" prop="nickName" min-width="80" />
+      <el-table-column label="收货人/收货地址" prop="addr" min-width="120">
         <template slot-scope="{ row }">
           <div>
             {{
@@ -169,7 +170,7 @@
               >查看详情</el-button
             >
             <el-button
-              v-if="row.status.value === 1"
+              v-if="row.status.value === 1 || row.status.value === 4"
               v-hasPermi="['order:deliver:ship']"
               type="text"
               @click="toGoods(row)"