chenrui il y a 4 ans
Parent
commit
a273cc83b0

+ 16 - 0
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -4,6 +4,13 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="storeTransferOutDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -81,6 +88,11 @@ export default {
       productTotal: null //  合计
     }
   },
+  computed: {
+    isEdit () {
+      return (this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {
@@ -105,6 +117,10 @@ export default {
           this.productTotal = null
         }
       })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/allocationManagement/storeTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.storeCallOutSn}` })
     }
   },
   beforeRouteEnter (to, from, next) {

+ 3 - 2
src/views/allocationManagement/storeTransferOut/list.vue

@@ -99,7 +99,7 @@
         <a-button
           size="small"
           type="link"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT'"
+          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
           class="button-info"
           @click="handleEdit(record)"
           id="storeTransferOutList-edit-btn">编辑</a-button>
@@ -113,10 +113,11 @@
         <a-button
           size="small"
           type="link"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT'"
+          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'WAIT_OUT_WAREHOUSE')"
           class="button-error"
           @click="handleDel(record)"
           id="storeTransferOutList-del-btn">删除</a-button>
+        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'WAIT_OUT_WAREHOUSE')">--</span>
       </template>
     </s-table>
     <!-- 新增/编辑 -->

+ 5 - 6
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -71,6 +71,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import {
   allocWarehouseDetailSn,
@@ -134,8 +135,6 @@ export default {
         if (res.status == 200) {
           this.warehouse = res.data
           this.queryParam.outWarehouseSn = res.data.outWarehouseSn
-          // this.getWarehouseLoc(this.warehouse.putWarehouseSn, 'put')
-          // this.getWarehouseLoc(this.warehouse.outWarehouseSn, 'out')
         } else {
           this.warehouse = null
         }
@@ -159,10 +158,10 @@ export default {
     handleExport () {
       const params = this.queryParam
       this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
+      // customerBundleExportDelay(params).then(res => {
+      //   this.exportLoading = false
+      //   this.download(res)
+      // })
     },
     download (data) {
       if (!data) { return }

+ 1 - 1
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -121,7 +121,7 @@
             bordered>
             <!-- 产品分类 -->
             <template slot="productType" slot-scope="text, record">
-              <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+              <span v-if="record.dealerProduct.productTypeName2 || record.dealerProduct.productTypeName3">{{ record.dealerProduct.productTypeName2 }} {{ record.dealerProduct.productTypeName3 ? '>' : '' }} {{ record.dealerProduct.productTypeName3 }}</span>
               <span v-else>--</span>
             </template>
             <!-- 调入仓位 -->

+ 4 - 3
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -74,7 +74,7 @@
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button
-          v-if="record.stateDictValue == '待审核'"
+          v-if="record.state == 'WAIT_AUDIT'"
           size="small"
           type="link"
           class="button-warning"
@@ -83,7 +83,7 @@
           审核
         </a-button>
         <a-button
-          v-if="record.stateDictValue != '已完结'"
+          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
           size="small"
           type="link"
           class="button-info"
@@ -92,7 +92,7 @@
           编辑
         </a-button>
         <a-button
-          v-if="record.stateDictValue != '已完结'"
+          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
           size="small"
           type="link"
           class="button-error"
@@ -100,6 +100,7 @@
           id="warehouseAllocationList-del-btn">
           删除
         </a-button>
+        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</span>
       </template>
     </s-table>
     <!-- 新增/编辑 -->

+ 16 - 0
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -4,6 +4,13 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="purchaseReturnDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="purchaseReturnDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -88,6 +95,11 @@ export default {
       basicInfoData: null //  基本信息
     }
   },
+  computed: {
+    isEdit () {
+      return this.basicInfoData && this.basicInfoData.state == 'WAIT'
+    }
+  },
   methods: {
     //  返回列表
     handleBack () {
@@ -102,6 +114,10 @@ export default {
           this.basicInfoData = null
         }
       })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${this.basicInfoData.id}/${this.basicInfoData.purchaseReturnSn}` })
     }
   },
   beforeRouteEnter (to, from, next) {

+ 3 - 3
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -155,13 +155,13 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: 200, align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: 200, align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: 200, align: 'center', ellipsis: true },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: 200, align: 'center', ellipsis: true },
         { title: '采购总数', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '可退数量', dataIndex: 'qtyLeft', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: 100, align: 'center' },
         { title: '采购价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       loadData: [],

+ 5 - 1
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -52,7 +52,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1250 }"
+      :scroll="{ x: 1250, y: tableHeight }"
       bordered>
       <!-- 采退单号 -->
       <template slot="purchaseReturnNo" slot-scope="text, record">
@@ -99,6 +99,7 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
+      tableHeight: 0,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
@@ -113,6 +114,9 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 275
+        }
         // 创建时间
         if (this.createDate && this.createDate.length > 0) {
           this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)