Forráskód Böngészése

完善id和注释

lilei 1 éve
szülő
commit
f888e17347

+ 1 - 1
public/version.json

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

+ 4 - 2
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -96,7 +96,6 @@ export default {
     }
   },
   data () {
-    const _this = this
     return {
       spinning: false,
       unColumns: [
@@ -130,6 +129,7 @@ export default {
     }
   },
   computed: {
+    // 是否已经冲减
     isWriteDown () {
       return this.detailData && this.detailData.status == 'FINISH'
     },
@@ -148,6 +148,7 @@ export default {
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
         // { title: '成本小计', dataIndex: 'totalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
       	arr.splice(7, 0, { title: '成本价', dataIndex: 'cost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       	arr.splice(10, 0, { title: '成本小计', dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
@@ -158,7 +159,7 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      this.$router.push({ path: '/salesManagement/urgentItemsOffset/list' })
+      this.$router.push({ name: 'urgentItemsOffsetList' })
     },
     //  详情
     getDetail () {
@@ -182,6 +183,7 @@ export default {
           urgentWriteDown({ urgentBillSn: _this.outBizSn || _this.$route.params.sn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
+              // 刷新页面
               _this.getDetail()
               _this.$refs.table.refresh()
               _this.spinning = false

+ 20 - 15
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -7,12 +7,12 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="urgentItemsOffsetList-creatDate" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称">
-                <custList ref="custList" v-model="queryParam.buyerNameCurrent"></custList>
+                <custList id="urgentItemsOffsetList-custList" ref="custList" v-model="queryParam.buyerNameCurrent"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -42,7 +42,7 @@
                   <v-select
                     v-model="queryParam.status"
                     ref="status"
-                    id="chainTransferInList-status"
+                    id="urgentItemsOffsetList-status"
                     code="URGENT_STATUS"
                     placeholder="请选择状态"
                     allowClear></v-select>
@@ -52,7 +52,7 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="urgentItemsOffsetList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="urgentItemsOffsetList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="urgentItemsOffsetList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -74,7 +74,7 @@
         bordered>
         <!-- 单号 -->
         <template slot="urgentBillNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('M_urgentDetail')" @click="handleDetail(record)">{{ record.urgentBillNo }}</span>
+          <span class="table-td-link" :id="'urgentItemsOffsetDetail-view-'+record.id" v-if="$hasPermissions('M_urgentDetail')" @click="handleDetail(record)">{{ record.urgentBillNo }}</span>
           <span v-else>{{ record.urgentBillNo }}</span>
         </template>
         <!-- 状态 -->
@@ -89,7 +89,7 @@
             v-if="record.status == 'WAIT' && $hasPermissions('B_urgentWriteDown')"
             @click="handleWriteDown(record)"
             class="button-primary"
-            id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
+            :id="'urgentItemsOffsetDetail-writeDown-'+record.id">冲减</a-button>
           <span v-else>--</span>
         </template>
       </s-table>
@@ -99,12 +99,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import getDate from '@/libs/getDate.js'
 import { urgentList, urgentWriteDown } from '@/api/urgent'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import stateIcon from '@/views/common/stateIcon'
 import custList from '@/views/common/custList.vue'
-import getDate from '@/libs/getDate.js'
+
 export default {
   name: 'UrgentOffsetList',
   components: { STable, VSelect, rangeDate, custList, stateIcon },
@@ -112,15 +114,15 @@ export default {
   data () {
     return {
       spinning: false,
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       advanced: true, // 高级搜索 展开/关闭
-      time: [
+      time: [ // 创建时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         buyerNameCurrent: undefined, //  客户名称
         bizBillNo: '', //  关联单号
         urgentBillNo: '', //  急件单号
@@ -162,7 +164,7 @@ export default {
     }
   },
   methods: {
-    //  时间  change
+    //  创建时间选择
     dateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -188,7 +190,7 @@ export default {
         }
       })
     },
-    //  重置
+    //  重置列表
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
@@ -201,16 +203,18 @@ export default {
       this.$refs.custList.resetForm()
       this.$refs.table.refresh(true)
     },
-    //  详情
+    //  查看详情
     handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.urgentBillSn}` })
+      this.$router.push({ name: 'urgentItemsOffsetDetail', params: { sn: row.urgentBillSn } })
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
@@ -223,6 +227,7 @@ export default {
     }
   },
   watch: {
+    // 展开收起
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调