chenrui 2 vuotta sitten
vanhempi
commit
f87304ba6d

+ 7 - 3
src/views/purchasingManagement/purchaseReturn/detailModal.vue

@@ -28,7 +28,7 @@
       </a-descriptions>
       <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          <span>产品款数:<strong>{{ statisticsObj&&statisticsObj.putQty|| '--' }}</strong>;</span>
+          <span>产品款数:<strong>{{ statisticsObj&&statisticsObj.totalCategory|| '--' }}</strong>;</span>
           <span>申请退货总数量:<strong>{{ statisticsObj&&statisticsObj.qty||'--' }}</strong>;</span>
           <span>退货金额:<strong>{{ statisticsObj&&statisticsObj.totalCost || '--' }}</strong></span>
         </div>
@@ -119,8 +119,12 @@ export default {
     getStatisticsData () {
       queryPageCount({ sparePartsReturnSn: this.itemSn }).then(res => {
         if (res.status == 200) {
-          res.data.totalCost = (res.data && (res.data.totalCost || res.data.totalCost == 0)) ? toFixedDecimal(res.data.totalCost, 2) : '--'
-          this.statisticsObj = res.data
+          if (res.data) {
+            res.data.totalCost = (res.data && (res.data.totalCost || res.data.totalCost == 0)) ? toFixedDecimal(res.data.totalCost, 2) : '--'
+            this.statisticsObj = res.data
+          } else {
+            this.statisticsObj = null
+          }
         } else {
           this.statisticsObj = null
         }

+ 2 - 4
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -42,10 +42,8 @@
       <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
-            <div v-if="statisticsObj">
-              <span>申请退货数量:{{ statisticsObj.qty || statisticsObj.qty == 0 ? statisticsObj.qty : '--' }};</span>
-              <span>退货金额:{{ statisticsObj.totalCost }}元;</span>
-            </div>
+            <span>申请退货数量:{{ statisticsObj&&(statisticsObj.qty || statisticsObj.qty == 0 )? statisticsObj.qty : '--' }};</span>
+            <span>退货金额:{{ statisticsObj&&statisticsObj.totalCost }}元;</span>
           </div>
         </a-alert>
         <div class="table-page-search-wrapper" style="display:flex;align-items: center;justify-content: space-between;">

+ 6 - 3
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -31,7 +31,7 @@
             </a-col>
             <a-col :md="12" :sm="24" style="margin-bottom: 10px;display: flex;align-items: center;">
               <a-button type="primary" style="margin-right: 5px" @click="handleBatchAdd" :loading="addMoreLoading">批量添加</a-button>
-              <a-checkbox @change="onChange">
+              <a-checkbox @change="onChange" :checked="isChecked">
                 显示最大可退数量为0的产品
               </a-checkbox>
             </a-col>
@@ -120,7 +120,7 @@ export default {
       warehousingDate: [], // 入库时间
       disabled: false, //  查询、重置按钮是否可操作
       selectArr: null,
-      disabledFlag: true,
+      isChecked: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
         { title: '入库单号', dataIndex: 'sparePartsNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -162,6 +162,8 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.sparePartsNo = ''
       this.warehousingDate = []
+      this.queryParam.isZero = 0
+      this.isChecked = false
       this.$refs.rangeDate.resetDate(this.warehousingDate)
       this.$refs.chooseTable.refresh(true)
     },
@@ -169,8 +171,9 @@ export default {
       this.$refs.chooseTable.refresh(true)
     },
     onChange (e) {
+      this.isChecked = !this.isChecked
       this.queryParam.isZero = e.target.checked ? 1 : 0
-      this.refreshData()
+      this.$refs.chooseTable.refresh()
     },
     //  入库时间  change
     dateChange (date) {