Ver Fonte

修改内容

chenrui há 2 anos atrás
pai
commit
bccfe45712

+ 10 - 9
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -64,14 +64,14 @@
       <!-- v-if="$hasPermissions('B_sparePartsExport')" -->
       <div class="table-operator">
         <a-button v-if="$hasPermissions('B_sparePartsNew')" id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-        <a-button
+        <!-- <a-button
           style="margin-left: 10px"
           type="primary"
           class="button-warning"
           @click="handleExport"
           :disabled="disabled"
           :loading="exportLoading"
-        >同步到ERP</a-button>
+        >同步到ERP</a-button> -->
       </div>
       <!-- 列表 -->
       <s-table
@@ -218,13 +218,14 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.exportLoading = true
-      _this.spinning = true
-      hdExportExcel(sparePartsDetailExport, _this.queryParam, '散件入库明细', function () {
-        _this.exportLoading = false
-        _this.spinning = false
-        _this.showExport = true
-      })
+      _this.showExport = true
+      // _this.exportLoading = true
+      // _this.spinning = true
+      // hdExportExcel(sparePartsDetailExport, _this.queryParam, '散件入库明细', function () {
+      //   _this.exportLoading = false
+      //   _this.spinning = false
+      //   _this.showExport = true
+      // })
     },
     //  新增
     handleAdd () {

+ 6 - 153
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -120,15 +120,6 @@
     </div>
     <!-- 选择审核人员 -->
     <chooseDepartUserModal ref="chooseDepart" :openModal="openDepartUserModal" @close="openDepartUserModal = false" @submit="handleSubmit"></chooseDepartUserModal>
-    <!-- 批量设置退货原因 -->
-    <commonModal modalTit="批量设置退货原因" :openModal="showPlModal" @cancel="showPlModal = false" @ok="setPlReturnReason">
-      <div style="text-align: center;">
-        <div style="margin-bottom: 15px;font-size: 14px;"><strong>请输入退货原因</strong></div>
-        <div style="line-height: 24px;">
-          <div><returnReason size="large" v-model="plReturnReason"></returnReason></div>
-        </div>
-      </div>
-    </commonModal>
     <!-- 编辑基础信息弹窗 -->
     <add-modal v-drag :openModal="openModal" :itemSn="sparePartsReturnSn" @ok="handleOk" @close="openModal = false" />
   </div>
@@ -138,7 +129,6 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { printFun, exportExcel } from '@/libs/JGPrint.js'
-// import ImportGuideModal from './importGuideModal.vue'
 import queryPart from './queryPart.vue'
 import addModal from './addModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
@@ -168,23 +158,15 @@ export default {
   data () {
     return {
       spinning: false,
-      orderId: null,
-      orderSn: null,
-      buyerSn: null,
-      disabled: false,
+      disabled: false, // 查询重置
       isInster: false, // 是否正在添加产品
-      openDepartUserModal: false,
-      ordeDetail: { discountAmount: 0 },
+      openDepartUserModal: false, // 审核人员弹窗
       delLoading: false,
-      // 已选产品
-      dataSource: [],
       productForm: {
-        sn: '',
         productName: '',
         productCode: '',
         sparePartsNo: ''
       },
-      chooseLoadData: [],
       sparePartsReturnSn: null,
       sparePartsReturnNo: null,
       columns: [
@@ -228,7 +210,7 @@ export default {
         },
         {
           title: '批次号',
-          dataIndex: 'sparePartsBatchNo',
+          dataIndex: 'stockBatchNo',
           align: 'center',
           width: '18%',
           customRender: function (text) {
@@ -273,26 +255,9 @@ export default {
           return data
         })
       },
-      openGuideModal: false, //  导入产品引导
-      total: 0,
-      rowSelectionInfo: null,
-      plReturnReason: '',
-      showPlModal: false,
-      openModal: false,
-      statisticsObj: null,
-      detailsData: null
-    }
-  },
-  watch: {
-    showPlModal (newValue, oldValue) {
-      if (!newValue) {
-        this.plReturnReason = ''
-      }
-    }
-  },
-  computed: {
-    selNums () {
-      return (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length) || 0
+      openModal: false, // 修改信息弹窗
+      statisticsObj: null, // 统计明细
+      detailsData: null// 基础信息数据
     }
   },
   methods: {
@@ -304,69 +269,6 @@ export default {
     handleBack () {
       this.$router.push({ path: `/purchasingManagement/purchaseReturn/list`, query: { closeLastOldTab: true } })
     },
-    // 表格选中项
-    rowSelectionFun (obj) {
-      this.rowSelectionInfo = obj || null
-    },
-    // 修改退货原因
-    updateReason (row) {
-      console.log(row.returnReason)
-      // 空或没有改变时不保存数据
-      if (!row.returnReason || row.returnReason == row.returnReasonBackups) {
-        row.returnReason = row.returnReasonBackups
-        return
-      }
-      this.spinning = true
-      salesReturnDetailUpdateReason({
-        salesReturnDetailSn: row.salesReturnDetailSn,
-        returnReason: row.returnReason
-      }).then(res => {
-        if (res.status == 200) {
-          this.resetTable(false)
-          this.$message.success(res.message)
-        } else {
-          row.returnReason = row.returnReasonBackups
-        }
-        this.spinning = false
-      })
-    },
-    // 批量设置退货原因
-    openPlSetReason () {
-      if (this.selNums) {
-        this.showPlModal = true
-      } else {
-        this.$message.warning('请先选择产品!')
-      }
-    },
-    setPlReturnReason () {
-      if (this.plReturnReason == '') {
-        this.$message.warning('请输入退货原因!')
-      } else {
-        this.spinning = true
-        const snList = []
-        const arr = (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows) || []
-        arr.map(item => {
-          snList.push(item.salesReturnDetailSn)
-        })
-        salesReturnDetailSetReason({
-          salesReturnBillDetailSnList: snList,
-          returnReason: this.plReturnReason
-        }).then(res => {
-          if (res.status == 200) {
-            this.showPlModal = false
-            this.$refs.table.clearSelected()
-            this.resetTable(false)
-          }
-          this.spinning = false
-        })
-      }
-    },
-    // 获取单据详细
-    getOrderDetail () {
-      salesReturnDetail({ sn: this.orderSn }).then(res => {
-        this.ordeDetail = res.data || null
-      })
-    },
     // 删除所选产品
     handleDel (row) {
       const _this = this
@@ -391,7 +293,6 @@ export default {
     },
     resetTable (flag) {
       this.$refs.table.refresh(flag)
-      // this.getOrderDetail()
     },
     //  重置
     resetSearchForm (flag) {
@@ -482,22 +383,8 @@ export default {
         this.spinning = false
       })
     },
-
     beforeSubmit () {
       this.openDepartUserModal = true
-      // if (this.total) {
-      //   const hasKong = this.chooseLoadData.find(item => !item.returnReason)
-      //   if (hasKong) {
-      //     this.$message.warning('请输入退货原因!')
-      //   } else {
-      //     this.openDepartUserModal = true
-      //     if (this.ordeDetail.billStatus == 'AUDIT_REJECT') {
-      //       this.$refs.chooseDepart.getDetail(this.ordeDetail)
-      //     }
-      //   }
-      // } else {
-      //   this.$message.warning('请添加产品!')
-      // }
     },
     // 提交采购退货
     handleSubmit (data) {
@@ -510,36 +397,6 @@ export default {
         this.spinning = false
       })
     },
-    closeGuideModel () {
-      this.openGuideModal = false
-    },
-    // 导入产品
-    hanldeOk (obj) {
-      salesReturnBatchInsert(obj).then(res => {
-        if (res.status == 200) {
-          this.resetTable(true)
-        }
-      })
-    },
-    // 打印预览/快捷打印
-    handlePrint (type) {
-      const _this = this
-      const a = ['WAIT_CUSTOMER_SERVICE_CONFIRM', 'WAIT_FINANCIAL_AUDIT', 'FINANCIAL_REJECT', 'FINISH'].find(item => item == this.ordeDetail.billStatus)
-      const status = a ? 'SALES_RETURN_AMOUNT' : 'SALES_RETURN_REASON'
-      const params = { salesReturnBillSn: this.$route.query.sn, priceType: status }
-      _this.spinning = true
-      // 导出
-      if (type == 'export') {
-        exportExcel(salesReturnExport, params, '销售退货', function () {
-          _this.spinning = false
-        })
-      } else {
-        // 打印或预览
-        printFun(salesReturnPrint, params, type, '销售退货', () => {
-          _this.spinning = false
-        })
-      }
-    },
     pageInit () {
       this.supplierSn = this.$route.query.sn
       this.sparePartsReturnSn = this.$route.query.returnSn
@@ -569,10 +426,6 @@ export default {
           this.detailsData = null
         }
       })
-    },
-    // 修改成功
-    handleOk (data) {
-
     }
   },
   mounted () {

+ 32 - 27
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -17,30 +17,36 @@
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
-              <a-form-model-item label="入库单号">
-                <a-input id="salesReturnDetailList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
-              </a-form-model-item>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购退货单号">
+                <a-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入采购退货单号"/>
+              </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
-              <a-form-model-item label="产品编码">
-                <a-input id="salesReturnDetailList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="供应商名称">
+                <custList id="salesReturnsReportList-dealerName" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品名称">
-                  <a-input id="salesReturnDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-                </a-form-model-item>
+                <a-form-item label="退货原因">
+                  <v-select
+                    v-model="queryParam.returnReason"
+                    ref="returnReason"
+                    id="purchaseReturn-returnReason"
+                    code="SPARE_PARTS_RETURN_REASON"
+                    placeholder="请选择退货原因"
+                    allowClear></v-select>
+                </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="供应商名称">
-                  <a-input id="salesReturnDetailList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
+              <a-col :md="5" :sm="24">
+                <a-form-model-item label="产品编码">
+                  <a-input id="salesReturnDetailList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="品牌分类">
-                  <v-select code="BRAND_TYPE" id="salesReturnDetailList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
+                <a-form-model-item label="产品名称">
+                  <a-input id="salesReturnDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -49,6 +55,11 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
+                <a-form-model-item label="品牌分类">
+                  <v-select code="BRAND_TYPE" id="salesReturnDetailList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
+                </a-form-model-item>
+              </a-col>
+              <!-- <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
                   <a-cascader
                     @change="changeProductType"
@@ -61,7 +72,7 @@
                     allowClear
                     v-model="productType" />
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
               <!-- <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesReturnDetailList-subareaSn" v-model="queryParam.subareaSn"></subarea>
@@ -95,13 +106,7 @@
                 </a-row>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
-              <a-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="salesReturnDetailList-stockDate">盘点区间日期</a-button>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnDetailList-reset">重置</a-button>
               <a-button
@@ -234,18 +239,19 @@ export default {
     columns () {
       const arr = [
         { title: '采购退货单号', dataIndex: 'subareaNames', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'dealerProvinceName', width: 90, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '供应商名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '补充说明', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '附件', dataIndex: 'returnReason', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '二级分类', dataIndex: 'productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '批次号', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库数量', dataIndex: 'receiveQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已退数量', dataIndex: 'badQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '申请退货数量', dataIndex: 'goodQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -253,9 +259,8 @@ export default {
       ]
 
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        // const ind = this.$hasPermissions('B_isShowCost') ? 29 : 28
-        arr.splice(13, 0, { title: '入库单价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(17, 0, { title: '退货金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(14, 0, { title: '入库单价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(18, 0, { title: '退货金额', dataIndex: 'totalPrice', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       // if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
       //   const ind = this.$hasPermissions('B_isShowPrice') ? 27 : 20

+ 19 - 53
src/views/reportData/urchaseReturn/list.vue

@@ -12,62 +12,33 @@
           :rules="rules"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
-            <a-col :md="7" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="退货完成日期" prop="time">
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
-              <a-form-model-item label="入库单号">
-                <a-input id="salesReturnsReportList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
-              </a-form-model-item>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购退货单号">
+                <a-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入采购退货单号"/>
+              </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="salesReturnsReportList-subareaSn" v-model="queryParam.subareaSn"></subarea>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="供应商名称">
+                <custList id="salesReturnsReportList-dealerName" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
               </a-form-model-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="供应商名称">
-                  <custList id="salesReturnsReportList-dealerName" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="11" :sm="24">
-                <a-row>
-                  <a-form-model-item label="地区" style="margin-bottom: 0!important;">
-                    <a-col span="7">
-                      <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerProvinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="dealerCitySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCitySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-model-item prop="dealerCountySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCountySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-form-model-item>
-                </a-row>
-              </a-col>
-            </template>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="退货原因">
+                <v-select
+                  v-model="queryParam.returnReason"
+                  ref="returnReason"
+                  id="purchaseReturn-returnReason"
+                  code="SPARE_PARTS_RETURN_REASON"
+                  placeholder="请选择退货原因"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
-              <a-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="salesReturnsReportList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnsReportList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
               <a-button
@@ -79,10 +50,6 @@
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_salesReturns_report')"
                 id="salesReturnsReportList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
             </a-col>
           </a-row>
         </a-form-model>
@@ -187,7 +154,6 @@ export default {
     columns () {
       const arr = [
         { title: '采购退货单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', dataIndex: 'salesReturnBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货完成日期', dataIndex: 'salesReturnDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '供应商名称', dataIndex: 'dealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货原因', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },