lilei 2 vuotta sitten
vanhempi
commit
55a87f205d
3 muutettua tiedostoa jossa 50 lisäystä ja 9 poistoa
  1. 12 0
      src/api/salesReturn.js
  2. 37 8
      src/views/salesReturnManagement/salesReturn/detail.vue
  3. 1 1
      vue.config.js

+ 12 - 0
src/api/salesReturn.js

@@ -99,6 +99,18 @@ export const salesReturnList = (params) => {
   })
 }
 
+// 销售退货 操作记录
+export const salesReturnChangeLogList = (params) => {
+  const url = `/salesReturn/changeLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
 //  销售退货 提交
 export const salesReturnSubmit = (params) => {
   return axios({

+ 37 - 8
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -55,7 +55,7 @@
         </a-collapse>
       </a-card>
       <a-card size="small" :bordered="false" class="pages-wrap">
-        <a-tabs default-active-key="1" @change="callback">
+        <a-tabs>
           <a-tab-pane key="1" tab="产品明细" force-render>
             <!-- 列表 -->
             <s-table
@@ -71,8 +71,15 @@
           <a-tab-pane key="2" tab="审核进度" >
             <auditDetail ref="auditDetail" businessType="SALES_RETURN" :itemSn="$route.params.sn"></auditDetail>
           </a-tab-pane>
-          <a-tab-pane key="3" tab="操作记录" force-render>
-            操作记录
+          <a-tab-pane key="3" tab="操作记录">
+            <s-table
+              class="sTable"
+              ref="operateTable"
+              size="small"
+              :rowKey="record => record.id"
+              :columns="operateColumns"
+              :data="operateLoadData"
+              bordered></s-table>
           </a-tab-pane>
         </a-tabs>
       </a-card>
@@ -84,11 +91,10 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
 import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import auditDetail from '@/views/common/auditDetail.vue'
-import { salesReturnDetail, salesReturnPrint, salesReturnExport } from '@/api/salesReturn'
+import { salesReturnDetail, salesReturnChangeLogList, salesReturnPrint, salesReturnExport } from '@/api/salesReturn'
 import { salesReturnDetailList } from '@/api/salesReturnDetail'
 export default {
   name: 'SalesReturnDetail',
@@ -109,8 +115,6 @@ 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
-              // 折后退货金额小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-              data.list[i].saleReturnSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
             }
             this.chooseLoadData = data.list
             this.disabled = false
@@ -121,7 +125,32 @@ export default {
       chooseLoadData: [],
       detailData: null, //  详情数据
       visibleAudit: false,
-      spinningAudit: false
+      spinningAudit: false,
+      // 操作记录
+      operateColumns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '操作时间', dataIndex: 'createDate', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '操作人员', dataIndex: 'changeUserName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作类型', dataIndex: 'logTypeName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作内容', dataIndex: 'logContent', width: '70%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      operateLoadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, { salesReturnBillSn: this.$route.params.sn })
+        return salesReturnChangeLogList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            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
+        })
+      }
     }
   },
   computed: {

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.102:8602/ocs-admin',
+        target: 'http://192.168.0.215:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
         // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,