chenrui пре 11 месеци
родитељ
комит
19ee8426c0

+ 14 - 5
src/views/common/supplier.js

@@ -40,6 +40,10 @@ const Employee = {
     isPermission: {
       type: Boolean,
       default: false
+    },
+    pageSn: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -69,16 +73,21 @@ const Employee = {
       this.$emit('change', value, item)
     },
     getList () {
-      const funs = this.isPermission ? supplierAuthAllList : supplierAllList
+      const _this = this
+      const funs = _this.isPermission ? supplierAuthAllList : supplierAllList
       funs().then(res => {
         if (res.status == 200) {
-          if (this.enableFlag != '') {
-            this.list = res.data.filter(item => item.enableFlag == this.enableFlag)
+          if (_this.enableFlag != '') {
+            if (_this.pageSn === '544577718475575296') {
+              _this.list = res.data.filter(item => item.supplierSn == _this.pageSn)
+            } else {
+              _this.list = res.data.filter(item => item.enableFlag == _this.enableFlag)
+            }
           } else {
-            this.list = res.data
+            _this.list = res.data
           }
         } else {
-          this.list = []
+          _this.list = []
         }
       })
     }

+ 22 - 9
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -20,18 +20,18 @@
             基础信息
           </template>
           <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库单号">{{ (basicInfoData&&basicInfoData.sparePartsNo) || '--' }}</a-descriptions-item>
           </a-descriptions>
         </a-collapse-panel>
       </a-collapse>
       <!-- 总计 -->
       <a-alert type="info" style="margin:10px 0">
         <div slot="message">
-          入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
-          <span v-if="$hasPermissions('B_sparePartsDetail_costPrice')">入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? toThousands(productTotal.totalPrice) : '--' }}</strong></span>
+          入库数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong> ,
+          <span v-if="$hasPermissions('B_sparePartsDetail_costPrice')">入库金额 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost) : '--' }}</strong></span>
         </div>
       </a-alert>
       <!-- 列表 -->
@@ -61,6 +61,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { sparePartsDetailList, sparePartsPageCount } from '@/api/spareParts'
+import { queryDetailCount } from '@/api/purchase'
 export default {
   name: 'BulkWarehousingOrderDetailModal',
   mixins: [commonMixin],
@@ -85,6 +86,7 @@ export default {
           if (res.status == 200) {
             data = res.data
             this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.itemSn }))
+            this.getBasicInfoData()
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -95,7 +97,8 @@ export default {
           return data
         })
       },
-      productTotal: null //  合计
+      productTotal: null, //  统计
+      basicInfoData: null// 基础信息
     }
   },
   computed: {
@@ -119,7 +122,7 @@ export default {
     handleBack () {
       this.$router.push({ path: '/purchasingManagement/bulkWarehousingOrder/list', query: { closeLastOldTab: true } })
     },
-    // 合计
+    // 获取统计数据
     getDetailCount (params) {
       sparePartsPageCount(params).then(res => {
         if (res.status == 200) {
@@ -128,6 +131,16 @@ export default {
           this.productTotal = null
         }
       })
+    },
+    // 获取基础信息数据
+    getBasicInfoData () {
+      queryDetailCount({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
     }
   },
   watch: {
@@ -140,7 +153,7 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$store.state.app.curActionPermission = ''
-      }else{
+      } else {
         this.$store.state.app.curActionPermission = 'B_sparePartsDetail'
       }
     },

+ 29 - 17
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -6,8 +6,8 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ productTotal&&productTotal.sparePartsNo }}</span>
-          <span style="margin: 0 10px;color: #666;">供应商:{{ productTotal&&productTotal.supplierName }}</span>
+          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ basicInfoData&&basicInfoData.sparePartsNo }}</span>
+          <span style="margin: 0 10px;color: #666;">供应商:{{ basicInfoData&&basicInfoData.supplierName }}</span>
           <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
             <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
           </a-button>
@@ -15,13 +15,13 @@
       </a-page-header>
       <!-- 基础信息 -->
       <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont" v-show="showDetail">
-        <div v-if="productTotal" ref="detailBar">
-           <a-descriptions :column="2">
-             <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
-             <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
-             <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
-             <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
-           </a-descriptions>
+        <div v-if="basicInfoData" ref="detailBar">
+          <a-descriptions :column="2">
+            <a-descriptions-item label="入库单号">{{ (basicInfoData&&basicInfoData.sparePartsNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="入库仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+          </a-descriptions>
         </div>
       </a-card>
       <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
@@ -56,9 +56,9 @@
             <!-- 总计 -->
             <a-alert type="info" v-if="productTotal">
               <div slot="message">
-                入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
+                入库数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong> ,
                 <span v-if="$hasPermissions('B_sparePartsEdit_costPrice')">
-                  入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? toThousands(productTotal.totalPrice) : '--' }}</strong>
+                  入库金额 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost) : '--' }}</strong>
                 </span>
               </div>
             </a-alert>
@@ -122,6 +122,7 @@ import { getOperationalPrecision } from '@/libs/tools.js'
 import sparePartsProductModal from './productModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert } from '@/api/spareParts'
+import { queryDetailCount } from '@/api/purchase'
 export default {
   name: 'BulkWarehousingOrderEdit',
   mixins: [commonMixin],
@@ -148,15 +149,16 @@ export default {
               data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
             }
             this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.$route.params.sn }))
+            this.getBasicInfoData()
           }
           return data
         })
       },
       openModal: false, // 选择基本信息弹框是否显示
-      basicInfoData: null, //  基信息
+      basicInfoData: null, //  基信息
       productTotal: null, //  合计
       itemSn: '',
-      openGuideModal: false ,//  导入产品引导
+      openGuideModal: false, //  导入产品引导
       tableHeight: 0
     }
   },
@@ -172,13 +174,13 @@ export default {
       ]
       if (this.$hasPermissions('B_sparePartsEdit_costPrice')) { //  成本价权限
         arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(6,0,{ title: '小计', dataIndex: 'subtotal', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(6, 0, { title: '小计', dataIndex: 'subtotal', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }
   },
   watch: {
-    showDetail(newValue, oldValue){
+    showDetail (newValue, oldValue) {
       this.setTableH()
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
@@ -195,7 +197,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         const toolsBarH = this.$refs.toolsBar.offsetHeight
         this.tableHeight = window.innerHeight - toolsBarH - 282
-        if(this.showDetail){
+        if (this.showDetail) {
           this.tableHeight = this.tableHeight - this.$refs.detailBar.offsetHeight - 30
         }
       })
@@ -246,7 +248,7 @@ export default {
     handleBack () {
       this.$router.push({ path: '/purchasingManagement/bulkWarehousingOrder/list', query: { closeLastOldTab: true } })
     },
-    // 合计
+    // 获取统计数据
     getDetailCount (params) {
       sparePartsPageCount(params).then(res => {
         if (res.status == 200) {
@@ -256,6 +258,16 @@ export default {
         }
       })
     },
+    // 获取基础信息数据
+    getBasicInfoData () {
+      queryDetailCount({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
     pageInit () {
       this.productTotal = null
       this.openModal = false

+ 1 - 1
src/views/purchasingManagement/purchaseReceipt/basicInfoModal.vue

@@ -17,7 +17,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol" >
         <a-form-model-item label="供应商名称" prop="supplierSn">
-          <supplier v-model="form.supplierSn" isPermission placeholder="请输入供应商名称"></supplier>
+          <supplier v-model="form.supplierSn"  enableFlag="1" pageSn="544577718475575296" isPermission placeholder="请输入供应商名称"></supplier>
         </a-form-model-item>
         <a-form-model-item label="仓库仓位" prop="warehouseSn">
           <a-select

+ 4 - 4
src/views/purchasingManagement/purchaseReceipt/detailModal.vue

@@ -7,7 +7,7 @@
     title="详情"
     v-model="isShow"
     @cancel="isShow=false"
-    :width="960">
+    width="70%">
     <a-card size="small" :bordered="false" class="detail-basics-info">
       <!-- 基础信息 -->
       <a-collapse :activeKey="['1']">
@@ -133,9 +133,9 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '采购单价', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },

+ 1 - 1
src/views/purchasingManagement/purchaseReceipt/list.vue

@@ -131,7 +131,7 @@
               id="purchaseReceiptList-del-btn">取消</a-button>
             <a-tooltip placement="left" v-if="$hasPermissions('B_purchaseReceiptTransportNo') && (record.state === 'WAIT_PUT'&&record.thirdpartyBizState==='FINISH')||(record.state === 'FINISH'&&record.thirdpartyBizState==='FINISH')">
               <template slot="title">
-                <span>物流单号:{{ record.transportNo }}</span>
+                <span>物流单号:{{ record.transportNo||'--' }}</span>
               </template>
               <a-button
                 size="small"

+ 2 - 1
src/views/purchasingManagement/purchaseReceipt/uploadVoucherModal.vue

@@ -19,7 +19,7 @@
           <Upload
             id="uploadVoucher-attachList"
             ref="importUpload"
-            v-model="attachmentList"
+            v-model="attachList"
             :maxNums="10"
             :fileSize="10"
             uploadType="attach"
@@ -72,6 +72,7 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 20 }
       },
+      form:{},
       attachList: null,
       attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo'
     }