瀏覽代碼

Merge branch 'deploy_0804' of jianguan-web/qpls-md-html into master

陈瑞 3 年之前
父節點
當前提交
ab19db5032

+ 11 - 1
src/api/purchaseReturn.js

@@ -121,4 +121,14 @@ export const purchaseReturnDetailExport = params => {
     method: 'get',
     responseType: 'blob'
   })
-}
+}
+//  采购退货 完结单据
+export const purchaseReturnFinishBill = (params) => {
+  const url = `/purchaseReturn/finishBill/${params.sn}`
+  delete params.sn
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 23 - 9
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -72,8 +72,13 @@
         <div class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
-              <a-col :md="7" :sm="24">
-                <a-form-item label="产品编码/产品名称" prop="productName">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="inventoryCheckMakeInventoryList-productCode" v-model="queryParam.productCode" placeholder="请输入" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
                   <a-input id="inventoryCheckMakeInventoryList-productName" v-model="queryParam.productName" placeholder="请输入" allowClear />
                 </a-form-item>
               </a-col>
@@ -82,16 +87,22 @@
                   <ProductType id="inventoryCheckMakeInventoryList-productType" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
-                <a-form-item label="仓库">
-                  <a-select id="inventoryCheckMakeInventoryList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                    <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                  </a-select>
-                </a-form-item>
-              </a-col>
+              <template v-if="advanced && (basicInfoData&&basicInfoData.warehouseFlag=='1')">
+                <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                  <a-form-item label="仓库">
+                    <a-select id="inventoryCheckMakeInventoryList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                      <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+              </template>
               <a-col :md="5" :sm="24" style="margin-bottom: 10px;">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
               </a-col>
             </a-row>
           </a-form>
@@ -151,8 +162,10 @@ export default {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
+      advanced: false,
       queryParam: {
         productName: '',
+        productCode: '',
         productTypeSn1: undefined,
         productTypeSn2: undefined,
         productTypeSn3: undefined,
@@ -229,6 +242,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.productName = ''
+      this.queryParam.productCode = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined

+ 9 - 9
src/views/inventoryManagement/inventoryChecking/list.vue

@@ -190,15 +190,15 @@ export default {
         content: '如果开始盘点,不能再进行其他与产品出入库相关的操作。确认开始盘点吗?',
         centered: true,
         onOk () {
-          checkWarehouseValidate({}).then(res => {
-            if (res.status == 200) {
-              if (res.data) {
-                _this.openModal = true
-              } else {
-                _this.$message.info('存在未完结的盘点单,不能新增,请先完成盘点后再新增')
-              }
-            }
-          })
+          // checkWarehouseValidate({}).then(res => {
+          //   if (res.status == 200) {
+          //     if (res.data) {
+          _this.openModal = true
+          //     } else {
+          //       _this.$message.info('存在未完结的盘点单,不能新增,请先完成盘点后再新增')
+          //     }
+          //   }
+          // })
         }
       })
     },

+ 24 - 10
src/views/inventoryManagement/inventoryChecking/makeInventory.vue

@@ -73,8 +73,13 @@
             <a-col :span="19">
               <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
                 <a-row :gutter="15">
-                  <a-col :md="8" :sm="24">
-                    <a-form-item label="产品编码/产品名称" prop="productName">
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="inventoryCheckMakeInventoryList-productCode" v-model="queryParam.productCode" placeholder="请输入" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品名称" prop="productName">
                       <a-input id="inventoryCheckMakeInventoryList-productName" v-model="queryParam.productName" placeholder="请输入" allowClear />
                     </a-form-item>
                   </a-col>
@@ -83,16 +88,22 @@
                       <ProductType id="inventoryCheckMakeInventoryList-productType" @change="changeProductType" v-model="productType"></ProductType>
                     </a-form-item>
                   </a-col>
-                  <a-col :md="5" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
-                    <a-form-item label="仓库">
-                      <a-select id="inventoryCheckMakeInventoryList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
-                        <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="5" :sm="24" style="margin-bottom: 10px;">
+                  <template v-if="advanced && (basicInfoData&&basicInfoData.warehouseFlag=='1')">
+                    <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                      <a-form-item label="仓库">
+                        <a-select id="inventoryCheckMakeInventoryList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                          <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </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="inventoryCheckMakeInventoryList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
+                    <a @click="advanced=!advanced" style="margin-left: 5px" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                      {{ advanced ? '收起' : '展开' }}
+                      <a-icon :type="advanced ? 'up' : 'down'"/>
+                    </a>
                   </a-col>
                 </a-row>
               </a-form>
@@ -169,8 +180,10 @@ export default {
     return {
       spinning: false,
       disabled: false,
+      advanced: false,
       queryParam: {
         productName: '',
+        productCode: '',
         productTypeSn1: undefined,
         productTypeSn2: undefined,
         productTypeSn3: undefined,
@@ -226,6 +239,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.productName = ''
+      this.queryParam.productCode = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined

+ 8 - 1
src/views/inventoryManagement/inventoryChecking/overall.vue

@@ -36,7 +36,12 @@
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
               <a-col :md="8" :sm="24">
-                <a-form-item label="产品编码/产品名称" prop="productName">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="inventoryCheckOverallList-productCode" v-model="queryParam.productCode" placeholder="请输入" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
                   <a-input id="inventoryCheckOverallList-productName" v-model="queryParam.productName" placeholder="请输入" allowClear />
                 </a-form-item>
               </a-col>
@@ -84,6 +89,7 @@ export default {
       spinning: false,
       disabled: false,
       queryParam: {
+        productCode: '',
         productName: ''
       },
       basicInfoData: null, // 基础信息
@@ -118,6 +124,7 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
+      this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.$refs.table.refresh(true)
     },

+ 38 - 22
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -32,22 +32,27 @@
               <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="产品编码/产品名称" prop="productName">
-                      <a-input id="inventoryCheckSelfDiskList-productName" v-model="queryParam.productName" placeholder="请输入" allowClear />
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="inventoryCheckSelfDiskList-productCode" v-model="queryParam.productCode" placeholder="请输入" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="queryParam.brandSn"></ProductBrand>
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="inventoryCheckSelfDiskList-productName" v-model="queryParam.productName" placeholder="请输入" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeProductType" v-model="productType"></ProductType>
+                    <a-form-item label="产品品牌">
+                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="queryParam.brandSn"></ProductBrand>
                     </a-form-item>
                   </a-col>
-                  <template v-if="advanced && basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                  <template v-if="advanced">
                     <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeProductType" v-model="productType"></ProductType>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                       <a-form-item label="仓库">
                         <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
                           <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
@@ -58,7 +63,7 @@
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
-                    <a v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" @click="advanced=!advanced" style="margin-left: 5px">
+                    <a @click="advanced=!advanced" style="margin-left: 5px">
                       {{ advanced ? '收起' : '展开' }}
                       <a-icon :type="advanced ? 'up' : 'down'"/>
                     </a>
@@ -123,22 +128,27 @@
               <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
                 <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品编码/产品名称" prop="productName">
-                      <a-input id="inventoryCheckSelfDiskList-productName" v-model="chooseQueryParam.productName" placeholder="请输入" allowClear />
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="inventoryCheckSelfDiskList-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品品牌">
-                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="chooseQueryParam.brandSn"></ProductBrand>
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="inventoryCheckSelfDiskList-productName" v-model="chooseQueryParam.productName" placeholder="请输入" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品分类">
-                      <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeChooseProductType" v-model="chooseProductType"></ProductType>
+                    <a-form-item label="产品品牌">
+                      <ProductBrand id="inventoryCheckSelfDiskList-productBrand" v-model="chooseQueryParam.brandSn"></ProductBrand>
                     </a-form-item>
                   </a-col>
-                  <template v-if="chooseAdvanced && basicInfoData&&basicInfoData.warehouseFlag=='1'">
+                  <template v-if="chooseAdvanced">
                     <a-col :md="6" :sm="24">
+                      <a-form-item label="产品分类">
+                        <ProductType id="inventoryCheckSelfDiskList-productType" @change="changeChooseProductType" v-model="chooseProductType"></ProductType>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
                       <a-form-item label="仓库">
                         <a-select id="inventoryCheckSelfDiskList-warehouseSn" allowClear placeholder="请选择仓库" v-model="chooseQueryParam.warehouseSn" >
                           <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
@@ -149,7 +159,7 @@
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                     <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="inventoryCheckSelfDiskList-reset">重置</a-button>
-                    <a v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" @click="chooseAdvanced=!chooseAdvanced" style="margin-left: 5px">
+                    <a @click="chooseAdvanced=!chooseAdvanced" style="margin-left: 5px">
                       {{ chooseAdvanced ? '收起' : '展开' }}
                       <a-icon :type="chooseAdvanced ? 'up' : 'down'"/>
                     </a>
@@ -227,6 +237,8 @@ export default {
       disabled: false,
       chooseDisabled: false,
       queryParam: {
+        productCode: '',
+        productName: '',
         warehouseSn: undefined,
         brandSn: undefined,
         productTypeSn1: undefined,
@@ -252,6 +264,8 @@ export default {
         })
       },
       chooseQueryParam: {
+        productCode: '',
+        productName: '',
         warehouseSn: undefined,
         brandSn: undefined,
         productTypeSn1: undefined,
@@ -285,9 +299,9 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '12%' : '22%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '15%' : '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品品牌', dataIndex: 'brandName', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '9%' : '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '14%' },
         { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'currentQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -302,9 +316,9 @@ export default {
     },
     chooseColumns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品品牌', dataIndex: 'brandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '12%' : '22%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '15%' : '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品品牌', dataIndex: 'brandName', width: this.basicInfoData && this.basicInfoData.warehouseFlag == '1' ? '9%' : '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '14%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -321,6 +335,7 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
+      this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.brandSn = undefined
@@ -484,6 +499,7 @@ export default {
     },
     // 已选产品  重置
     chooseResetSearchForm () {
+      this.chooseQueryParam.productCode = ''
       this.chooseQueryParam.productName = ''
       this.chooseQueryParam.warehouseSn = undefined
       this.chooseQueryParam.brandSn = undefined

+ 1 - 1
src/views/productManagement/productOnlineInfo/list.vue

@@ -208,7 +208,7 @@ export default {
       _this.spinning = true
       _this.exportLoading = true
       // 打印或导出
-      hdPrint('', 'export', productExport, this.queryParam, '', function () {
+      hdPrint('', 'export', productExport, this.queryParam, '产品上线信息', function () {
         _this.spinning = false
         _this.exportLoading = false
       })

+ 36 - 7
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -88,6 +88,13 @@
             @click="handleWarehouse(record)"
             class="button-primary"
             id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
+            @click="handleFinishBill(record)"
+            class="button-primary"
+            id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
           <a-button
             size="small"
             type="link"
@@ -95,7 +102,7 @@
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
             @click="handleDel(record)"
             id="purchaseReturnList-del-btn">删除</a-button>
-          <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnOutStock'))">--</span>
+          <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.state == 'CHECKED' && ($hasPermissions('B_purchaseReturnOutStock') || $hasPermissions('B_purchaseReturnFinishBill')))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -107,7 +114,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { purchaseTargetList } from '@/api/purchase'
 import getDate from '@/libs/getDate.js'
-import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill } from '@/api/purchaseReturn'
+import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturn'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -128,14 +135,15 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采退单号', scopedSlots: { customRender: 'purchaseReturnNo' }, width: '20%', align: 'center' },
+        { title: '采退单号', scopedSlots: { customRender: 'purchaseReturnNo' }, width: '17%', align: 'center' },
         { title: '退货数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退款金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '扣减库存', dataIndex: 'hasStockBill', width: '6%', align: 'center', customRender: function (text) { return ['否', '是'][text] } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -233,7 +241,7 @@ export default {
         })
       }
     },
-    //  入库
+    //  生成出库单
     handleWarehouse (row) {
       const _this = this
       this.$confirm({
@@ -254,6 +262,27 @@ export default {
         }
       })
     },
+    //  完结单据
+    handleFinishBill (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要完结该单据吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          purchaseReturnFinishBill({ sn: row.purchaseReturnSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     getParentDealer () {
       purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
         if (res.status == 200) {