Ver código fonte

完善id和注释

lilei 11 meses atrás
pai
commit
9e844a7e26

+ 1 - 1
public/version.json

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

+ 1 - 5
src/views/numsGoodsShelves/settlementManagement/detailModal.vue

@@ -48,7 +48,7 @@ export default {
       type: Boolean,
       default: false
     },
-    settleData: {
+    settleData: { // 详情信息
       type: Object,
       default: () => {
         return {}
@@ -107,10 +107,6 @@ export default {
           this.$refs.table.refresh(true)
         })
       }
-    },
-    settleData (newValue, oldValue) {
-      if (this.isShow && newValue) {
-      }
     }
   }
 }

+ 24 - 20
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -7,17 +7,17 @@
           <a-row type="flex" :gutter="10">
             <a-col flex="350px">
               <a-form-item label="货架名称">
-                <shelfList style="max-width:300px;" v-model="queryParam.shelfSn"></shelfList>
+                <shelfList id="settle-shelfsn" style="max-width:300px;" v-model="queryParam.shelfSn"></shelfList>
               </a-form-item>
             </a-col>
             <a-col flex="300px">
               <a-form-item label="关联客户">
-                <custList ref="custList" :dealerFlag="0" @change="custChange" v-model="queryParam.customerName"></custList>
+                <custList id="settle-customerName" ref="custList" :dealerFlag="0" @change="custChange" v-model="queryParam.customerName"></custList>
               </a-form-item>
             </a-col>
             <a-col flex="300px">
               <a-form-item label="结算方式">
-                <v-select code="SHELF_SETTLE_TYPE" v-model="queryParam.settleType" allowClear placeholder="请选择状态"></v-select>
+                <v-select id="settle-settleType" code="SHELF_SETTLE_TYPE" v-model="queryParam.settleType" allowClear placeholder="请选择状态"></v-select>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -27,6 +27,7 @@
                     <a-row>
                       <a-col :span="11">
                         <a-input-number
+                          id="settle-beginAmount"
                           v-model="queryParam.beginAmount"
                           placeholder="起始金额"
                           :precision="2"
@@ -37,6 +38,7 @@
                       <a-col :span="2"><span style="display: block;text-align: center;line-height: 32px;">至</span></a-col>
                       <a-col :span="11">
                         <a-input-number
+                          id="settle-endAmount"
                           placeholder="截止金额"
                           :precision="2"
                           :min="0"
@@ -50,8 +52,8 @@
               </a-col>
             </template>
             <a-col flex="200px">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="settle-refresh" >查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="settle-reset">重置</a-button>
               <!-- <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -83,13 +85,13 @@
             type="link"
             class="button-primary"
             @click="handleUndetail(record)"
-            id="shelfMonitoringList-warehousing-btn">待结明细</a-button>
+            :id="'settle-detail-btn-'+record.id">待结明细</a-button>
           <a-button
             size="small"
             type="link"
             class="button-primary"
             @click="handleDetail(record)"
-            id="shelfMonitoringList-warehousing-btn">结算历史</a-button>
+            :id="'settle-history-btn-'+record.id">结算历史</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -97,9 +99,9 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { commonMixin } from '@/utils/mixin'
 import { toThousands } from '@/libs/tools.js'
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import shelfList from '@/views/common/shelfList'
 import custList from '@/views/common/custList.vue'
@@ -113,19 +115,18 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       spinning: false,
       disabled: false,
-      tableHeight: 0,
-      showModal: false,
-      currentData: null,
-      total: 0,
-      count: 0,
-      time: [],
+      tableHeight: 0, // 表格高度
+      total: 0, // 待结算金额合计
+      count: 0, // 总记录
+      time: [], // 时间
       queryParam: {
-        shelfSn: undefined,
-        settleType: undefined,
-        customerName: undefined,
-        beginAmount: '',
-        endAmount: ''
+        shelfSn: undefined, // 货架sn
+        settleType: undefined, // 结算方式
+        customerName: undefined, // 客户名称
+        beginAmount: '', // 开始金额
+        endAmount: ''//
       },
+      // 列
       columns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '货架名称', dataIndex: 'shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -140,6 +141,7 @@ export default {
         _this.disabled = true
         _this.spinning = true
         const paramsPage = Object.assign(parameter, this.queryParam) //  有分页
+        // 校验待结金额数值范围是否正确
         if (this.checkValueRange()) {
           return queryShelfSettleRulePage(paramsPage).then(res => {
             let data
@@ -170,6 +172,7 @@ export default {
     }
   },
   methods: {
+    // 选择客户
     custChange (obj, row) {
       if (row) {
         this.queryParam.customerSn = row && row.customerSn || undefined
@@ -243,10 +246,12 @@ export default {
       sessionStorage.setItem('settlementDetail', JSON.stringify(row))
       this.$router.push({ name: 'settlementDetail', params: { shelfSn: row.shelfSn, shelfName: row.shelfName } })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 245
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -288,4 +293,3 @@ export default {
   }
 }
 </script>
-

+ 24 - 22
src/views/numsGoodsShelves/settlementManagement/settlementDetail.vue

@@ -1,29 +1,29 @@
 <template>
-  <div class="goodsAllocationSet-page">
+  <div class="settlementDetail-page">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="goodsAllocationSet-baseInfo" >
+      <a-page-header :ghost="false" :backIcon="false" class="settlementDetail-baseInfo" >
         <template slot="subTitle">
-          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+          <a href="javascript:;" id="settlementDetail-back-btn" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">{{ this.$route.params.shelfName||'--' }}</span>
         </template>
       </a-page-header>
-      <a-card :bordered="false" size="small" class="goodsAllocationSet-baseInfo">
+      <a-card :bordered="false" size="small" class="settlementDetail-baseInfo">
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="结算时间">
-                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                  <rangeDate id="settlementDetail-time" ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="支付方式">
-                  <v-select code="PAY_WAY" v-model="queryParam.payWay" allowClear placeholder="请选择支付方式"></v-select>
+                  <v-select id="settlementDetail-payType" code="PAY_WAY" v-model="queryParam.payWay" allowClear placeholder="请选择支付方式"></v-select>
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="6" :sm="6" >
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="settlementDetail-refresh" >查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="settlementDetail-reset">重置</a-button>
               </a-col>
             </a-row>
           </a-form>
@@ -48,7 +48,7 @@
               type="link"
               class="button-primary"
               @click="handleDetail(record)"
-              id="shelfMonitoringList-warehousing-btn">查看详情</a-button>
+              :id="'settlementDetail-detail-'+record.id">查看详情</a-button>
           </template>
         </s-table>
       </a-card>
@@ -59,13 +59,14 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { commonMixin } from '@/utils/mixin'
+import { toThousands } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
 import detailModal from './detailModal.vue'
-import moment from 'moment'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { querySettleBillPage } from '@/api/merchant'
-import { toThousands } from '@/libs/tools.js'
+
 export default {
   mixins: [commonMixin],
   components: { STable, VSelect, detailModal, rangeDate },
@@ -79,13 +80,13 @@ export default {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
-      time: [],
+      time: [], // 时间默认值
       queryParam: {
-        beginDate: '',
-        endDate: '',
-        payWay: undefined
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        payWay: undefined // 支付方式
       },
-      settleData: null,
+      settleData: null, // 详情信息
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '12.5%', align: 'center' },
@@ -117,15 +118,18 @@ export default {
     }
   },
   methods: {
+    // 返回列表
     handleBack () {
-      this.$router.push({ path: '/numsGoodsShelves/settlementManagement/list' })
+      this.$router.push({ name: 'settlementManagementList' })
     },
+    // 选择时间
     dateChange (date) {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 禁用时间范围
     disabledDate (current) {
-	  return current && current > moment().endOf('day')
+      return current && current > moment().endOf('day')
     },
     // 重置
     resetSearchForm () {
@@ -146,14 +150,12 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      // this.getPageInfo()
       this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      // this.getPageInfo()
       this.resetSearchForm()
     }
   }
@@ -161,12 +163,12 @@ export default {
 </script>
 
 <style lang="less">
-  .goodsAllocationSet-page{
+  .settlementDetail-page{
     position: relative;
     height: 100%;
     padding-bottom: 51px;
     box-sizing: border-box;
-    .goodsAllocationSet-baseInfo{
+    .settlementDetail-baseInfo{
       margin-bottom: 10px;
     }
     .bzj-collapse{

+ 31 - 26
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="goodsAllocationSet-page">
+  <div class="unSettlement-page">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="goodsAllocationSet-baseInfo" >
+      <a-page-header :ghost="false" :backIcon="false" class="unSettlement-baseInfo" >
         <template slot="subTitle">
-          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+          <a href="javascript:;" id="unSettlement-back-btn" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
           <span style="margin: 0 15px;color: #666;"> {{ this.$route.params.shelfName||'--' }} </span>
         </template>
       </a-page-header>
@@ -38,28 +38,28 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <a-card :bordered="false" size="small" class="goodsAllocationSet-baseInfo">
+      <a-card :bordered="false" size="small" class="unSettlement-baseInfo">
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="下单时间">
-                  <rangeDate ref="orderDate" :value="orderDate" @change="orderDateChange" />
+                  <rangeDate id="unSettlement-time" ref="orderDate" :value="orderDate" @change="orderDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="取货时间">
-                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                  <rangeDate id="unSettlement-qhtime" ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="12" :sm="24">
                 <a-form-item label="取货单编号">
-                  <a-input placeholder="请输入取货单编号" v-model.trim="queryParam.orderBillNo" allowClear/>
+                  <a-input id="unSettlement-orderNo" placeholder="请输入取货单编号" v-model.trim="queryParam.orderBillNo" allowClear/>
                 </a-form-item>
               </a-col>
               <a-col :xl="6" :lg="6" :md="6" :sm="6" >
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="unSettlement-refresh" >查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="unSettlement-reset">重置</a-button>
               </a-col>
             </a-row>
           </a-form>
@@ -88,10 +88,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { toThousands } from '@/libs/tools.js'
-import moment from 'moment'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { queryOrderBillDetailPage, queryOrderBillDetailCount, merchantCashOut } from '@/api/merchant'
 export default {
@@ -104,22 +104,22 @@ export default {
       disabled: false,
       isEdit: false, // 货位号是否为编辑
       openModal: false, // 货位模板弹窗初始状态
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
-      time: [],
-      orderDate: [],
-      count: 0,
-      priceTotal: 0,
-      total: null,
+      time: [], // 取货时间
+      orderDate: [], //
+      count: 0, // 总记录数
+      priceTotal: 0, // 待结算金额合计
+      total: null, // 授信额度
       queryParam: {
-        orderBeginDate: '',
-        orderEndDat: '',
-        outBeginDate: '',
-        outEndDate: '',
-        orderBillNo: ''
+        orderBeginDate: '', // 下单时间开始
+        orderEndDat: '', // 下单时间结束
+        outBeginDate: '', // 取货时间开始
+        outEndDate: '', // 取货时间结束
+        orderBillNo: ''// 订单号
       },
       columns: [// 表头
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -159,25 +159,27 @@ export default {
   },
 
   methods: {
+    // 返回列表
     handleBack () {
-      this.$router.push({ path: '/numsGoodsShelves/settlementManagement/list' })
+      this.$router.push({ name: 'settlementManagementList' })
     },
+    // 下单时间选择
     orderDateChange (date) {
-      console.log(date, date)
       this.orderDate = date
       this.queryParam.orderBeginDate = date[0] || ''
       this.queryParam.orderEndDat = date[1] || ''
     },
+    // 取货时间选择
     dateChange (date) {
       this.time = date
       this.queryParam.outBeginDate = date[0] ? moment(date[0]).format('YYYY-MM-DD') : ''
       this.queryParam.outEndDate = date[1] ? moment(date[1]).format('YYYY-MM-DD') : ''
     },
+    // 获取授信数据
     getPageInfo () {
       this.spinning = true
       const info = JSON.parse(sessionStorage.getItem('settlementDetail'))
       merchantCashOut({ shelfSn: this.$route.params.shelfSn }).then(res => {
-        console.log(res, info, '===========')
         if (res.status == 200) {
           this.total = res.data
           this.total.creditLimit = info.creditLimit
@@ -188,6 +190,7 @@ export default {
         this.spinning = false
       })
     },
+    // 获取统计数据
     getCount (val) {
       queryOrderBillDetailCount(val).then(res => {
         if (res.status == 200) {
@@ -211,6 +214,7 @@ export default {
       this.$refs.orderDate.resetDate(this.orderDate)
       this.$refs.table.refresh(true)
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.getPageInfo()
@@ -218,6 +222,7 @@ export default {
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - (this.$route.params.settleType == 'CREDIT' ? 415 : 300)
@@ -240,12 +245,12 @@ export default {
 </script>
 
 <style lang="less">
-  .goodsAllocationSet-page{
+  .unSettlement-page{
     position: relative;
     height: 100%;
     padding-bottom: 51px;
     box-sizing: border-box;
-    .goodsAllocationSet-baseInfo{
+    .unSettlement-baseInfo{
       margin-bottom: 10px;
     }
     .bzj-collapse{