chenrui 1 год назад
Родитель
Сommit
df4e220e05

+ 13 - 2
src/config/router.config.js

@@ -937,7 +937,18 @@ export const asyncRouterMap = [
                 name: 'purchaseReturnEdit',
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue'),
                 meta: {
-                  title: '编辑采购退货',
+                  title: '编辑采购退货(不抓单)',
+                  icon: 'gold',
+                  hidden: true,
+                  permission: 'B_purchaseReturnEdit'
+                }
+              },
+              {
+                path: 'editGrab',
+                name: 'purchaseReturnEditGrab',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue'),
+                meta: {
+                  title: '编辑采购退货(抓单)',
                   icon: 'gold',
                   hidden: true,
                   permission: 'B_purchaseReturnEdit'
@@ -3420,7 +3431,7 @@ export const asyncRouterMap = [
                 meta: {
                   title: '实时销售看板'
                 }
-              },
+              }
             ]
           },
           {

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/detailModal.vue

@@ -109,7 +109,7 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '7%', align: 'center' },
-        { title: '关联单号', dataIndex: 'sparePartsNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', dataIndex: 'sparePartsNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'product.unit', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 100 - 96
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -20,19 +20,19 @@
                 <supplier v-model="queryParam.supplierSn" isPermission placeholder="请输入供应商名称"></supplier>
               </a-form-item>
             </a-col>
-          <template v-if="advanced">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="退货原因">
-                <v-select
-                  v-model="queryParam.returnReason"
-                  ref="returnReason"
-                  id="purchaseReturn-returnReason"
-                  code="SPARE_PARTS_RETURN_REASON"
-                  placeholder="请选择退货原因"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24" v-show="isShowWarehouse">
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="退货原因">
+                  <v-select
+                    v-model="queryParam.returnReason"
+                    ref="returnReason"
+                    id="purchaseReturn-returnReason"
+                    code="SPARE_PARTS_RETURN_REASON"
+                    placeholder="请选择退货原因"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
                 <a-form-item label="退货仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
@@ -42,18 +42,18 @@
                   />
                 </a-form-item>
               </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="purchaseReturn-state"
-                  code="SPARE_PARTS_RETURN_STATE"
-                  placeholder="请选择审核状态"
-                  allowClear
-                ></v-select>
-              </a-form-item>
-            </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="purchaseReturn-state"
+                    code="SPARE_PARTS_RETURN_STATE"
+                    placeholder="请选择审核状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -78,11 +78,11 @@
         </a-form>
       </div>
     </a-card>
-  <a-card size="small" :bordered="false" class="bulkWarehousingOrderList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button v-if="$hasPermissions('B_purchaseReturnAdd')" id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+    <a-card size="small" :bordered="false" class="bulkWarehousingOrderList-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button v-if="$hasPermissions('B_purchaseReturnAdd')" id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
         <!-- <a-button
           style="margin-left: 10px"
           type="primary"
@@ -91,74 +91,74 @@
           :disabled="disabled"
           :loading="exportLoading"
         >同步到ERP</a-button> -->
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+70+'px' }"
-        size="small"
-        :rowKey="(record) => record.sparePartsReturnNo"
-        :columns="columns"
-        :data="loadData"
-        :pageSize="30"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 采购退货单号 -->
-        <template slot="sparePartsReturnNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_purchaseReturnDetail')" class="link-bule" @click="handleDetail(record)">{{ record.sparePartsReturnNo }}</span>
-          <span v-else>{{ record.sparePartsReturnNo }}</span>
-        </template>
-        <!-- 操作 -->
-        <!-- state 待提交 WAIT_SUBMIT 待审核 WAIT_AUDIT 已完结 FINISH 审核不通过 AUDIT_REJECT -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            v-if="$hasPermissions('B_purchaseReturnEdit') && record.state == 'WAIT_SUBMIT'"
-            @click="handleEdit(record)"
-            class="button-info"
-            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-warning"
-            @click="handleSH(record)"
-            v-if="$hasPermissions('B_purchaseReturnRate') && record.state !='WAIT_SUBMIT'"
-            id="allocateBillList-examine-btn">审核进度</a-button>
-          <!-- <a-button
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+70+'px' }"
+          size="small"
+          :rowKey="(record) => record.sparePartsReturnNo"
+          :columns="columns"
+          :data="loadData"
+          :pageSize="30"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 采购退货单号 -->
+          <template slot="sparePartsReturnNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_purchaseReturnDetail')" class="link-bule" @click="handleDetail(record)">{{ record.sparePartsReturnNo }}</span>
+            <span v-else>{{ record.sparePartsReturnNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <!-- state 待提交 WAIT_SUBMIT 待审核 WAIT_AUDIT 已完结 FINISH 审核不通过 AUDIT_REJECT -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="$hasPermissions('B_purchaseReturnEdit') && record.state == 'WAIT_SUBMIT'"
+              @click="handleEdit(record)"
+              class="button-info"
+              id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-warning"
+              @click="handleSH(record)"
+              v-if="$hasPermissions('B_purchaseReturnRate') && record.state !='WAIT_SUBMIT'"
+              id="allocateBillList-examine-btn">审核进度</a-button>
+            <!-- <a-button
             size="small"
             type="link"
             v-if="record.state == 'FINISH'"
             @click="handleEdit(record)"
             class="button-info"
             id="bulkWarehousingOrderList-edit-btn">同步到ERP</a-button> -->
-          <a-button
-            size="small"
-            type="link"
-            v-if="$hasPermissions('B_purchaseReturnSubmit') && record.state == 'AUDIT_REJECT'"
-            @click="handleResubmit(record)"
-            class="button-info"
-            id="bulkWarehousingOrderList-edit-btn">再次提交</a-button>
-          <a-button
-            size="small"
-            type="link"
-            v-if="$hasPermissions('B_purchaseReturnDel') && record.state == 'WAIT_SUBMIT'"
-            @click="handleDel(record)"
-            class="button-error"
-            id="bulkWarehousingOrderList-del-btn">删除</a-button>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 新增、详情弹窗-->
-    <add-modal v-drag :openModal="openModal" @ok="handleOk" @close="openModal=false" />
-    <detailModal v-drag :openModal="openDetailModal" :itemSn="itemSn" @close="closeDetailModal" />
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    <!-- 审核进度弹窗 -->
-    <reviewProgressModal v-drag :itemSn="itemSnSh" :auditTime="auditTime" :openModal="openReviewModal" @close="openReviewModal=false"></reviewProgressModal>
-  </a-card>
+            <a-button
+              size="small"
+              type="link"
+              v-if="$hasPermissions('B_purchaseReturnSubmit') && record.state == 'AUDIT_REJECT'"
+              @click="handleResubmit(record)"
+              class="button-info"
+              id="bulkWarehousingOrderList-edit-btn">再次提交</a-button>
+            <a-button
+              size="small"
+              type="link"
+              v-if="$hasPermissions('B_purchaseReturnDel') && record.state == 'WAIT_SUBMIT'"
+              @click="handleDel(record)"
+              class="button-error"
+              id="bulkWarehousingOrderList-del-btn">删除</a-button>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 新增、详情弹窗-->
+      <add-modal v-drag :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+      <detailModal v-drag :openModal="openDetailModal" :itemSn="itemSn" @close="closeDetailModal" />
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+      <!-- 审核进度弹窗 -->
+      <reviewProgressModal v-drag :itemSn="itemSnSh" :auditTime="auditTime" :openModal="openReviewModal" @close="openReviewModal=false"></reviewProgressModal>
+    </a-card>
   </div>
 </template>
 
@@ -225,7 +225,7 @@ export default {
   },
   computed: {
     columns () {
-      let _this=this
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -237,8 +237,8 @@ export default {
         { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
-      if(this.isShowWarehouse){
-        arr.splice(5,0,{ title: '退货仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },)
+      if (this.isShowWarehouse) {
+        arr.splice(5, 0, { title: '退货仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       if (this.$hasPermissions('M_purchaseReturnList_costPrice')) { //  售价权限
         arr.splice(7, 0, { title: '退货金额', dataIndex: 'totalCost', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -275,7 +275,11 @@ export default {
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: 'purchaseReturnEdit', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+      if (row.grabFlag == 0) {
+        this.$router.push({ name: 'purchaseReturnEdit', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+      } else {
+        this.$router.push({ name: 'purchaseReturnEditGrab', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+      }
     },
     // 审核进度
     handleSH (row) {

+ 2 - 2
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -67,7 +67,7 @@
             <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
               <a-row :gutter="15">
                 <a-col :md="6" :sm="24">
-                  <a-form-item label="关联单号"><a-input v-model.trim="productForm.sparePartsNo" allowClear placeholder="请输入关联单号" /></a-form-item>
+                  <a-form-item label="入库单号"><a-input v-model.trim="productForm.sparePartsNo" allowClear placeholder="请输入入库单号" /></a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="产品编码"><a-input v-model.trim="productForm.productCode" allowClear placeholder="请输入产品编码" /></a-form-item>
@@ -209,7 +209,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
         {
-          title: '关联单号',
+          title: '入库单号',
           dataIndex: 'sparePartsNo',
           width: '18%',
           align: 'center',

+ 8 - 6
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -6,8 +6,8 @@
         <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
-              <a-form-item label="关联单号">
-                <a-input id="salesReturnList-productCode" v-model.trim="queryParam.sparePartsNo" allowClear placeholder="请输入关联单号"/>
+              <a-form-item label="入库单号">
+                <a-input id="salesReturnList-productCode" v-model.trim="queryParam.sparePartsNo" allowClear placeholder="请输入入库单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -34,9 +34,11 @@
                 <a-button type="primary" style="margin-right: 5px" @click="handleBatchAdd" :loading="addMoreLoading">批量添加</a-button>
                 <span v-if="selNums&&selNums!=0" style="margin:0 10px;">已选中{{ selNums }}项</span>
               </div>
-            <!--  <a-checkbox @change="onChange" :checked="isChecked">
-                显示最大可退数量为0的产品
-              </a-checkbox> -->
+              <div v-if="queryParam.grabFlag==1">
+                <a-checkbox @change="onChange" :checked="isChecked">
+                  显示最大可退数量为0的产品
+                </a-checkbox>
+              </div>
             </a-col>
           </a-row>
         </a-form>
@@ -153,7 +155,7 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '关联单号', dataIndex: 'sparePartsNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', dataIndex: 'sparePartsNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'product.code', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'product.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },