소스 검색

bug 修复

lilei 2 년 전
부모
커밋
e9c31930af
3개의 변경된 파일26개의 추가작업 그리고 17개의 파일을 삭제
  1. 2 2
      src/api/salesReturn.js
  2. 23 14
      src/views/salesReturnManagement/salesReturn/detail.vue
  3. 1 1
      src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

+ 2 - 2
src/api/salesReturn.js

@@ -63,7 +63,7 @@ export const salesReturnPay = (params) => {
 //  销售退货 打印预览
 export const salesReturnPrint = (params) => {
   return axios.request({
-    url: `/salesReturn/print/${params.sn}`,
+    url: `/salesReturn/print/${params.sn}/${params.status}`,
     method: 'get',
     responseType: 'blob'
   })
@@ -72,7 +72,7 @@ export const salesReturnPrint = (params) => {
 //  销售退货 导出
 export const salesReturnExport = (params) => {
   return axios.request({
-    url: `/salesReturn/export/${params.sn}`,
+    url: `/salesReturn/export/${params.sn}/${params.status}`,
     method: 'get',
     responseType: 'blob'
   })

+ 23 - 14
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -60,14 +60,14 @@
             <a-alert style="margin-bottom: 10px;" type="info">
               <div slot="message" class="total-bar">
                 <div>
-                  <span>申请退货数量:{{ ordeDetail&&(ordeDetail.totalQty || ordeDetail.totalQty==0) ? ordeDetail.totalQty : '--' }};</span>
-                  <span>仓库实收数量:3;</span>
-                  <span>坏件数量:3;</span>
-                  <span>良品数量:0;</span>
-                  <span>返库数量:0;</span>
+                  <span>申请退货数量:{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }};</span>
+                  <span>仓库实收数量:{{ detailData&&(detailData.totalReceiveQty || detailData.totalReceiveQty==0) ? detailData.totalReceiveQty : '--' }};</span>
+                  <span>坏件数量:{{ detailData&&(detailData.totalBadQty || detailData.totalBadQty==0) ? detailData.totalBadQty : '--' }};</span>
+                  <span>良品数量:{{ detailData&&(detailData.totalGoodQty || detailData.totalGoodQty==0) ? detailData.totalGoodQty : '--' }};</span>
+                  <span>返库数量:{{ detailData&&(detailData.totalBackStockQty || detailData.totalBackStockQty==0) ? detailData.totalBackStockQty : '--' }};</span>
                   <span v-if="$hasPermissions('B_isShowPrice')">
-                    参考退货金额:{{ ordeDetail&&(ordeDetail.totalAmount || ordeDetail.totalAmount==0) ? ordeDetail.totalAmount : '--' }}元;
-                    实际退货金额:{{ ordeDetail&&(ordeDetail.totalAmount || ordeDetail.totalAmount==0) ? ordeDetail.totalAmount : '--' }}元;
+                    参考退货金额:{{ detailData&&(detailData.initialAmount || detailData.initialAmount==0) ? detailData.initialAmount : '--' }}元;
+                    实际退货金额:{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}元;
                   </span>
                 </div>
               </div>
@@ -77,7 +77,7 @@
               <div>
                 <a-select
                   style="width:250px;"
-                  v-model="queryStr"
+                  v-model="showFlag"
                   @change="changeQueryStr(record)"
                   placeholder="请选择"
                   allowClear>
@@ -162,7 +162,7 @@ export default {
         { code: 1, text: '显示——按照申请退货数量计算' },
         { code: 2, text: '显示——按照仓库实收数量计算' }
       ],
-      queryStr: undefined,
+      showFlag: undefined,
       // 操作记录
       operateColumns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -203,12 +203,18 @@ export default {
         { title: '良品数量', dataIndex: 'goodQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'backStockQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货原因', dataIndex: 'returnReasonDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '参考退货单价', dataIndex: 'initialPrice', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '参考退货金额', dataIndex: 'initialAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实际退货单价', dataIndex: 'price', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实际退货金额', dataIndex: 'totalAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '参考退货单价', dataIndex: 'initialPrice', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '参考退货金额', dataIndex: 'initialAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '实际退货单价', dataIndex: 'price', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '实际退货金额', dataIndex: 'totalAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '实际退货单价说明', dataIndex: 'priceRemark', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      if (this.$hasPermissions('B_isShowPrice') && this.showFlag != 0) { //  售价权限
+        arr.splice(10, 0, { title: '参考退货单价', dataIndex: 'initialPrice', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(11, 0, { title: '参考退货金额', dataIndex: 'initialAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(12, 0, { title: '实际退货单价', dataIndex: 'price', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(13, 0, { title: '实际退货金额', dataIndex: 'totalAmount', align: 'center', width: '6%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
       return arr
     }
   },
@@ -234,7 +240,10 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
-      const params = { sn: this.$route.params.sn }
+      const a = ['WAIT_CUSTOMER_SERVICE_CONFIRM', 'WAIT_FINANCIAL_AUDIT', 'FINANCIAL_REJECT', 'FINISH'].find(item => item == this.detailData.billStatus)
+      console.log(a, '-------')
+      const status = a ? 'SALES_RETURN_AMOUNT' : 'SALES_RETURN_REASON'
+      const params = { sn: this.$route.params.sn, status: status }
       _this.spinning = true
       // 导出
       if (type == 'export') {

+ 1 - 1
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -241,7 +241,7 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(4, 0, { title: '参考退货单价', dataIndex: 'price', align: 'center', width: '8%', scopedSlots: { customRender: 'price' } })
+        arr.splice(4, 0, { title: '参考退货单价', dataIndex: 'price', align: 'center', width: '8%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(7, 0, { title: '参考退货金额', align: 'center', dataIndex: 'totalAmount', width: '8%', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr