chenrui 4 年之前
父節點
當前提交
716c9a464b

+ 7 - 0
src/api/allocWarehouse.js

@@ -101,6 +101,13 @@ export const allocWarehouseFind = params => {
     method: 'post'
   })
 }
+//  仓库调拨单 详情  根据sn查
+export const allocWarehouseDetailSn = (params) => {
+  return axios({
+    url: `/allocWarehouse/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
 // 提交
 export const allocWarehouseSubmit = params => {
   return axios({

+ 0 - 77
src/api/purchaseRerurn.js

@@ -1,77 +0,0 @@
-import { axios } from '@/utils/request'
-
-//  采购退货 列表  分页
-export const purchaseRerurnList = (params) => {
-  const url = `/purchaseRerurn/queryPage/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 导出
-export const purchaseRerurnExport = (params) => {
-  return axios({
-    url: '/purchaseRerurn/export',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 审核
-export const purchaseRerurnAudit = (params) => {
-  return axios({
-    url: '/purchaseRerurn/audit',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 收款
-export const purchaseRerurnPay = (params) => {
-  return axios({
-    url: '/purchaseRerurn/pay',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 打印
-export const purchaseRerurnPrint = (params) => {
-  return axios({
-    url: '/purchaseRerurn/print',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 打印预览
-export const purchaseRerurnprintPreview = (params) => {
-  return axios({
-    url: '/purchaseRerurn/printPreview',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 提交
-export const purchaseRerurnSubmit = (params) => {
-  return axios({
-    url: '/purchaseRerurn/submit',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 保存
-export const purchaseRerurnSave = (params) => {
-  return axios({
-    url: '/purchaseRerurn/save',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货 删除
-export const purchaseRerurnDel = (params) => {
-  return axios({
-    url: `/purchaseRerurn/delete/${params.id}`,
-    data: params,
-    method: 'post'
-  })
-}

+ 0 - 29
src/api/purchaseRerurnDetail.js

@@ -1,29 +0,0 @@
-import { axios } from '@/utils/request'
-
-//  采购退货详情 列表  分页
-export const purchaseRerurnDetailList = (params) => {
-  const url = `/purchaseRerurnDetail/queryPage/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货详情 保存
-export const purchaseRerurnDetailSave = (params) => {
-  return axios({
-    url: '/purchaseRerurnDetail/save',
-    data: params,
-    method: 'post'
-  })
-}
-//  采购退货详情 删除
-export const purchaseRerurnDetailDel = (params) => {
-  return axios({
-    url: `/purchaseRerurnDetail/delete/${params.id}`,
-    data: params,
-    method: 'post'
-  })
-}

+ 21 - 0
src/api/purchaseReturn.js

@@ -26,6 +26,13 @@ export const purchaseReturnDel = (params) => {
     method: 'get'
   })
 }
+//  采购退货 详情 删除
+export const purchaseReturnDelAll = (params) => {
+  return axios({
+    url: `/purchaseReturn/detail/deleteAll/${params.purchaseReturnSn}`,
+    method: 'get'
+  })
+}
 //  采购退货  提交
 export const purchaseReturnSubmit = (params) => {
   return axios({
@@ -34,6 +41,20 @@ export const purchaseReturnSubmit = (params) => {
     method: 'post'
   })
 }
+//  采购退货 详情
+export const purchaseReturnDetail = (params) => {
+  return axios({
+    url: `/purchaseReturn/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购退货 详情  根据sn查
+export const purchaseReturnDetailSn = (params) => {
+  return axios({
+    url: `/purchaseReturn/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
 //  采购退货 详情 选择产品 列表  分页
 export const purchaseReturnPurchaseBillDetailList = (params) => {
   const url = `/purchaseReturn/detail/queryPurchaseBillDetailPage/${params.pageNo}/${params.pageSize}`

+ 13 - 0
src/api/stockOut.js

@@ -0,0 +1,13 @@
+import { axios } from '@/utils/request'
+
+//  出库 列表  有分页
+export const stockOutList = (params) => {
+  const url = `/stockOut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 7 - 0
src/api/storeCallOut.js

@@ -49,6 +49,13 @@ export const storeCallOutDetail = (params) => {
     method: 'get'
   })
 }
+//  店内调出 详情  根据sn查
+export const storeCallOutDetailSn = (params) => {
+  return axios({
+    url: `/storeCallOut/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
 //  店内调出  提交
 export const storeCallOutSubmit = (params) => {
   return axios({

+ 7 - 0
src/api/urgent.js

@@ -43,3 +43,10 @@ export const urgentDetail = (params) => {
     method: 'get'
   })
 }
+//  急件 详情  根据sn查
+export const urgentDetailSn = (params) => {
+  return axios({
+    url: `/urgent/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}

+ 4 - 4
src/config/router.config.js

@@ -177,7 +177,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'urgentItemsOffsetDetail',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/urgentItemsOffset/detail.vue'),
                 meta: {
@@ -458,7 +458,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'purchaseReturnDetail',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/detail.vue'),
                 meta: {
@@ -529,7 +529,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'warehouseAllocationDetail',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/warehouseAllocation/detail.vue'),
                 meta: {
@@ -703,7 +703,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'storeTransferOutDetail',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/detail.vue'),
                 meta: {

+ 2 - 2
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -48,7 +48,7 @@
 <script>
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount } from '@/api/storeCallOut'
+import { storeCallOutDetailList, storeCallOutDetailCount, storeCallOutDetailSn } from '@/api/storeCallOut'
 export default {
   components: { STable, VSelect },
   data () {
@@ -88,7 +88,7 @@ export default {
     },
     // 基本信息
     getDetail () {
-      storeCallOutDetail({ id: this.$route.params.id }).then(res => {
+      storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
         } else {

+ 10 - 5
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -164,7 +164,7 @@
                 :min="1"
                 :max="999999"
                 placeholder="请输入"
-                @blur="e => outQtyChange(e.target.value, record)"
+                @blur="e => outQtyBlur(e.target.value, record)"
                 style="width: 100%;" />
             </template>
             <!-- 操作 -->
@@ -318,7 +318,7 @@ export default {
       }
       if (isEdit) { // 编辑
         // 清空数量时,值应保持未清空前的值,因数量不可为空
-        if (!row.outQty) {
+        if (!row.outQty || row.outQty == row.outQtyBackups) {
           row.outQty = row.outQtyBackups
           return
         }
@@ -326,6 +326,7 @@ export default {
       storeCallOutDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
+          this.$refs.table.refresh()
           this.getChooseProductList()
         }
       })
@@ -351,6 +352,7 @@ export default {
           storeCallOutDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
+              _this.$refs.table.refresh()
               _this.getChooseProductList()
             }
           })
@@ -436,9 +438,12 @@ export default {
         }
       })
     },
-    // 已选产品 调出数量  change
-    outQtyChange (val, record) {
-      this.handleAdd(record, 'edit')
+    // 已选产品 调出数量  blur
+    outQtyBlur (val, record) {
+      //  光标移出,值发生改变再调用编辑接口
+      if (val != record.outQtyBackups) {
+        this.handleAdd(record, 'edit')
+      }
     },
     //  产品分类  change
     changeProductType (val, opt) {

+ 1 - 1
src/views/allocationManagement/storeTransferOut/list.vue

@@ -250,7 +250,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.id}/${row.storeCallOutSn}` })
+      this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.storeCallOutSn}` })
     },
     //  新增/编辑
     handleEdit (row) {

+ 3 - 5
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -71,11 +71,9 @@
 </template>
 
 <script>
-import { allocWarehouseDetailList } from '@/api/allocWarehouse'
 import { STable, VSelect } from '@/components'
 import {
-  productQuery,
-  allocWarehouseFind,
+  allocWarehouseDetailSn,
   allocWarehouseDetailTotal,
   allocWarehouseDetailQuery
 } from '@/api/allocWarehouse.js'
@@ -87,7 +85,7 @@ export default {
       queryParam: {
         allocationWarehouseSn: this.$route.params.sn
       },
-	  id: this.$route.params.id, // 单据id
+      id: this.$route.params.id, // 单据id
       productTotalCost: 0, // 总成本
       productTotalQty: 0, // 总数量
       productTotalCategory: 0, // 总款项
@@ -132,7 +130,7 @@ export default {
     },
     // 查询基础信息
     getHouse () {
-      allocWarehouseFind({ id: this.id }).then(res => {
+      allocWarehouseDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.warehouse = res.data
           this.queryParam.outWarehouseSn = res.data.outWarehouseSn

+ 6 - 3
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -65,8 +65,12 @@
       :rowKey="record => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1435 }"
+      :scroll="{ x: 1480 }"
       bordered>
+      <!-- 单号 -->
+      <template slot="allocationWarehouseNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
+      </template>
       <!-- 状态 -->
       <template slot="state" slot-scope="text, record">
         {{ text }}
@@ -91,7 +95,6 @@
           id="warehouseAllocationList-edit-btn">
           编辑
         </a-button>
-        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="warehouseAllocationList-detail-btn">详情</a-button>
         <a-button
           v-if="record.stateDictValue != '已完结'"
           size="small"
@@ -230,7 +233,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.id}/${row.allocationWarehouseSn}` })
+      this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.allocationWarehouseSn}` })
     },
     //  新增/编辑
     handleEdit (row) {

+ 0 - 8
src/views/bulkManagement/bulkWarehousingOrder/detail.vue

@@ -56,14 +56,6 @@
             :data="loadData"
             :scroll="{ x: 1280 }"
             bordered>
-            <!-- 采购数量 -->
-            <template slot="purchaseNum" slot-scope="text, record">
-              <span>{{ record.purchaseNum }}</span>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{ record.outOfStockNum }}</span>
-            </template>
           </s-table>
         </a-collapse-panel>
       </a-collapse>

+ 13 - 8
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -175,7 +175,7 @@
                   :min="1"
                   :max="999999"
                   placeholder="请输入"
-                  @blur="e => putCostChange(e.target.value, record)"
+                  @blur="e => putCostBlur(e.target.value, record)"
                   style="width: 100%;" />
               </template>
               <!-- 数量 -->
@@ -187,7 +187,7 @@
                   :min="1"
                   :max="999999"
                   placeholder="请输入"
-                  @blur="e => putQtyChange(e.target.value, record)"
+                  @blur="e => putQtyBlur(e.target.value, record)"
                   style="width: 100%;" />
               </template>
               <!-- 仓库 -->
@@ -559,13 +559,18 @@ export default {
       this.loadData[index].warehouseLocationSn = undefined
       this.getWarehouseLocList(this.loadData[index].warehouseSn, index, 'dealerProduct')
     },
-    // 已选产品 成本价  change
-    putCostChange (val, record) {
-      this.handleAdd(record, 'edit')
+    // 已选产品 成本价  blur
+    putCostBlur (val, record) {
+      //  光标移出,值发生改变再调用编辑接口
+      if (val != record.putCostBackups) {
+        this.handleAdd(record, 'edit')
+      }
     },
-    // 已选产品 数量  change
-    putQtyChange (val, record) {
-      this.handleAdd(record, 'edit')
+    // 已选产品 数量  blur
+    putQtyBlur (val, record) {
+      if (val != record.putQtyBackups) {
+        this.handleAdd(record, 'edit')
+      }
     },
     // 已选产品 仓库  change
     chooseWarehouseChange (record, index) {

+ 118 - 1
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -1,8 +1,125 @@
 <template>
+  <div class="purchaseReturnDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="purchaseReturnDetail-cont" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="purchaseReturnDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="purchaseReturnDetail-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="purchaseReturnDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="采退单号">{{ (basicInfoData&&basicInfoData.purchaseReturnNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="创建时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="退货数量">{{ (basicInfoData&&basicInfoData.totalQty) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="坏件数量">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="返库数量">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="退货金额">{{ (basicInfoData&&basicInfoData.totalAmount) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 产品详情 -->
+    <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="产品详情">
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 1490 }"
+            bordered>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+  </div>
 </template>
 
 <script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { purchaseReturnDetailSn, purchaseReturnDetailList } from '@/api/purchaseReturn'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 200, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '售价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '坏件数量', dataIndex: 'putQsty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '返库数量', dataIndex: 'putQtdy', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货金额小计', dataIndex: 'purchaseReturnAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货原因', dataIndex: 'remarks', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return purchaseReturnDetailList(Object.assign(parameter, { sparePartsPurchaseSn: this.$route.params.sn })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            // 采购金额  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].purchaseReturnAmount = getOperationalPrecision(data.list[i].cost, data.list[i].qty)
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      basicInfoData: null //  基本信息
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/purchasingManagement/purchaseReturn/list' })
+    },
+    // 基本信息
+    getDetail () {
+      purchaseReturnDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+    })
+  }
+}
 </script>
 
-<style>
+<style lang="less">
+  .purchaseReturnDetail-cont{
+    margin-bottom: 15px;
+    .timeline-box{
+      margin-top: 30px;
+      .auxiliary-txt{
+        color: #808695;
+      }
+    }
+  }
 </style>

+ 45 - 22
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -88,7 +88,7 @@
               type="primary"
               class="import-btn"
               id="purchaseReturnEdit-delAll-btn"
-              @click.stop="handleDelAll"
+              @click.stop="handleDel('', 'all')"
               style="margin-left: 10px;">整单删除</a-button>
           </template>
           <!-- 列表 -->
@@ -111,7 +111,7 @@
                 :min="1"
                 :max="record.qtyLeft"
                 placeholder="请输入"
-                @blur="e => qtyChange(e.target.value, record)"
+                @blur="e => qtyBlur(e.target.value, record)"
                 style="width: 100%;" />
             </template>
             <!-- 退货原因 -->
@@ -121,7 +121,7 @@
                 v-model="record.remarks"
                 :maxLength="30"
                 placeholder="退货原因(最多30个字符)"
-                @change="e => remarksChange(e.target.value, record)"
+                @blur="e => remarksBlur(e.target.value, record)"
                 style="width: 100%;" />
             </template>
             <!-- 操作 -->
@@ -142,7 +142,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { purchaseReturnPurchaseBillDetailList, purchaseReturnDetailList, purchaseReturnDetailSave, purchaseReturnDetailDel, purchaseReturnSubmit } from '@/api/purchaseReturn'
+import { purchaseReturnPurchaseBillDetailList, purchaseReturnDetailList, purchaseReturnDetailSave, purchaseReturnDetailDel, purchaseReturnSubmit, purchaseReturnDelAll } from '@/api/purchaseReturn'
 export default {
   components: { STable, VSelect },
   data () {
@@ -217,10 +217,6 @@ export default {
         this.$message.warning('请输入退货数量')
         return
       }
-      if (isEdit && !row.qty) {
-        this.$message.warning('请输入退货数量')
-        return
-      }
       const params = {
         id: isEdit ? row.id : undefined,
         purchaseReturnSn: this.$route.params.sn,
@@ -232,9 +228,17 @@ export default {
         cost: row.price,
         remarks: row.remarks
       }
+      if (isEdit) { // 编辑
+        // 清空退货数量时,值应保持未清空前的值,因退货数量都不可为空
+        if (!row.qty) {
+          row.qty = row.qtyBackups
+          return
+        }
+      }
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
+          this.getPurchaseBillDetailList()
           this.getChooseProductList()
         }
       })
@@ -254,19 +258,31 @@ export default {
     // 整单删除
     handleDelAll () {},
     //  删除
-    handleDel (row) {
+    handleDel (row, isAll) {
       const _this = this
+      const content = isAll ? '删除后不可恢复,确定要进行整单删除吗?' : '删除后不可恢复,确定要进行删除吗?'
       this.$confirm({
         title: '提示',
-        content: '删除后不可恢复,确定要进行删除吗?',
+        content: content,
         centered: true,
         onOk () {
-          purchaseReturnDetailDel({ id: row.id }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.getChooseProductList()
-            }
-          })
+          if (isAll) { //  整单删除
+            purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.getPurchaseBillDetailList()
+                _this.getChooseProductList()
+              }
+            })
+          } else { //  单个删除
+            purchaseReturnDetailDel({ id: row.id }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.getPurchaseBillDetailList()
+                _this.getChooseProductList()
+              }
+            })
+          }
         }
       })
     },
@@ -336,6 +352,8 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
+            data.list[i].qtyBackups = data.list[i].qty
+            data.list[i].remarksBackups = data.list[i].remarks
             data.list[i].qtyLeft = data.list[i].purchaseBillQtyLeft + data.list[i].qty
           }
           this.chooseLoadData = data.list
@@ -346,13 +364,18 @@ export default {
         }
       })
     },
-    // 已选产品 退货数量  change
-    qtyChange (val, record) {
-      this.handleAdd(record, 'edit')
+    // 已选产品 退货数量  blur
+    qtyBlur (val, record) {
+      //  光标移出,值发生改变再调用编辑接口
+      if (val != record.qtyBackups) {
+        this.handleAdd(record, 'edit')
+      }
     },
-    // 已选产品 退货数量  change
-    remarksChange (val, record) {
-      this.handleAdd(record, 'edit')
+    // 已选产品 退货原因  blur
+    remarksBlur (val, record) {
+      if (val && (val != record.remarksBackups)) {
+        this.handleAdd(record, 'edit')
+      }
     },
     filterOption (input, option) {
       return (

+ 6 - 4
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -52,7 +52,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1170 }"
+      :scroll="{ x: 1250 }"
       bordered>
       <!-- 采退单号 -->
       <template slot="purchaseReturnNo" slot-scope="text, record">
@@ -64,12 +64,14 @@
           size="small"
           type="primary"
           class="button-info"
+          v-if="record.state != 'WAIT_AUDIT'"
           @click="handleEdit(record)"
           id="purchaseReturnList-edit-btn">编辑</a-button>
         <a-button
           size="small"
           type="primary"
           class="button-error"
+          v-if="record.state != 'WAIT_AUDIT'"
           @click="handleDel(record)"
           id="purchaseReturnList-del-btn">删除</a-button>
       </template>
@@ -99,8 +101,8 @@ export default {
         { title: '退货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退款金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -157,7 +159,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.id}/${row.purchaseReturnSn}` })
+      this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.purchaseReturnSn}` })
     },
     //  新增/编辑
     handleEdit (row) {

+ 67 - 59
src/views/salesManagement/outboundOrder/list.vue

@@ -26,7 +26,7 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+                <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -36,7 +36,7 @@
                 v-model="queryParam.outType"
                 ref="outType"
                 id="outboundOrderList-outType"
-                code="PAYMENT_TYPE"
+                code="OUT_STOCK_TYPE"
                 placeholder="请选择出库类型"
                 allowClear></v-select>
             </a-form-item>
@@ -48,7 +48,7 @@
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   id="outboundOrderList-billStatus"
-                  code="PAYMENT_TYPE"
+                  code="OUT_STATE"
                   placeholder="请选择单据状态"
                   allowClear></v-select>
               </a-form-item>
@@ -83,13 +83,15 @@
       :showPagination="false"
       :scroll="{ x: 1550 }"
       bordered>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
-      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" class="button-warning" @click="handleOutbound(record)" id="outboundOrderList-out-btn">出库</a-button>
+        <a-button
+          size="small"
+          type="primary"
+          v-if="record.state=='OUT_STATE'"
+          class="button-warning"
+          @click="handleOutbound(record)"
+          id="outboundOrderList-out-btn">出库</a-button>
         <a-button
           size="small"
           type="primary"
@@ -102,8 +104,9 @@
 </template>
 
 <script>
-// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
 import { STable, VSelect } from '@/components'
+import { custAllList } from '@/api/customer'
+import { stockOutList } from '@/api/stockOut'
 export default {
   components: { STable, VSelect },
   data () {
@@ -116,19 +119,19 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
       time: [], //  创建时间
-      brandData: [], //  客户 下拉数据
+      custAllList: [], //  客户下拉数据
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'inventoryMoneys', width: 160, align: 'center' },
-        { title: '关联单号', dataIndex: 'productName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库类型', dataIndex: 'prodsssuctName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'productBrand', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '总款数', dataIndex: 'productType', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'inventoryNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '审核时间', dataIndex: 'authTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '关联单号', dataIndex: 'outBizNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库类型', dataIndex: 'outBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'demanderName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'productTotalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '出库时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库状态', scopedSlots: { customRender: 'state' }, width: 110, align: 'center' },
+        { title: '出库状态', dataIndex: 'stateDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
@@ -136,31 +139,14 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', isDisabled: true, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' },
-              { id: '2', productNum: 'jgqp11111111111', isDisabled: false, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
+        return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
@@ -177,7 +163,7 @@ export default {
         },
         getCheckboxProps: record => ({
           props: {
-            disabled: record.isDisabled // Column configuration not to be checked
+            disabled: record.state == 'FINISH' // Column configuration not to be checked
           }
         })
       }
@@ -189,9 +175,9 @@ export default {
       return date && date.valueOf() > Date.now()
     },
     filterOption (input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     //  重置
     resetSearchForm () {
@@ -205,7 +191,27 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ name: 'outboundOrderDetail', params: { id: row.id } })
+      //  根据出库类型跳转对应页面
+      if (row.outBizType == 'PURCHASE_RETURN') { // 采购退货
+        this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SPARE_PARTS_RETURN') { // 散件退货
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SALES') { // 出库
+        this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'DISPATCH_DEDUCT') { // 急件冲减
+        this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'SHOP_CALL_OUT') { // 店内调出
+        this.$router.push({ path: `/allocationManagement/storeTransferOut/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'CHECK_ORDER_OUT') { // 库存盘点盘亏
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'LINKAGE_CALL_OUT') { // 连锁调出
+        this.$message.warning('该出库类型对应页面未开发')
+        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
+      } else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
+        this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
+      }
     },
     // 单个出库
     handleOutbound (row) {
@@ -233,21 +239,23 @@ export default {
     onSelectChange (selectedRowKeys) {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
+    },
+    // 客户无分页列表数据
+    getCustAllList () {
+      const _this = this
+      custAllList().then(res => {
+        if (res.status == 200) {
+          _this.custAllList = res.data || []
+        } else {
+          _this.custAllList = []
+        }
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getCustAllList()
+    })
   }
 }
 </script>
-
-<style lang="less">
-  .outboundOrderList-wrap{
-    .sTable{
-      margin-top: 20px;
-    }
-    .red{
-      color: #ed1c24;
-    }
-    .green{
-      color: #19be6b;
-    }
-  }
-</style>

+ 2 - 2
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -56,7 +56,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { urgentDetail, urgentWriteDown } from '@/api/urgent'
+import { urgentWriteDown, urgentDetailSn } from '@/api/urgent'
 import { urgentDetailList } from '@/api/urgentDetail'
 export default {
   components: { STable, VSelect },
@@ -114,7 +114,7 @@ export default {
     },
     //  详情
     getDetail () {
-      urgentDetail({ id: this.$route.params.id }).then(res => {
+      urgentDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
         } else {

+ 1 - 1
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -158,7 +158,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.id}/${row.urgentBillSn}` })
+      this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.urgentBillSn}` })
     },
     // 客户无分页列表数据
     getCustAllList () {