소스 검색

完善id和注释

lilei 11 달 전
부모
커밋
c8dba396cf

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1720767986097
+  "version": 1720770853492
 }

+ 2 - 2
src/views/financialManagement/financialCollection/detailModal.vue

@@ -37,7 +37,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: {// 单据id
       type: [Number, String],
       default: ''
     }
@@ -45,7 +45,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      detailsData: null
+      detailsData: null // 详情数据
     }
   },
   methods: {

+ 46 - 41
src/views/financialManagement/financialCollection/list.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 标签页 -->
       <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="financialCollectionList-tabs ">
-        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType" :id="'finacialColl-tabs-'+item.bizType">
           <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
         </a-tab-pane>
       </a-tabs>
@@ -29,7 +29,7 @@
                     v-model="queryParam.billState"
                     ref="settleState"
                     @change="setIsHomeNav($route.name, null)"
-                    id="financialCollectionList-settleState"
+                    id="financialCollectionList-billState"
                     code="SETTLE_RECEIVE_STATUS"
                     placeholder="请选择单据状态"
                     allowClear
@@ -38,17 +38,17 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="创建时间">
-                  <rangeDate ref="createDate" @change="createDateChange" />
+                  <rangeDate id="financialCollectionList-createDate" ref="createDate" @change="createDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                  <rangeDate id="financialCollectionList-rangeDate" ref="rangeDate" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款时间">
-                  <rangeDate ref="settleDate" @change="settleChange" />
+                  <rangeDate id="financialCollectionList-settleDate" ref="settleDate" @change="settleChange" />
                 </a-form-item>
               </a-col>
             </template>
@@ -56,7 +56,7 @@
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchForm()" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="financialCollectionList-reset">重置</a-button>
-                <a @click="advanced = !advanced" style="margin-left: 5px">
+                <a @click="advanced = !advanced" style="margin-left: 5px" id="financialCollectionList-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
                 </a>
@@ -102,7 +102,7 @@
       >
         <!-- 关联单号 -->
         <template slot="bizNo" slot-scope="text, record">
-          <span class="table-td-link" @click="handleDetail(record)">{{ record.bizNo }}</span>
+          <span class="table-td-link" :id="'financialCollectionList-detail-'+record.id" @click="handleDetail(record)">{{ record.bizNo }}</span>
         </template>
         <!-- 客户名称 -->
         <template slot="customerName" slot-scope="text, record">
@@ -117,7 +117,8 @@
             class="button-primary"
             v-if="record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')"
             @click="handleVoucher(record)"
-            id="financialCollectionList-voucher-btn">凭证</a-button>
+            :id="'financialCollectionList-voucher-'+record.id"
+          >凭证</a-button>
           <a-button
             size="small"
             type="link"
@@ -125,7 +126,7 @@
             class="button-error"
             v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing')"
             @click="enableFundAccount ? handleSettleAcountPay(record,0) : handleCollectionSing(record)"
-            id="financialCollectionList-pay-btn">收款</a-button>
+            :id="'financialCollectionList-pay-'+record.id">收款</a-button>
           <span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing'))">--</span>
         </template>
       </s-table>
@@ -189,34 +190,34 @@ export default {
       spinning: false,
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
-      openModal: false, // 详情弹框
-      openDetailModal: false,
+      openModal: false, // 单据详情弹框
+      openDetailModal: false, // 打开关联单号详情弹框
       openSettleModal: false, // 打开收款弹框
-      openBulkReturnDetailModal: false,
+      openBulkReturnDetailModal: false, // 散件退货弹框
       enableFundAccount: false, // 是否开启资金账户管理
-      tableHeight: 0,
-      curBizType: 'ALL',
-      curBizTitle: '',
-      fcBizType: '',
-      orderSn: null,
+      tableHeight: 0, // 表格高度
+      curBizType: 'ALL', // 单据类型,默认全部
+      curBizTitle: '', // 关联单号详情弹框标题
+      fcBizType: '', // 关联类型
+      orderSn: null, // 单据sn
       // 查询参数
       queryParam: {
-        bizType: 'ALL',
-        settleNo: '',
-        bizNo: '',
-        settleClientNameCurrent: '',
-        billState: '',
-        auditBeginDate: '',
-        auditEndDate: '',
-        settleBeginDate: '',
-        settleEndDate: ''
+        bizType: 'ALL', // 单据类型
+        settleNo: '', // 收款单号
+        bizNo: '', // 关联单号
+        settleClientNameCurrent: '', // 客户名称
+        billState: '', // 单据状态
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        settleBeginDate: '', // 结算开始时间
+        settleEndDate: ''// 结算结束时间
       },
       // 总计
       totalData: {
-        settledAmount: 0,
-        totalAmount: 0,
-        unsettleAmount: 0,
-        count: 0
+        settledAmount: 0, // 已收金额
+        totalAmount: 0, // 应收金额
+        unsettleAmount: 0, // 待收金额
+        count: 0// 总数量
       },
       // 表头
       columns: [
@@ -256,11 +257,12 @@ export default {
           return data
         })
       },
-      tabPaneData: [],
-      rowSelectionInfo: null
+      tabPaneData: [], // tab列表
+      rowSelectionInfo: null// 已选数据
     }
   },
   computed: {
+    // 已选总金额
     selectTotalAmount () {
       let ret = 0
       if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows) {
@@ -273,14 +275,14 @@ export default {
   },
   methods: {
     ...mapActions(['GetSettleAccountState']),
+    // 关联单详情弹框关闭
     handleDetailClose () {
       this.openDetailModal = false
       this.openBulkReturnDetailModal = false
       this.orderSn = null
     },
-    // 查看关联单
+    // 查看关联单详情
     handleDetail (row) {
-      console.log(row)
       this.orderSn = row.bizSn
       this.fcBizType = row.bizType
       this.curBizTitle = row.bizTypeDictValue + '详情'
@@ -294,20 +296,22 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
-    //  时间  change
+    //  审核时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    // 创建时间
     createDateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 结算时间
     settleChange (date) {
       this.queryParam.settleBeginDate = date[0]
       this.queryParam.settleEndDate = date[1]
     },
-    // 总计
+    // 总计数据
     settleReceiptQuerySum (params) {
       settleReceiptQuerySum(params).then(res => {
         if (res.status == 200) {
@@ -444,6 +448,7 @@ export default {
         settleEndDate: ''
       }
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -451,6 +456,7 @@ export default {
       })
       this.queryByTypeSum()
     },
+    // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 330
@@ -476,7 +482,6 @@ export default {
   activated () {
     // 是否从首页点击进入
     const isHomeNav = this.getIsHomeNav()[this.$route.name]
-    console.log(this.getIsHomeNav(), isHomeNav, this.$route.name)
     // 待办查询
     if (isHomeNav && isHomeNav.type == 'todo') {
       this.resetData()
@@ -495,11 +500,11 @@ export default {
 
     // 结算账户状态查询
     if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
-    	this.GetSettleAccountState().then(res => {
-    	  if (res.status == 200) {
+      this.GetSettleAccountState().then(res => {
+        if (res.status == 200) {
           this.enableFundAccount = res.data.functionEnableFlag == 1
-    	  }
-    	})
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {

+ 6 - 7
src/views/financialManagement/financialPayment/detailModal.vue

@@ -37,7 +37,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: { // 单据id
       type: [Number, String],
       default: ''
     }
@@ -45,13 +45,12 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      // detailsData: null, //  详情数据
       detailsData: {
-        productName: '',
-        productCode: '',
-        origCode: '',
-        unit: '',
-        productBrandName: ''
+        productName: '', // 产品名称
+        productCode: '', // 产品编码
+        origCode: '', // 原厂编码
+        unit: '', // 单位
+        productBrandName: '' // 产品品牌
       }
     }
   },

+ 2 - 2
src/views/financialManagement/financialPayment/expenseDetail.vue

@@ -27,7 +27,7 @@ export default {
   name: 'ExpenseManagementDetail',
   mixins: [commonMixin],
   props: {
-    outBizSn: {
+    outBizSn: { // 单据sn
       type: [Number, String],
       default: ''
     }
@@ -35,7 +35,7 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      detailsData: null
+      detailsData: null // 单据详情
     }
   },
   mounted () {

+ 42 - 35
src/views/financialManagement/financialPayment/list.vue

@@ -3,7 +3,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 标签页 -->
       <a-tabs type="card" size="small" v-model="queryParam.bizType" @change="handleTabChange" class="finacialPay-tabs">
-        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType" :id="'finacialPay-tabs-'+item.bizType">
           <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
         </a-tab-pane>
       </a-tabs>
@@ -37,17 +37,17 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="创建时间">
-                  <rangeDate ref="createDate" @change="createDateChange" />
+                  <rangeDate id="finacialPay-createDate" ref="createDate" @change="createDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                  <rangeDate id="finacialPay-createDate" ref="rangeDate" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="付款时间">
-                  <rangeDate ref="settleDate" @change="settleChange" />
+                  <rangeDate id="finacialPay-createDate" ref="settleDate" @change="settleChange" />
                 </a-form-item>
               </a-col>
             </template>
@@ -55,7 +55,7 @@
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchForm()" :disabled="disabled" id="finacialPay-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="finacialPay-reset">重置</a-button>
-                <a @click="advanced = !advanced" style="margin-left: 5px">
+                <a @click="advanced = !advanced" style="margin-left: 5px" id="finacialPay-advanced">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
                 </a>
@@ -101,7 +101,7 @@
       >
         <!-- 关联单号 -->
         <template slot="bizNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_purchaseDetail')||$hasPermissions('B_salesReturnDetail')||$hasPermissions('B_bulkWarehousingOrder_detail')||$hasPermissions('B_allocLinkagePutDetail')||$hasPermissions('B_expenseDetail')" class="table-td-link" @click="handleDetail(record)">{{ record.bizNo }}</span>
+          <span :id="'finacialPay-advanced-'+record.id" v-if="$hasPermissions('B_purchaseDetail')||$hasPermissions('B_salesReturnDetail')||$hasPermissions('B_bulkWarehousingOrder_detail')||$hasPermissions('B_allocLinkagePutDetail')||$hasPermissions('B_expenseDetail')" class="table-td-link" @click="handleDetail(record)">{{ record.bizNo }}</span>
           <span v-else>{{ record.bizNo }}</span>
         </template>
         <!-- 客户名称 -->
@@ -117,7 +117,8 @@
             class="button-primary"
             v-if="record.settleState == 'SETTLED' && $hasPermissions('B_financialPaymentDetail')"
             @click="handleVoucher(record)"
-            id="finacialPay-voucher-btn">凭证</a-button>
+            :id="'finacialPay-voucher-'+record.id"
+          >凭证</a-button>
           <a-button
             size="small"
             type="link"
@@ -125,7 +126,7 @@
             :loading="loading"
             v-else-if="record.settleState != 'SETTLED' && $hasPermissions('B_financialPaymentSing')"
             @click="enableFundAccount ? handleSettleAcountPay(record,0) : handlePay(record)"
-            id="finacialPay-pay-btn">付款</a-button>
+            :id="'finacialPay-pay-'+record.id">付款</a-button>
           <span v-else>--</span>
         </template>
       </s-table>
@@ -169,7 +170,6 @@ import { mapActions } from 'vuex'
 import { STable, VSelect } from '@/components'
 import detailModal from './detailModal.vue'
 import settleModal from '../settleModal/settleModal.vue'
-import { settlePayQuery, queryByTypeSum, settlePayMoney, settlePayQuerySum } from '@/api/settlePay.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import purchasDetail from '@/views/purchasingManagement/purchaseOrder/detail'
 import stockOrderDetail from '@/views/purchasingManagement/signWarehousing/stockOrderDetail'
@@ -177,6 +177,8 @@ import salesReturnDetail from '@/views/salesManagement/salesReturn/detail'
 import chainTransInDetail from '@/views/allocationManagement/chainTransferIn/detail'
 import bulkWareDetail from '@/views/bulkManagement/bulkWarehousingOrder/detail'
 import expenseDetail from './expenseDetail'
+// 接口
+import { settlePayQuery, queryByTypeSum, settlePayMoney, settlePayQuerySum } from '@/api/settlePay.js'
 export default {
   name: 'FinancialPaymentList',
   components: { STable, VSelect, detailModal, rangeDate, settleModal, salesReturnDetail, chainTransInDetail, bulkWareDetail, expenseDetail, purchasDetail, stockOrderDetail },
@@ -190,30 +192,30 @@ export default {
       openModal: false, // 详情弹框
       openSettleModal: false, // 打开付款弹框
       enableFundAccount: false, // 是否开启资金账户管理
-      tableHeight: 0,
-      curBizType: 'ALL',
+      tableHeight: 0, // 表格高度
+      curBizType: 'ALL', // 当前tabs
       openDetailModal: false, // 关联单详情
-      curBizTitle: '',
-      fcBizType: '',
-      orderSn: null,
+      curBizTitle: '', // 关联单号详情标题
+      fcBizType: '', // 关联单号类型
+      orderSn: null, // 单据sn
       // 查询参数
       queryParam: {
-        bizType: 'ALL',
-        settleNo: '',
-        bizNo: '',
-        settleClientNameCurrent: '',
-        billState: '',
-        auditBeginDate: '',
-        auditEndDate: '',
-        settleBeginDate: '',
-        settleEndDate: ''
+        bizType: 'ALL', // 业务类型
+        settleNo: '', // 付款单号
+        bizNo: '', // 关联单号
+        settleClientNameCurrent: '', // 客户名称
+        billState: '', // 单据状态
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        settleBeginDate: '', // 结算开始时间
+        settleEndDate: ''// 结算结束时间
       },
       // 总计
       totalData: {
-        settledAmount: 0,
-        totalAmount: 0,
-        unsettleAmount: 0,
-        count: 0
+        settledAmount: 0, // 已付金额
+        totalAmount: 0, // 应付金额
+        unsettleAmount: 0, // 待付金额
+        count: 0 // 总数
       },
       // 表头
       columns: [
@@ -253,11 +255,12 @@ export default {
           return data
         })
       },
-      tabPaneData: [],
-      rowSelectionInfo: null
+      tabPaneData: [], // tab 数据
+      rowSelectionInfo: null // 已选行
     }
   },
   computed: {
+    // 已选总金额
     selectTotalAmount () {
       let ret = 0
       if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows) {
@@ -269,9 +272,9 @@ export default {
     }
   },
   methods: {
+    ...mapActions(['GetSettleAccountState']),
     // 查看关联单号
     handleDetail (row) {
-      console.log(row)
       this.orderSn = row.bizSn
       this.fcBizType = row.bizType
       // 采购但
@@ -286,26 +289,28 @@ export default {
       this.curBizTitle = row.bizTypeDictValue + '详情'
       this.openDetailModal = true
     },
+    // 查看关联单号弹框关闭
     handleDetailClose () {
       this.openDetailModal = false
       this.fcBizType = null
       this.orderSn = null
     },
-    ...mapActions(['GetSettleAccountState']),
     // 表格选中项
     rowSelectionFun (obj) {
       console.log(obj)
       this.rowSelectionInfo = obj || null
     },
-    //  时间  change
+    //  审核时间  change
     dateChange (date) {
       this.queryParam.auditBeginDate = date[0]
       this.queryParam.auditEndDate = date[1]
     },
+    // 创建时间
     createDateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 结算时间
     settleChange (date) {
       this.queryParam.settleBeginDate = date[0]
       this.queryParam.settleEndDate = date[1]
@@ -332,7 +337,7 @@ export default {
         }
       })
     },
-    //  凭证弹框
+    //  打开凭证弹框
     handleVoucher (row) {
       this.$refs.detailModal.getDetail(row.id)
       this.openModal = true
@@ -378,7 +383,7 @@ export default {
         }
       })
     },
-    // 付款
+    // 付款确认框
     handlePay (row) {
       const _this = this
       this.$confirm({
@@ -392,7 +397,7 @@ export default {
         }
       })
     },
-    // 选择类型
+    // 切换tab
     handleTabChange (key) {
       this.queryParam.bizType = key
       this.$refs.table.refresh(true)
@@ -448,6 +453,7 @@ export default {
         settleEndDate: ''
       }
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -455,6 +461,7 @@ export default {
       })
       this.queryByTypeSum()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 330

+ 13 - 12
src/views/financialManagement/inventoryCheckAudit/list.vue

@@ -56,7 +56,7 @@
             v-if="record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit')"
             type="link"
             class="button-primary"
-            @click="handleOk(record, true)"
+            @click="handlePass(record, true)"
             :id="'inventoryCheckAuditList-adopt-'+record.id"
           >通过</a-button>
           <a-button
@@ -74,7 +74,7 @@
     <!-- 详情 -->
     <inventoryChecking-detail-modal :openModal="openDetailModal" :itemSn="itemSn" @close="handleDetailClose" />
     <!-- 设置成本价 -->
-    <setPriceModal ref="setPriceModal" @ok="handleOk" :openModal="openCostPriceModal" @close="openCostPriceModal=false"></setPriceModal>
+    <setPriceModal ref="setPriceModal" @ok="handlePass" :openModal="openCostPriceModal" @close="openCostPriceModal=false"></setPriceModal>
   </a-card>
 </template>
 
@@ -143,6 +143,7 @@ export default {
         { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '总成本', dataIndex: 'totalStockCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
@@ -166,17 +167,24 @@ export default {
       this.openDetailModal = false
     },
     // 设置成本价成功
-    handleOk (row, type) {
+    handlePass (row, type) {
       queryStockProductCostNull({ checkWarehouseSn: row.checkWarehouseSn }).then(res => {
-        // 设置成本价
+        // 如果有盈亏的产品,没有最近一次入库成本价,需要设置成本价
         if (res.data.length) {
-          // 如果有盈亏的产品,没有最近一次入库成本价,需要设置成本价
           this.setCostPrice(res.data, row)
         } else {
+          // 继续审核
           this.handleExamine(row, type)
         }
       })
     },
+    // 打开设置成本价弹框
+    setCostPrice (data, row) {
+      this.openCostPriceModal = true
+      this.$nextTick(() => {
+        this.$refs.setPriceModal.setData(data, row)
+      })
+    },
     //  审核
     handleExamine (row, type) {
       const _this = this
@@ -198,13 +206,6 @@ export default {
         }
       })
     },
-    // 设置成本价
-    setCostPrice (data, row) {
-      this.openCostPriceModal = true
-      this.$nextTick(() => {
-        this.$refs.setPriceModal.setData(data, row)
-      })
-    },
     // 重盘
     handleAgain (row) {
       const _this = this