lilei 2 lat temu
rodzic
commit
b9264f3a83

+ 0 - 1
src/views/salesReturnManagement/custConfirm/list.vue

@@ -235,7 +235,6 @@ export default {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
               data.list[i].isEdit = false
-              data.list[i].backStockQtyBackups = data.list[i].backStockQty
             }
             this.disabled = false
           }

+ 32 - 24
src/views/salesReturnManagement/receiveCheck/receiving.vue

@@ -31,6 +31,7 @@
           class="sTable"
           ref="table"
           :style="{ height: tableHeight+84.5+'px' }"
+          :rowClassName="(record, index) => record.addFlag == '1' ? (record.addType == 'WAREHOUSE_RECEIVE'?'redBg-row':'orgBg-row'):''"
           size="small"
           :rowKey="(record) => record.id"
           :row-selection="{ columnWidth: 40 }"
@@ -41,27 +42,27 @@
           :defaultLoadData="false"
           bordered>
           <!-- 仓库实收数量 -->
-          <template slot="backStockQty" slot-scope="text, record">
+          <template slot="receiveQty" slot-scope="text, record">
             <a-input-number
-              id="salesReturn-backStockQty"
               size="small"
-              v-model="record.backStockQty"
+              v-model="record.receiveQty"
               :precision="0"
               :min="0"
-              :max="record.qty"
+              :max="999999"
               placeholder="请输入"
-              @blur="e => onCellBlur(e.target.value, record)"
               style="width: 100%;" />
           </template>
           <!-- 退货原因 -->
-          <template slot="returnYy" slot-scope="text, record">
-            <v-select
+          <template slot="returnReason" slot-scope="text, record">
+            <a-select
               style="width:100%;"
-              v-model="queryParam.billStatus"
-              ref="billStatus"
-              code="SALES_RETURN_BILL_STATUS"
-              placeholder="请选择业退货原因"
-              allowClear></v-select>
+              v-model="record.returnReason"
+              placeholder="请选择退货原因"
+              allowClear>
+              <a-select-option v-for="item in returnReasonList" :value="item.code">
+                {{ item.dispName }}
+              </a-select-option>
+            </a-select>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -125,14 +126,13 @@ export default {
         this.disabled = true
         // 查询总计
         this.productForm.salesReturnBillSn = this.$route.params.sn
-        return salesReturnDetailList(Object.assign(parameter, this.productForm)).then(res => {
+        return salesReturnDetailList(Object.assign(parameter, this.productForm, this.queryParam)).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
-              data.list[i].backStockQtyBackups = data.list[i].backStockQty
             }
             this.disabled = false
             this.chooseLoadData = data.list
@@ -144,7 +144,8 @@ export default {
       queryParam: {
         productCode: '',
         productName: ''
-      }
+      },
+      returnReasonList: [] // 申请退货列表
     }
   },
   computed: {
@@ -154,10 +155,10 @@ export default {
         { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: '23%', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '申请退货数量', dataIndex: 'qty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库实收数量', dataIndex: 'qty', align: 'center', width: '10%', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '仓库实收数量', dataIndex: 'receiveQty', align: 'center', width: '10%', scopedSlots: { customRender: 'receiveQty' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货单价', dataIndex: 'badQty', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货原因', dataIndex: 'backStockQty', width: '10%', align: 'center', scopedSlots: { customRender: 'returnYy' } },
+        { title: '退货单价', dataIndex: 'price', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '10%', align: 'center', scopedSlots: { customRender: 'returnReason' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -235,11 +236,6 @@ export default {
         this.ordeDetail = res.data || null
       })
     },
-    //  重置
-    resetSearchForm (flag) {
-      this.$refs.table.refresh(!!flag)
-      this.getOrderDetail()
-    },
     // 提交销售单
     handleSubmit () {
       this.spinning = true
@@ -253,15 +249,21 @@ export default {
         }
       })
     },
+    //  重置
+    resetSearchForm (flag) {
+      this.queryParam.productName = ''
+      this.queryParam.productCode = ''
+      this.$refs.table.refresh(!!flag)
+    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.orderSn = this.$route.params.sn
-      this.buyerSn = this.$route.params.buyerSn
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
+      this.returnReasonList = this.$store.state.app.returnReason
       this.getOrderDetail()
     },
     setTableH () {
@@ -315,5 +317,11 @@ export default {
         }
       }
     }
+    .redBg-row{
+      background-color: #f5beb4;
+    }
+    .orgBg-row{
+      background-color: #fffca2;
+    }
   }
 </style>