浏览代码

完善id和注释

lilei 11 月之前
父节点
当前提交
ca56703262

+ 1 - 1
public/version.json

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

+ 3 - 1
src/views/purchasingManagement/purchaseOutOfStock/detailModal.vue

@@ -71,7 +71,7 @@ export default {
       type: Boolean,
       default: false
     },
-    objItem: {
+    objItem: { // 当前数据
       type: Object,
       default: () => {
         return {}
@@ -79,9 +79,11 @@ export default {
     }
   },
   computed: {
+    // 标题
     modalTit () {
       return '详情'
     },
+    // 列
     columns () {
       const _this = this
       const arr = [

+ 15 - 12
src/views/purchasingManagement/purchaseOutOfStock/list.vue

@@ -107,19 +107,19 @@ export default {
     return {
       spinning: false,
       queryParam: { //  查询条件
-        beginDate: undefined,
-        endDate: undefined,
-        purchaseTargetSn: undefined,
-        purchaseTargetType: undefined,
-        purchaseBillNo: ''
+        beginDate: undefined, // 开始时间
+        endDate: undefined, // 结束时间
+        purchaseTargetSn: undefined, // 供应商
+        purchaseTargetType: undefined, // 供应商类型
+        purchaseBillNo: '' // 采购编号
       },
-      supplierList: [],
+      supplierList: [], // 供应商列表
       detailObj: undefined, // 详情统计内容
-      openModal: false,
+      openModal: false, // 详情弹框
       disabled: false, //  查询、重置按钮是否可操作
-      tableHeight: 0,
-      time: [],
-      countData: null,
+      tableHeight: 0, // 表格高度
+      time: [], // 时间默认值
+      countData: null, // 统计数据
       exportLoading: false, // 导出loading
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -170,7 +170,7 @@ export default {
         }
       })
     },
-    // 供应商change
+    // 选择供应商change
     tragetTypeChange (val) {
       const ind = this.supplierList.findIndex(item => item.purchaseTargetSn == val)
       if (ind != -1) {
@@ -180,6 +180,7 @@ export default {
         this.queryParam.purchaseTargetType = undefined
       }
     },
+    // 供应商名称筛选
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -233,6 +234,7 @@ export default {
         _this.$refs.outOfStockDetail.pageInit()
       })
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -241,9 +243,10 @@ export default {
       _this.resetSearchForm()
       _this.getSupperList()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 240
     }
   },
   watch: {

+ 12 - 7
src/views/purchasingManagement/purchaseReturnApplyForm/chooseImportModal.vue

@@ -85,8 +85,8 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      loadData: [],
-      unLoadData: [],
+      loadData: [], // 正确数据
+      unLoadData: [], // 错误数据
       loading: false
     }
   },
@@ -97,9 +97,10 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'product.unit', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', dataIndex: 'exprotQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'exprotQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
-      if(this.paramsData&&this.paramsData.goodFlag != 1){
+      // 显示退货原因
+      if (this.paramsData && this.paramsData.goodFlag != 1) {
         arr.push({ title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       arr.push({ title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } })
@@ -111,9 +112,10 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'product.unit', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', dataIndex: 'exprotQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'exprotQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
-      if(this.paramsData&&this.paramsData.goodFlag != 1){
+      // 显示退货原因
+      if (this.paramsData && this.paramsData.goodFlag != 1) {
         arr.push({ title: '退货原因', dataIndex: 'returnReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       arr.push({ title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } })
@@ -122,6 +124,7 @@ export default {
     }
   },
   methods: {
+    // 获取导入数据
     getData () {
       const _this = this
       this.loading = true
@@ -130,6 +133,7 @@ export default {
       purchaseReturnApplyReadExcel(params).then(res => {
         this.loading = false
         if (res.status == 200) {
+          // 正确列表数据
           if (res.data.successList && res.data.successList.length > 0) {
             res.data.successList.map((item, index) => {
               item.no = index + 1
@@ -137,6 +141,7 @@ export default {
               item.purchaseReturnApplySn = this.paramsData.purchaseReturnApplySn
             })
           }
+          // 错误数据
           if (res.data.failList && res.data.failList.length > 0) {
             res.data.failList.map((item, index) => {
               item.no = index + 1
@@ -162,7 +167,7 @@ export default {
         this.isShow = false
       }
     },
-    // 导出
+    // 导出错误项
     handleError () {
       const _this = this
       if (_this.unLoadData.length < 1) {

+ 10 - 7
src/views/purchasingManagement/purchaseReturnApplyForm/creatPurchaseReutn.vue

@@ -18,22 +18,22 @@
             <div style="width:80%;padding-top:5px;">
               <a-row>
                 <a-col :span="6">
-                  <a-checkbox :value="1" @change="onChange" :checked="syncStep.indexOf(1)>=0">
+                  <a-checkbox id="creatPurchaseReutn-tb-1" :value="1" @change="onChange" :checked="syncStep.indexOf(1)>=0">
                     同步提交 >
                   </a-checkbox>
                 </a-col>
                 <a-col :span="6">
-                  <a-checkbox :value="2" @change="onChange" :checked="syncStep.indexOf(2)>=0">
+                  <a-checkbox id="creatPurchaseReutn-tb-2" :value="2" @change="onChange" :checked="syncStep.indexOf(2)>=0">
                     同步审核 >
                   </a-checkbox>
                 </a-col>
                 <a-col :span="6">
-                  <a-checkbox :value="3" @change="onChange" :checked="syncStep.indexOf(3)>=0">
+                  <a-checkbox id="creatPurchaseReutn-tb-3" :value="3" @change="onChange" :checked="syncStep.indexOf(3)>=0">
                     同步出库 >
                   </a-checkbox>
                 </a-col>
                 <a-col :span="6">
-                  <a-checkbox :value="4" @change="onChange" :checked="syncStep.indexOf(4)>=0">
+                  <a-checkbox id="creatPurchaseReutn-tb-4" :value="4" @change="onChange" :checked="syncStep.indexOf(4)>=0">
                     同步收款
                   </a-checkbox>
                 </a-col>
@@ -76,7 +76,7 @@ export default {
       type: Boolean,
       default: false
     },
-    paramsData: {
+    paramsData: { // 参数
       type: Object,
       default: () => {
         return {}
@@ -88,11 +88,12 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       disabled: false, //  查询、重置按钮是否可操作
       spinning: false,
-      detail: null,
-      syncStep: []
+      detail: null, // 详情数据
+      syncStep: [] // 同步选项
     }
   },
   methods: {
+    // 选择同步选项
     onChange (e) {
       this.syncStep = []
       const checked = e.target.checked
@@ -101,6 +102,7 @@ export default {
         this.syncStep.push(i)
       }
     },
+    // 设置详情
     setData (data) {
       this.detail = data
     },
@@ -113,6 +115,7 @@ export default {
       this.spinning = true
       createPurchaseReturnBill(params).then(res => {
         if (res.status == 200) {
+          // 产品库存不足
           if (res.data && res.data.length) {
             this.$info({
               title: '以下产品库存不足',

+ 3 - 2
src/views/purchasingManagement/purchaseReturnApplyForm/detail.vue

@@ -46,7 +46,7 @@
             </a-alert>
             <div v-if="basicInfoData&&basicInfoData.removeQty" style="margin-bottom:10px;display:flex;align-items:center;">
               <div>总公司删除产品明细:共 {{ basicInfoData.removeQty||'--' }} 款产品,{{ basicInfoData.removeCode&&basicInfoData.removeCode.replace(',','、') }}。</div>
-              <a-button @click="exportDelProduct" type="link">导出删除产品明细</a-button>
+              <a-button id="purchaseReturnDetail-export-btn" @click="exportDelProduct" type="link">导出删除产品明细</a-button>
             </div>
             <!-- 列表 -->
             <s-table
@@ -85,7 +85,7 @@ export default {
   data () {
     return {
       spinning: false,
-      dataSource: [],
+      dataSource: [], // 列表数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -123,6 +123,7 @@ export default {
         { title: '备注', dataIndex: 'returnReasonRemarks', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总公司变更详情', dataIndex: 'modifyInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(9, 0, { title: '退货单价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
         arr.splice(10, 0, { title: '退货金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })

+ 64 - 50
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -38,8 +38,8 @@
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnEdit-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form>
@@ -66,7 +66,7 @@
               <template slot="returnQty" slot-scope="text, record">
                 <a-input-number
                   size="small"
-                  id="purchaseReturnEdit-returnQty"
+                  :id="'purchaseReturnEdit-returnQty-'+record.id"
                   v-model="record.returnQty"
                   :precision="0"
                   :min="1"
@@ -76,7 +76,7 @@
               </template>
               <!-- 退货原因 -->
               <template slot="returnReason" slot-scope="text, record">
-                <returnReason :goodFlag="goodFlag" v-model="record.returnReasonCode"></returnReason>
+                <returnReason :id="'purchaseReturnEdit-goodFlag-'+record.id" :goodFlag="goodFlag" v-model="record.returnReasonCode"></returnReason>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
@@ -87,7 +87,8 @@
                   type="link"
                   class="button-primary"
                   @click="handleAdd(record)"
-                  id="purchaseReturnEdit-add-btn">添加</a-button>
+                  :id="'purchaseReturnEdit-add-'+record.id"
+                >添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -113,17 +114,17 @@
                   <a-row :gutter="15">
                     <a-col :md="6" :sm="24">
                       <a-form-item label="产品编码" prop="productCode">
-                        <a-input id="purchaseReturnEdit-productCode" v-model.trim="chooseParam.productCode" placeholder="请输入产品编码" allowClear />
+                        <a-input id="purchaseReturnEdit-cp-productCode" v-model.trim="chooseParam.productCode" placeholder="请输入产品编码" allowClear />
                       </a-form-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
                       <a-form-item label="产品名称" prop="productName">
-                        <a-input id="purchaseReturnEdit-productName" v-model.trim="chooseParam.productName" placeholder="请输入产品名称" allowClear />
+                        <a-input id="purchaseReturnEdit-cp-productName" v-model.trim="chooseParam.productName" placeholder="请输入产品名称" allowClear />
                       </a-form-item>
                     </a-col>
                     <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
-                      <a-button style="margin-left: 8px" @click="resetChooseForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
+                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="purchaseReturnEdit-cp-refresh">查询</a-button>
+                      <a-button style="margin-left: 8px" @click="resetChooseForm" :disabled="disabled" id="purchaseReturnEdit-cp-reset">重置</a-button>
                     </a-col>
                   </a-row>
                 </a-form>
@@ -133,7 +134,7 @@
                 <a-button v-if="editGoodFlag" type="default" style="margin-right: 10px;" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
                 <a-button
                   type="primary"
-                  id="purchaseReturnEdit-import-btn"
+                  id="purchaseReturnEdit-cp-import-btn"
                   class="button-info"
                   @click="openGuideModal = true"
                 >导入产品</a-button>
@@ -141,7 +142,7 @@
                   type="primary"
                   ghost
                   class="button-error"
-                  id="purchaseReturnEdit-delAll-btn"
+                  id="purchaseReturnEdit-cp-delAll-btn"
                   :disabled="dataSource.length == 0"
                   @click.stop="handleDel('', 'all')"
                 >清空列表</a-button>
@@ -170,7 +171,7 @@
               <template slot="qty" slot-scope="text, record">
                 <a-input-number
                   size="small"
-                  id="purchaseReturnEdit-qty"
+                  :id="'purchaseReturnEdit-cp-qty-'+record.id"
                   v-model="record.initQty"
                   :precision="0"
                   :min="1"
@@ -180,15 +181,21 @@
               </template>
               <!-- 退货原因 -->
               <template slot="returnReason" slot-scope="text, record">
-                <returnReason :goodFlag="goodFlag" v-model="record.returnReasonCode" @change="e => returnReasonChange(e, record, 0)"></returnReason>
+                <returnReason :id="'purchaseReturnEdit-cp-goodFlag-'+record.id" :goodFlag="goodFlag" v-model="record.returnReasonCode" @change="e => returnReasonChange(e, record, 0)"></returnReason>
               </template>
               <!-- 备注 -->
               <template slot="returnRemarks" slot-scope="text, record">
-                <a-input size="small" placeholder="请输入备注(最多50字符)" :maxLength="50" v-model="record.returnReasonRemarks" @blur="e => returnReasonChange(e, record, 1)"></a-input>
+                <a-input
+                  :id="'purchaseReturnEdit-cp-remarks-'+record.id"
+                  size="small"
+                  placeholder="请输入备注(最多50字符)"
+                  :maxLength="50"
+                  v-model="record.returnReasonRemarks"
+                  @blur="e => returnReasonChange(e, record, 1)"></a-input>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="purchaseReturnEdit-del-btn">删除</a-button>
+                <a-button :id="'purchaseReturnEdit-cp-del-'+record.id" size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -198,7 +205,7 @@
     <a-card size="small" :bordered="false" class="affix-cont">
       <a-button
         type="primary"
-        id="purchaseReturnEdit-submit"
+        id="purchaseReturnEdit-cp-submit"
         size="large"
         :disabled="spinning"
         class="button-primary"
@@ -219,14 +226,14 @@
       <div style="text-align: left;">
         <div style="line-height: 24px;">
           <div><span style="color:red;">*</span>退货原因</div>
-          <div><returnReason size="large" :goodFlag="goodFlag" v-model="plReturnReason"></returnReason></div>
+          <div><returnReason id="purchaseReturnEdit-goodFlag-modal" size="large" :goodFlag="goodFlag" v-model="plReturnReason"></returnReason></div>
         </div>
         <div style="line-height: 24px;margin-top:10px;">
-          <a-checkbox :checked="showEditRemarks" @change="e => showEditRemarks=!showEditRemarks">是否设置备注</a-checkbox>
+          <a-checkbox id="purchaseReturnEdit-showEdit-modal" :checked="showEditRemarks" @change="e => showEditRemarks=!showEditRemarks">是否设置备注</a-checkbox>
         </div>
         <div style="line-height: 24px;margin-top:10px;" v-if="showEditRemarks">
           <div>备注</div>
-          <div><a-input size="large" :maxLength="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
+          <div><a-input id="purchaseReturnEdit-remarks-modal" size="large" :maxLength="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
         </div>
       </div>
     </commonModal>
@@ -264,15 +271,15 @@ export default {
     return {
       spinning: false,
       queryParam: {
-        code: '',
-        name: '',
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined
+        code: '', // 编码
+        name: '', // 名称
+        productTypeSn1: undefined, // 分类1
+        productTypeSn2: undefined, // 分类2
+        productTypeSn3: undefined // 分类3
       },
-      productType: [],
-      dataSource: [],
-      returnReasonlist: [],
+      productType: [], // 分类默认值
+      dataSource: [], // 列表数据
+      returnReasonlist: [], // 退货原因
       disabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
       openGuideModal: false, // 导入产品弹框
@@ -280,7 +287,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.queryParam.sysFlag = '1' // 剪冠产品
-        this.queryParam.onlineFalg = this.goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : undefined
+        this.queryParam.onlineFalg = this.goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : undefined // 上线标志,根据 良品or坏品
         return queryDealerScopeProductPage(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -294,9 +301,10 @@ export default {
           return data
         })
       },
+      // 已选产品
       chooseParam: {
-        productCode: '',
-        productName: ''
+        productCode: '', // 产品编码
+        productName: '' // 产品名称
       },
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
@@ -312,15 +320,16 @@ export default {
           return data
         })
       },
-      detailData: null,
-      rowSelectionInfo: null,
-      plReturnReason: undefined,
-      plReturnRemark: undefined,
-      showEditRemarks: false,
-      showPlModal: false
+      detailData: null, // 详情信息
+      rowSelectionInfo: null, // 已勾选数据
+      plReturnReason: undefined, // 批量退货原因
+      plReturnRemark: undefined, // 批量退货备注
+      showEditRemarks: false, // 是否修改备注
+      showPlModal: false // 批量修改弹框
     }
   },
   watch: {
+    // 监听批量退货原因
     showPlModal (newValue, oldValue) {
       if (!newValue) {
         this.plReturnReason = undefined
@@ -330,40 +339,47 @@ export default {
     }
   },
   computed: {
+    // 已选条数
     selNums () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
     },
+    // 良品or坏品
     goodFlag () {
       return this.detailData && this.detailData.goodFlag || ''
     },
+    // 是否编辑退货原因
     editGoodFlag () {
       return this.detailData && this.detailData.goodFlag == 'DEFECTIVE_PRODUCT_RETURN'
     },
+    // 列定义
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', width: this.editGoodFlag ? '20%':'30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'name', width: this.editGoodFlag ? '20%' : '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '20%', align: 'center' },
         { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' }
       ]
-      if(this.editGoodFlag){
+      // 可编辑退货原因
+      if (this.editGoodFlag) {
         arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
       }
       arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
       return arr
     },
+    // 已选表格列
     chooseColumns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: this.editGoodFlag ? '20%':'30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'product.name', width: this.editGoodFlag ? '20%' : '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '17%', align: 'center' },
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' }
       ]
-      if(this.editGoodFlag){
+      // 可编辑退货原因
+      if (this.editGoodFlag) {
         arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
       }
       arr.push({ title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' })
@@ -372,7 +388,7 @@ export default {
     }
   },
   methods: {
-    //  返回列表
+    // 返回列表
     handleBack () {
       this.$router.push({ name: 'purchaseReturnApplyFormList' })
     },
@@ -406,13 +422,13 @@ export default {
         this.spinning = false
       })
     },
-    //  产品分类  change
+    // 产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  重置产品列表
+    // 重置产品列表
     resetSearchForm () {
       this.queryParam.code = ''
       this.queryParam.name = ''
@@ -451,15 +467,13 @@ export default {
         }
       })
     },
-    // 导入明细
-    handleImport () {},
     // 重置已选产品列表
     resetChooseForm () {
       this.chooseParam.productCode = ''
       this.chooseParam.productName = ''
       this.$refs.chooseTable.refresh(true)
     },
-    //  删除
+    //  删除产品,isAll: true 全部清空,false 单个删除
     handleDel (row, isAll) {
       const _this = this
       if (this.dataSource.length == 0) {
@@ -478,7 +492,6 @@ export default {
           fun(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              // _this.$refs.table.refresh()
               _this.$refs.chooseTable.refresh()
               _this.spinning = false
               _this.getDetail()
@@ -535,9 +548,8 @@ export default {
         })
       }
     },
-    // 已选产品 退货原因修改
+    // 已选产品 退货原因、备注修改
     returnReasonChange (val, record, type) {
-      console.log(val, record, type)
       const params = {
         purchaseReturnApplyDetailSn: record.purchaseReturnApplyDetailSn,
         purchaseReturnApplySn: this.$route.params.sn,
@@ -568,7 +580,7 @@ export default {
         this.spinning = false
       })
     },
-    // 批量设置退货原因
+    // 批量设置退货原因弹框
     openPlSetReason () {
       if (this.selNums) {
         this.showPlModal = true
@@ -576,6 +588,7 @@ export default {
         this.$message.warning('请先选择产品!')
       }
     },
+    // 批量设置
     setPlReturnReason () {
       if (!this.plReturnReason) {
         this.$message.warning('请选择退货原因!')
@@ -623,6 +636,7 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       this.getDetail(true)
     }

+ 8 - 8
src/views/purchasingManagement/purchaseReturnApplyForm/importGuideModal.vue

@@ -15,10 +15,10 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“申请退货数量”、{{goodFlag==1?'':'“退货原因”、'}}“备注”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“申请退货数量”、{{ goodFlag==1?'':'“退货原因”、' }}“备注”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
             <li>2) 如果导入的产品已经存在,则不会导入该行</li>
             <li>
-              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+              <a :href="filePath" style="margin: 5px 0 0;display: block;" id="importGuide-tpl">
                 <a-icon type="download" style="padding-right: 5px;" />下载导入模板
               </a>
             </li>
@@ -77,12 +77,12 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default: null
     },
-    goodFlag: {
-      type: [String,Number],
+    goodFlag: { // 良品or坏品
+      type: [String, Number],
       default: ''
     }
   },
@@ -134,7 +134,7 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
+    }
   },
   watch: {
     //  父页面传过来的弹框状态
@@ -146,8 +146,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetSearchForm()
-      }else{
-        this.filePath = location.protocol + '//' +location.host + (this.goodFlag==1 ? '/templ/采购退货申请单(其它)产品明细模板.xlsx' : '/templ/采购退货申请单(不良品)产品明细模板.xlsx')
+      } else {
+        this.filePath = location.protocol + '//' + location.host + (this.goodFlag == 1 ? '/templ/采购退货申请单(其它)产品明细模板.xlsx' : '/templ/采购退货申请单(不良品)产品明细模板.xlsx')
       }
     }
   }

+ 25 - 16
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="purchaseReturnList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -54,14 +54,14 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客服审核时间">
-                  <rangeDate ref="auditDate" :value="auditTime" @change="auditDateChange" />
+                  <rangeDate id="purchaseReturnList-auditTime" ref="auditDate" :value="auditTime" @change="auditDateChange" />
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px" id="purchaseReturnList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -71,7 +71,7 @@
       </div>
       <!-- 操作按钮 -->
       <div class="table-operator" v-if="$hasPermissions('B_purchaseReturnApplyNew')">
-        <a-button id="purchaseReturnList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="purchaseReturnList-add-btn" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -87,7 +87,7 @@
         bordered>
         <!-- 采退单号 -->
         <template slot="purchaseReturnApplyNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_purchaseReturnApplyDetail')" @click="handleDetail(record)">{{ record.purchaseReturnApplyNo }}</span>
+          <span class="table-td-link" :id="'purchaseReturnList-add-'+record.id" v-if="$hasPermissions('B_purchaseReturnApplyDetail')" @click="handleDetail(record)">{{ record.purchaseReturnApplyNo }}</span>
           <span v-else>{{ record.purchaseReturnApplyNo }}</span>
           <a-badge count="改" :number-style="{ zoom:'80%',marginLeft:'5px' }" v-if="record.changeFlag=='1'"></a-badge>
         </template>
@@ -98,6 +98,7 @@
               size="small"
               type="link"
               class="button-primary"
+              :id="'purchaseReturnList-edit-'+record.id"
               v-if="record.billStatus == 'WAIT_SUBMIT'&&$hasPermissions('B_purchaseReturnApplyEdit')"
               @click="handleEdit(record)"
             >编辑</a-button>
@@ -105,12 +106,14 @@
               size="small"
               type="link"
               class="button-error"
+              :id="'purchaseReturnList-del-'+record.id"
               v-if="record.billStatus == 'WAIT_SUBMIT'&&$hasPermissions('B_purchaseReturnApplyDel')"
               @click="handleDel(record)"
             >删除</a-button>
             <a-button
               size="small"
               type="link"
+              :id="'purchaseReturnList-creatApply-'+record.id"
               v-if="record.billStatus == 'FINISH'&&$hasPermissions('B_purchaseReturnApplyCreat')"
               @click="handleWarehouse(record)"
               class="button-primary"
@@ -118,6 +121,7 @@
             <a-button
               size="small"
               type="link"
+              :id="'purchaseReturnList-edit2-'+record.id"
               v-if="(record.billStatus == 'CANCEL'||record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_purchaseReturnApplyAsignEdit')"
               @click="handleFinishBill(record)"
               class="button-primary"
@@ -147,6 +151,7 @@
           <span style="color:red;">*</span>
           <span>退货类别:</span>
           <v-select
+            id="purchaseReturnList-goodFlag-btn"
             style="width:250px;"
             v-model="goodFlag"
             code="GOOD_FLAG"
@@ -173,27 +178,27 @@ export default {
   data () {
     return {
       spinning: false,
-      openTipsModal: false,
+      openTipsModal: false, // 新建采购退货申请单
       advanced: true, // 高级搜索 展开/关闭
-      openCpModal: false,
-      time: [
+      openCpModal: false, // 生成采购退货单
+      time: [ // 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
-      auditTime: [],
+      auditTime: [], // 审核时间默认值
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         purchaseReturnApplyNo: '', //  退货申请单号
         billStatus: undefined, //  业务状态
         billSource: undefined, // 单据来源
         goodFlag: undefined, // 退货类别
-        beginAuditDate: '', // 审核时间
-        endAuditDate: ''
+        beginAuditDate: '', // 审核开始时间
+        endAuditDate: '' // 审核结束时间
       },
-      goodFlag: 'DEFECTIVE_PRODUCT_RETURN',
+      goodFlag: 'DEFECTIVE_PRODUCT_RETURN', // 退货类别默认值
       disabled: false, //  查询、重置按钮是否可操作
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -301,10 +306,12 @@ export default {
         _this.openTipsModal = true
       }
     },
+    // 关闭新增弹框
     closeCreatModal () {
       this.openTipsModal = false
       this.goodFlag = 'DEFECTIVE_PRODUCT_RETURN'
     },
+    // 生成销售退货单成功
     creatReturnOrder () {
       const _this = this
       if (_this.goodFlag) {
@@ -316,6 +323,7 @@ export default {
             _this.openTipsModal = false
             // 重置查询条件
             _this.resetData()
+            // 进入编辑页面
             _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnApplySn } })
           } else {
             _this.spinning = false
@@ -351,6 +359,7 @@ export default {
       this.openCpModal = true
       this.$refs.creatPurchaseReutn.setData(row)
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -362,7 +371,6 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -389,6 +397,7 @@ export default {
         }
       }
     },
+    // 表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235

+ 17 - 19
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="purchaseOrderWarehousing-wrap">
+  <div class="signWarehouse-edit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
-          <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a id="signWarehouse-edit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span class="billno">
             单号:{{ (detail&&detail[0]&&detail[0].purchaseBillNo) ? detail[0].purchaseBillNo : '--' }}
             <span v-if="detail&&detail[0]&&detail[0].sendBillNo">(发货单号:{{ detail&&detail[0]&&detail[0].sendBillNo || '--' }})</span>
@@ -12,7 +12,7 @@
         </template>
       </a-page-header>
       <!-- 内容 -->
-      <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="purchaseOrderWarehousing-cont">
+      <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="signWarehouse-edit-cont">
         <!-- 总计 -->
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message" >
@@ -55,6 +55,7 @@
           <template slot="warehouseNum" slot-scope="text, record">
             <a-input-number
               size="small"
+              :id="'signWarehouse-edit-realPutQty-'+record.id"
               v-model="record.realPutQty"
               :disabled="!(item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT')"
               :precision="0"
@@ -74,7 +75,7 @@
               expand-trigger="hover"
               :options="warehouseCascadeData"
               :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-              id="purchaseOrderWarehousing-warehouseCascade"
+              :id="'signWarehouse-edit-warehouseCascade-'+record.id"
               placeholder="请选择仓库仓位"
               :allowClear="false"
               style="width: 100%;" />
@@ -95,7 +96,7 @@
             type="primary"
             class="button-primary"
             :disabled="spinning"
-            :id="'purchaseOrderWarehousing-warehousing-'+bindex"
+            :id="'signWarehouse-submit-warehousing-'+bindex"
             @click="handleWarehousing(item,bindex)"
             v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"
           >确认入库</a-button>
@@ -122,11 +123,11 @@ export default {
     return {
       spinning: false,
       detail: null, //  详情数据
-      productType: [],
+      productType: [], // 产品分类
       queryParam: {
-        productBrandSn: undefined,
-        queryWord: '',
-        brand: '',
+        productBrandSn: undefined, // 产品品牌
+        queryWord: '', // 关键词查询
+        brand: '', // 品牌名称
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '' //  产品三级分类
@@ -134,7 +135,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       warehouseCascadeData: [], //  仓库仓位
       defaultWarehouseCascade: [], //  默认仓库仓位
-      chooseLoadData: [],
+      chooseLoadData: [], // 已选数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -147,6 +148,7 @@ export default {
             data.list[i].realPutQty = data.list[i].realPutQty == undefined ? data.list[i].putQty : data.list[i].realPutQty
             data.list[i].shippedQty = data.list[i].realPutQty
             data.list[i].realPutAmount = data.list[i].realPutAmount == undefined ? data.list[i].discountedAmount : data.list[i].realPutAmount
+            // 仓库处理
             const warehouseSn = data.list[i].warehouseSn || undefined
             const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
             if (warehouseSn || warehouseLocationSn) {
@@ -185,6 +187,7 @@ export default {
         { title: '本次入库数量', scopedSlots: { customRender: 'warehouseNum' }, width: '8%', align: 'center' },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '14%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'unitPrice' } })
         arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', scopedSlots: { customRender: 'amount' } })
@@ -236,12 +239,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
+      this.$router.push({ name: 'signWarehousingList', query: { closeLastOldTab: true } })
     },
     //  详情
     getDetail () {
@@ -341,7 +339,6 @@ export default {
       }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          console.log(bindex, this.$refs)
           this.$refs['table-' + bindex][0].refresh()
           this.spinning = false
         } else {
@@ -349,6 +346,7 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       this.getDetail()
       this.getWarehouseCascade()
@@ -372,7 +370,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-  .purchaseOrderWarehousing-wrap{
+  .signWarehouse-edit-wrap{
     position: relative;
     height: 100%;
     >.ant-spin-nested-loading{
@@ -388,7 +386,7 @@ export default {
       font-weight: bold;
       margin: 0 15px;
     }
-    .purchaseOrderWarehousing-cont{
+    .signWarehouse-edit-cont{
       margin-top: 10px;
     }
     /deep/.ant-input-number-input{

+ 16 - 12
src/views/purchasingManagement/signWarehousing/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="signWarehousingList-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -36,7 +36,7 @@
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="signWarehousingList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="signWarehousingList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="signWarehousingList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -58,27 +58,28 @@
         bordered>
         <!-- 采购单号 -->
         <template slot="purchaseBillNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo || '--' }}</span>
+          <span class="table-td-link" :id="'signWarehousingList-detail-'+record.id" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo || '--' }}</span>
           <span v-else>{{ record.purchaseBillNo || '--' }}</span>
           <a-badge v-if="record.promotionFlag && record.promotionFlag==1" count="促" :number-style="{ backgroundColor: '#52c41a', zoom:'80%',marginLeft:'5px' }"></a-badge>
         </template>
         <!-- 发货单号 -->
         <template slot="sendBillNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_signWarehousingDetail')" @click="handleStockDetail(record)">{{ record.sendBillNo || '--' }}</span>
+          <span class="table-td-link" :id="'signWarehousingList-sendBillNo-'+record.id" v-if="$hasPermissions('B_signWarehousingDetail')" @click="handleStockDetail(record)">{{ record.sendBillNo || '--' }}</span>
           <span v-else>{{ record.sendBillNo || '--' }}</span>
         </template>
-        <!-- 审核 -->
+        <!-- 审核icon -->
         <template slot="audit" slot-scope="text, record">
           <stateIcon :title="record.auditStateDictValue" v-if="record.auditState!='PUT_WAREHOUSE_AUDIT_REJECT'" :state="record.auditState == 'FINISH'?'1':'2'"></stateIcon>
           <stateIcon :title="record.auditStateDictValue" v-else :state="0"></stateIcon>
         </template>
-        <!-- 入库 -->
+        <!-- 入库icon -->
         <template slot="waitIn" slot-scope="text, record">
           <stateIcon :title="record.auditStateDictValue" :state="record.auditState == 'FINISH'?'1':'2'"></stateIcon>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
+            :id="'signWarehousingList-inStock-'+record.id"
             size="small"
             type="link"
             class="button-primary"
@@ -107,7 +108,7 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      time: [
+      time: [ // 时间默认值
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
       ],
@@ -116,10 +117,10 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         purchaseBillNo: '', //  采购单号
         sendBillNo: '', //  发货单号
-        auditState: undefined
+        auditState: undefined //  审核状态
       },
       disabled: false, //  查询、重置按钮是否可操作
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -155,6 +156,7 @@ export default {
         { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '发货金额', dataIndex: 'totalPutAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
         arr.splice(6, 0, { title: '入库金额', dataIndex: 'totalRealPutAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -180,22 +182,24 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/purchasingManagement/purchaseOrder/detail/${row.purchaseBillSn}`, query: { pageType: 'signWarehousingList' } })
+      this.$router.push({ name: 'purchaseOrderDetail', params: { sn: row.purchaseBillSn }, query: { pageType: 'signWarehousingList' } })
     },
     // 备货单详情
     handleStockDetail (row) {
-      this.$router.push({ path: `/purchasingManagement/signWarehousing/stockOrderDetail/${row.receivingBillSn}` })
+      this.$router.push({ name: 'signWarehousingStockOrderDetail', params: { sn: row.receivingBillSn } })
     },
     //  签收入库
     handleWarehouse (row) {
-      this.$router.push({ path: `/purchasingManagement/signWarehousing/edit/${row.receivingBillSn}` })
+      this.$router.push({ name: 'signWarehousingEdit', params: { sn: row.receivingBillSn } })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 设置表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200

+ 4 - 4
src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue

@@ -12,7 +12,6 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <!-- <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print> -->
           <a-button
             key="1"
             type="primary"
@@ -96,7 +95,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { purchaseDetailPrint, purchaseDetailExport, purchaseExportDetail } from '@/api/purchase'
+import { purchaseDetailPrint, purchaseExportDetail } from '@/api/purchase'
 import { receivingDetailSn, receivingDetailList, receivingExport } from '@/api/receiving'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
@@ -128,7 +127,7 @@ export default {
         })
       },
       detail: null, //  详情数据
-      localDataSource: [],
+      localDataSource: [], // 列表原始数据
       printerType: 'NEEDLE' //  打印机类型
     }
   },
@@ -145,6 +144,7 @@ export default {
         { title: '本次发货数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次入库数量', dataIndex: 'realPutQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '10%', align: 'right', scopedSlots: { customRender: 'unitPrice' } })
         arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -156,7 +156,7 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
+      this.$router.push({ name: 'signWarehousingList', query: { closeLastOldTab: true } })
     },
     //  详情
     getDetail () {