Jelajahi Sumber

feat: 销售退货、销售单

zh 2 tahun lalu
induk
melakukan
36cae86314

+ 362 - 0
src/components/LogisticsTabs/index.vue

@@ -0,0 +1,362 @@
+<template>
+  <div class="logistics">
+    <div style="margin: 20px 0">
+      <el-radio-group v-model="curTarget" size="small">
+        <template v-for="(item, index) in tabsList">
+          <el-radio-button v-if="item.show" :key="index" :label="item.value">{{ item.label }}</el-radio-button>
+        </template>
+      </el-radio-group>
+    </div>
+    <el-card v-if="curTarget === 1 && tabsList[curTarget-1].show">
+      <div slot="header">
+        <span>物流信息</span>
+      </div>
+      <slot name="header" />
+      <div>
+        <el-timeline v-if="logisticsDetail.length" :reverse="false">
+          <el-timeline-item
+            v-for="(item, index) in logisticsDetail"
+            :key="index"
+            placement="top"
+            type="success"
+            :timestamp="item.time"
+          >
+            <el-row :gutter="20">
+              <el-col class="logistics-title"> {{ item.status }} </el-col>
+              <el-col>
+                <div class="flex">
+                  <div>{{ item.context }}</div>
+                  <!-- <div>{{ item.createTime }}</div> -->
+                </div>
+              </el-col>
+            </el-row>
+          </el-timeline-item>
+        </el-timeline>
+        <div v-else class="tip">暂无物流信息</div>
+      </div>
+    </el-card>
+    <el-card v-if="curTarget === 2 && tabsList[curTarget-1].show">
+      <div slot="header">
+        <span>物流费用</span>
+      </div>
+      <div>
+        <zj-table
+          :table-attributes="defaultTableAttributes"
+          :is-drop="true"
+          :columns="formLogistics"
+          :table-data="logisticsData"
+        />
+      </div>
+    </el-card>
+    <el-card v-if="curTarget === 3 && tabsList[curTarget-1].show">
+      <div slot="header">
+        <span>出库条码</span>
+      </div>
+      <div>
+        <zj-table
+          :table-attributes="defaultTableAttributes"
+          :is-drop="true"
+          :columns="formOutbound"
+          :table-data="outboundData"
+        />
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { getListCostBillV2 } from '@/api/logisticsBill'
+import { getListOrderTrack } from '@/api/supply/pickup'
+import { getListCodeV2 } from '@/api/barcode'
+
+export default {
+  props: {
+    invoiceId: {
+      type: String,
+      default: null
+    },
+    detailsId: {
+      type: String,
+      default: null
+    }
+  },
+  data() {
+    return {
+      tabsList: [
+        {
+          label: '物流状态',
+          value: 1,
+          show: true
+        },
+        {
+          label: '物流费用',
+          value: 2,
+          show: true
+        },
+        {
+          label: '出库条码',
+          value: 3,
+          show: true
+        }
+      ],
+      curTarget: 1,
+      defaultTableAttributes: {
+        border: true,
+        headerCellClassName: 'headerRowColor',
+        size: 'mini',
+        'summary-method': this.$getSummaries,
+        'show-summary': true
+      },
+      logisticsData: [],
+      outboundData: [],
+      logisticsDetail: []
+    }
+  },
+  computed: {
+    formLogistics() {
+      return [
+        {
+          columnAttributes: {
+            label: '序号',
+            prop: 'materialName',
+            type: 'index'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '调拨单号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '嘉贤单据号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '存货编码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料代码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品名称',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '规格型号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '单价',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '数量',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物流费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '仓储费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '合计费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '对账人',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '对账日期',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算人',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算日期',
+            prop: 'materialName'
+          }
+        }
+      ]
+    },
+    formOutbound() {
+      return [
+        {
+          columnAttributes: {
+            label: '序号',
+            prop: 'materialName',
+            type: 'index'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '条码状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '签收状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '上墙状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料代码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品名称',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '规格型号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '内外机',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料条码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '出库条形码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '签收日期',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '上增日期',
+            prop: 'materialName'
+          }
+        }
+      ]
+    }
+  },
+  mounted() {
+    this.getListCodeV2()
+    this.getListCostBillV2()
+  },
+  methods: {
+    getListOrderTrack() {
+      getListOrderTrack({ orderId: this.invoiceId }).then(res => {
+        this.logisticsDetail = res.data
+      })
+    },
+    getListCostBillV2() {
+      getListCostBillV2({
+        pageNum: 1,
+        pageSize: -1,
+        params: [
+          {
+            param: 'order_code',
+            compare: '=',
+            value: this.invoiceId
+          }
+        ]
+      }).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['orderHasSendQty', 'subsidyCoefficient', 'unloadUpstairsCoefficient', 'coefficient']
+          item.sums2 = ['cost', 'unitPrice', 'totalCost', 'allowanceCost']
+        })
+        this.logisticsData = res.data.records
+      })
+    },
+    getListCodeV2() {
+      getListCodeV2({
+        pageNum: 1,
+        pageSize: -1,
+        params: [
+          {
+            param: 'order_number',
+            compare: '=',
+            value: this.invoiceId
+          }
+        ]
+      }).then(res => {
+        this.outboundData = res.data.records
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-timeline-item__tail {
+  border-left: 2px solid #67c23a;
+}
+::v-deep .el-form-item__content {
+  line-height: 33px;
+}
+.logistics-title {
+  padding: 10px;
+}
+.logistics {
+  margin: 20px 0;
+}
+</style>

+ 3 - 3
src/components/SalesHeader/SalesHeader.vue

@@ -150,9 +150,9 @@ export default {
         pickTime: [{
           required: true, message: '请输入配送日期', trigger: 'change'
         }],
-        stockType: [{
-          required: true, message: '请输入发货仓库名称', trigger: 'change'
-        }],
+        // stockType: [{
+        //   required: true, message: '请输入发货仓库名称', trigger: 'change'
+        // }],
         userName: [{
           required: true, message: '请输入用户名称', trigger: 'change'
         }],

+ 6 - 12
src/components/SalesTable/SalesTable.vue

@@ -3,8 +3,7 @@
     <slot name="title">
       <h5>销售订单明细</h5>
     </slot>
-    <slot name="bts">
-    </slot>
+    <slot name="bts" />
     <div class="table">
       <el-table
         :data="dataList"
@@ -19,15 +18,12 @@
           style="padding-left: 10px;"
           type="selection"
           width="55"
-
-        >
-        </el-table-column>
+        />
         <el-table-column
           v-if="isIndex"
           type="index"
           width="50"
-        >
-        </el-table-column>
+        />
         <el-table-column
           v-for="(item,index) in column"
           :key="index"
@@ -50,15 +46,13 @@
               />
             </template>
             <template v-if="item.isCustom">
-                <slot name="custom" v-bind:item="{row,$index}">
-                </slot>
+              <slot name="custom" :item="{row,$index}" />
             </template>
           </template>
         </el-table-column>
         <el-table-column v-if="isOperation" fixed="right" label="操作" min-width="100" align="center">
           <template v-slot="{row,$index}">
-            <slot name="operation" v-bind:item="{row,$index}">
-            </slot>
+            <slot name="operation" :item="{row,$index}" />
           </template>
         </el-table-column>
       </el-table>
@@ -140,7 +134,7 @@ export default {
     },
     handleSelectionAllChange(data) {
       this.$emit('handleSelection', data)
-    },
+    }
 
   }
 }

+ 15 - 60
src/views/sales_control/sales_management/components/customer_sales_details.vue

@@ -1,68 +1,25 @@
 <template>
   <div>
-    <el-page-header @back="handleBack" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <el-page-header content="详情" style=" padding: 20px 20px 0 20px;" @back="handleBack" />
     <sales-header ref="header" />
-    <sales-table :dataList="dataList" :column="column" @handleSelection="handleSelection">
+    <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
       <template #events>
-        <el-button v-if="details.status == 1 && isFront !== false" type="primary" size="mini" @click="handleInform(2)"
-          >通知发货</el-button
-        >
+        <el-button
+          v-if="details.status == 1 && isFront !== false"
+          type="primary"
+          size="mini"
+          @click="handleInform(2)"
+        >通知发货</el-button>
         <el-button v-if="details.status == 2 && isFront !== false" size="mini">撤销发货</el-button>
         <el-button v-if="isFront === false && details.status == 1" type="primary" size="mini" @click="handleSignIn(4)">
           签收
         </el-button>
       </template>
-
-      <!--      <template v-slot:operation="{item:{row,$index}}">-->
-      <!--        <el-popconfirm-->
-      <!--          style="margin-left: 10px"-->
-      <!--          title="删除?"-->
-      <!--          @onConfirm="handleDel(row,$index)"-->
-      <!--        >-->
-      <!--          <el-button slot="reference" type="text" size="mini">删除</el-button>-->
-      <!--        </el-popconfirm>-->
-      <!--      </template>-->
-      <!--      <div>-->
-      <!--        <h5>物流信息</h5>-->
-      <!--        <div class="diy-table-1">-->
-      <!--          <el-row>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="24" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--          </el-row>-->
-      <!--        </div>-->
-      <!--        <el-timeline :reverse="reverse">-->
-      <!--          <el-timeline-item-->
-      <!--            v-for="(activity, index) in activities"-->
-      <!--            :key="index"-->
-      <!--            :timestamp="activity.timestamp"-->
-      <!--            :color="activity.color"-->
-      <!--          >-->
-      <!--            {{ activity.content }}-->
-      <!--          </el-timeline-item>-->
-      <!--        </el-timeline>-->
-      <!--      </div>-->
     </sales-table>
+    <LogisticsTabs />
     <sales-dialog
-      :dialogVisible="dialogVisible"
-      :customerNumber="customerNumber"
+      :dialog-visible="dialogVisible"
+      :customer-number="customerNumber"
       :func="getDialogList"
       @confirm="confirm"
     />
@@ -75,13 +32,14 @@ import SalesHeader from '@/components/SalesHeader/SalesHeader'
 import SalesTable from '@/components/SalesTable/SalesTable'
 import { addFrontOrder, getFrontOrderDetail, sbumitFrontOrder, signIn } from '@/api/sales'
 import { getcustomerFrontList } from '@/api/stock'
-
+import LogisticsTabs from '@/components/LogisticsTabs'
 export default {
   name: 'WarehouseForm',
   components: {
     SalesHeader,
     SalesTable,
-    SalesDialog
+    SalesDialog,
+    LogisticsTabs
   },
   props: ['detailsId', 'pageType'],
   data() {
@@ -217,7 +175,6 @@ export default {
       sbumitFrontOrder({ id: this.$refs.header.screenForm.id, status }).then(res => {
         this.$successMsg('发货通知')
         this.handleBack()
-
       })
     },
     handleSignIn(status) {
@@ -229,16 +186,14 @@ export default {
         signIn({ id: this.$refs.header.screenForm.id, status }).then(res => {
           this.$successMsg('签收')
           this.handleBack()
-
         })
       }).catch(err => {
 
       })
-
     },
     handleBack() {
       this.$emit('close')
-    },
+    }
 
   }
 }

+ 20 - 18
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -1,30 +1,33 @@
 <template>
   <div>
-    <el-page-header @back="handleBack" :content="detailsId?'编辑':'新增'" style=" padding: 20px 20px 0 20px;"
-    ></el-page-header>
+    <el-page-header
+      :content="detailsId?'编辑':'新增'"
+      style=" padding: 20px 20px 0 20px;"
+      @back="handleBack"
+    />
     <sales-header ref="header" />
     <sales-table
-      :dataList="dataList"
+      :data-list="dataList"
       :column="column"
-      :isOperation="detailsId ? false : true"
-      isSelection
+      :is-operation="detailsId ? false : true"
+      is-selection
       @handleSelection="handleSelection"
     >
       <template #bts>
         <div v-if="!detailsId">
-          <el-button type="primary" v-if="dis" size="mini" @click="dialogVisible = true">添加 </el-button>
-          <el-button type="danger" v-if="dis" size="mini" @click="delChange">删除 </el-button>
+          <el-button v-if="dis" type="primary" size="mini" @click="dialogVisible = true">添加 </el-button>
+          <el-button v-if="dis" type="danger" size="mini" @click="delChange">删除 </el-button>
         </div>
       </template>
       <template #events>
         <div v-if="!detailsId">
           <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
-          <el-button size="mini" @click="onReset" v-if="dis">重置 </el-button>
-          <el-button size="mini" v-if="isFront !== false" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
+          <el-button v-if="dis" size="mini" @click="onReset">重置 </el-button>
+          <el-button v-if="isFront !== false" size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
         </div>
         <div v-else>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
-          <el-button size="mini" v-if="!detailsId" @click="onReset">重置</el-button>
+          <el-button v-if="!detailsId" size="mini" @click="onReset">重置</el-button>
         </div>
       </template>
 
@@ -36,8 +39,8 @@
     </sales-table>
     <sales-dialog
       ref="dia"
-      :dialogVisible="dialogVisible"
-      :customerNumber="customerNumber"
+      :dialog-visible="dialogVisible"
+      :customer-number="customerNumber"
       :func="getDialogList"
       @confirm="confirm"
     />
@@ -213,7 +216,7 @@ export default {
       //   })
       // }
     },
-    //去掉相同数据
+    // 去掉相同数据
     resArr(arr1, arr2) {
       return arr1.filter(v => arr2.every(val => val.id != v.id))
     },
@@ -309,10 +312,10 @@ export default {
                   type: 'text'
                 }
               ]
-              if (this.isFront ===false){
+              if (this.isFront === false) {
                 this.handleBack()
-              }              this.salesId = res.data
-              this.$set(this.$refs.header.screenForm,'id',res.data)
+              } this.salesId = res.data
+              this.$set(this.$refs.header.screenForm, 'id', res.data)
               this.$forceUpdate()
             })
           } else {
@@ -331,11 +334,10 @@ export default {
     onReset() {
       Object.assign(this.$data, this.$options.data())
       Object.assign(this.$refs.header.$data, this.$refs.header.$options.data())
-
     },
     handleBack() {
       this.$emit('close')
-    },
+    }
 
   }
 }

+ 9 - 16
src/views/sales_control/sales_management/components/return_sales_details.vue

@@ -1,26 +1,17 @@
 <template>
   <div>
-    <el-page-header @back="handleBack" content="详情" style="padding: 20px 20px 0 20px"></el-page-header>
+    <el-page-header content="详情" style="padding: 20px 20px 0 20px" @back="handleBack" />
     <return-sales-header ref="header" :details="details" />
-    <sales-table :dataList="dataList" :column="column" @handleSelection="handleSelection">
+    <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
       <template #events>
         <el-button v-if="details.status == 1" type="primary" size="mini" @click="handleInform(2)">通知退货</el-button>
         <el-button v-if="details.status == 2" disabled size="mini">撤销退货</el-button>
       </template>
-
-      <!--      <template v-slot:operation="{item:{row,$index}}">-->
-      <!--        <el-popconfirm-->
-      <!--          style="margin-left: 10px"-->
-      <!--          title="删除?"-->
-      <!--          @onConfirm="handleDel(row,$index)"-->
-      <!--        >-->
-      <!--          <el-button slot="reference" type="text" size="mini">删除</el-button>-->
-      <!--        </el-popconfirm>-->
-      <!--      </template>-->
     </sales-table>
+    <LogisticsTabs />
     <sales-dialog
-      :dialogVisible="dialogVisible"
-      :customerNumber="customerNumber"
+      :dialog-visible="dialogVisible"
+      :customer-number="customerNumber"
       :func="getDialogList"
       @confirm="confirm"
     />
@@ -33,13 +24,15 @@ import ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
 import SalesTable from '@/components/SalesTable/SalesTable'
 import { addFrontOrder, detailRefund, sbumitFrontOrder, sendRefund } from '@/api/sales'
 import { getcustomerFrontList } from '@/api/stock'
+import LogisticsTabs from '@/components/LogisticsTabs'
 
 export default {
   name: 'WarehouseForm',
   components: {
     ReturnSalesHeader,
     SalesTable,
-    SalesDialog
+    SalesDialog,
+    LogisticsTabs
   },
   props: ['detailsId', 'pageType'],
   data() {
@@ -151,7 +144,7 @@ export default {
     },
     handleBack() {
       this.$emit('close')
-    },
+    }
   }
 }
 </script>

+ 17 - 51
src/views/stock_control/sales_management/components/customer_sales_details.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <el-page-header @back="handleBack" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <el-page-header content="详情" style=" padding: 20px 20px 0 20px;" @back="handleBack" />
     <sales-header ref="header" />
-    <sales-table :dataList="dataList" :column="column"   @handleSelection="handleSelection">
+    <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
       <!--      <template #bts>-->
       <!--        <div>-->
       <!--          <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>-->
@@ -23,8 +23,8 @@
         </div>
       </template>
       <template v-slot:custom="{item:{row,$index}}">
-        <el-radio label="1" v-model="row.flag">增加</el-radio>
-        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+        <el-radio v-model="row.flag" label="1">增加</el-radio>
+        <el-radio v-model="row.flag" label="-1">减少</el-radio>
       </template>
       <template v-slot:operation="{item:{row,$index}}">
         <el-popconfirm
@@ -35,46 +35,13 @@
           <el-button slot="reference" type="text" size="mini">删除</el-button>
         </el-popconfirm>
       </template>
-      <!--      <div>-->
-      <!--        <h5>物流信息</h5>-->
-      <!--        <div class="diy-table-1">-->
-      <!--          <el-row>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="6" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--            <el-col :span="24" class="item">-->
-      <!--              <div class="label">销售政策编号</div>-->
-      <!--              <div class="value">2222</div>-->
-      <!--            </el-col>-->
-      <!--          </el-row>-->
-      <!--        </div>-->
-      <!--        <el-timeline :reverse="reverse">-->
-      <!--          <el-timeline-item-->
-      <!--            v-for="(activity, index) in activities"-->
-      <!--            :key="index"-->
-      <!--            :timestamp="activity.timestamp"-->
-      <!--            :color="activity.color"-->
-      <!--          >-->
-      <!--            {{ activity.content }}-->
-      <!--          </el-timeline-item>-->
-      <!--        </el-timeline>-->
-      <!--      </div>-->
     </sales-table>
-    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
-                  @confirm="confirm"
+    <LogisticsTabs />
+    <sales-dialog
+      :dialog-visible="dialogVisible"
+      :customer-number="customerNumber"
+      :func="getDialogList"
+      @confirm="confirm"
     />
   </div>
 </template>
@@ -85,15 +52,17 @@ import SalesHeader from '@/components/SalesHeader/SalesHeader'
 import SalesTable from '@/components/SalesTable/SalesTable'
 import { addFrontOrder, getFrontOrderDetail, sbumitFrontOrder } from '@/api/sales'
 import { getcustomerFrontList } from '@/api/stock'
+import LogisticsTabs from '@/components/LogisticsTabs'
 
 export default {
   name: 'WarehouseForm',
   components: {
     SalesHeader,
     SalesTable,
-    SalesDialog
+    SalesDialog,
+    LogisticsTabs
   },
-  props: ['detailsId','pageType'],
+  props: ['detailsId', 'pageType'],
   data() {
     return {
       dialogVisible: false,
@@ -126,7 +95,7 @@ export default {
         {
           prop: 'qty',
           label: '数量',
-          width: '180',
+          width: '180'
         },
         {
           prop: 'volume',
@@ -141,7 +110,7 @@ export default {
         {
           prop: 'notes',
           label: '备注',
-          width: '180',
+          width: '180'
 
         }
       ],
@@ -172,7 +141,6 @@ export default {
         this.$refs.header.screenForm.areaId = res.data.area
         this.$refs.header.screenForm.streetId = res.data.street
         this.$refs.header.screenForm.stockType = res.data.stockType == 1 ? '前置仓' : '商家仓'
-
       })
     }
   },
@@ -187,7 +155,6 @@ export default {
       this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
       this.customerNumber = this.dataList[0].customerNumber
       this.dialogVisible = false
-
     },
     handleDel(item, index) {
       this.dataList.splice(index, 1)
@@ -236,11 +203,10 @@ export default {
         this.$successMsg('退货通知')
       })
     },
-     handleBack() {
+    handleBack() {
       this.$emit('close')
     }
 
-
   }
 }
 </script>

+ 19 - 15
src/views/stock_control/sales_management/components/return_sales_details.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
-    <el-page-header @back="handleBack" content="详情" style=" padding: 20px 20px 0 20px;"></el-page-header>
+    <el-page-header content="详情" style=" padding: 20px 20px 0 20px;" @back="handleBack" />
     <return-sales-header ref="header" :details="details" />
-    <sales-table :dataList="dataList" :column="column"   @handleSelection="handleSelection">
+    <sales-table :data-list="dataList" :column="column" @handleSelection="handleSelection">
       <template #bts>
         <div>
           <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
@@ -17,8 +17,8 @@
       </template>
 
       <template v-slot:custom="{item:{row,$index}}">
-        <el-radio label="1" v-model="row.flag">增加</el-radio>
-        <el-radio label="-1" v-model="row.flag">减少</el-radio>
+        <el-radio v-model="row.flag" label="1">增加</el-radio>
+        <el-radio v-model="row.flag" label="-1">减少</el-radio>
       </template>
       <template v-slot:operation="{item:{row,$index}}">
         <el-popconfirm
@@ -30,8 +30,12 @@
         </el-popconfirm>
       </template>
     </sales-table>
-    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
-                  @confirm="confirm"
+    <LogisticsTabs />
+    <sales-dialog
+      :dialog-visible="dialogVisible"
+      :customer-number="customerNumber"
+      :func="getDialogList"
+      @confirm="confirm"
     />
   </div>
 </template>
@@ -42,15 +46,17 @@ import ReturnSalesHeader from '@/components/ReturnSalesHeader/ReturnSalesHeader'
 import SalesTable from '@/components/SalesTable/SalesTable'
 import { addFrontOrder, detailRefund, sbumitFrontOrder, sendRefund } from '@/api/sales'
 import { getcustomerFrontList } from '@/api/stock'
+import LogisticsTabs from '@/components/LogisticsTabs'
 
 export default {
   name: 'WarehouseForm',
   components: {
     ReturnSalesHeader,
     SalesTable,
-    SalesDialog
+    SalesDialog,
+    LogisticsTabs
   },
-  props: ['detailsId','pageType'],
+  props: ['detailsId', 'pageType'],
   data() {
     return {
       dialogVisible: false,
@@ -83,7 +89,7 @@ export default {
         {
           prop: 'qty',
           label: '数量',
-          width: '180',
+          width: '180'
         },
         {
           prop: 'volume',
@@ -98,7 +104,7 @@ export default {
         {
           prop: 'notes',
           label: '备注',
-          width: '180',
+          width: '180'
 
         }
       ]
@@ -123,7 +129,6 @@ export default {
       this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
       this.customerNumber = this.dataList[0].customerNumber
       this.dialogVisible = false
-
     },
     handleDel(item, index) {
       this.dataList.splice(index, 1)
@@ -145,7 +150,6 @@ export default {
       console.log(33)
       sendRefund({ id: this.details.id, status }).then(res => {
         this.$successMsg('退货通知')
-
       })
     },
     handelSubmit() {
@@ -159,13 +163,13 @@ export default {
       }
       addFrontOrder(params).then(res => {
         this.$successMsg('新增成功')
-      this.handleBack()
+        this.handleBack()
         this.$forceUpdate()
       })
     },
-    handleBack(){
+    handleBack() {
       this.$emit('close')
-    },
+    }
 
   }
 }