Pārlūkot izejas kodu

Merge branch 'develop_12' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_12

lilei 2 gadi atpakaļ
vecāks
revīzija
c7714e36b7

+ 25 - 19
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -6,10 +6,10 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <p style="display: inline-block;margin: 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
-          <a @click="advanced=!advanced" style="margin-left: 5px">
-            {{ advanced ? '收起' : '展开' }}
-            <a-icon :type="advanced ? 'up' : 'down'"/>
+          <p style="display: inline-block;margin: 0 30px 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.sparePartsPurchaseNo) || '' }}</p>
+          <a @click="isShowBisiceInfo=!isShowBisiceInfo" style="color: #000;font-size: 14px;font-weight: 600;">
+            基础信息
+            <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
           </a>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
@@ -21,19 +21,18 @@
           </p></template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1">
-            <template slot="header">
-              基础信息
-            </template>
-            <a-descriptions :column="3">
-              <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="散件入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
+      <a-card size="small" :bordered="false" v-if="isShowBisiceInfo" class="bulkWarehousingOrderEdit-cont">
+        <a-row :gutter="16">
+          <a-col class="gutter-row" :span="8">
+            供应商:{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}
+          </a-col>
+          <a-col class="gutter-row" :span="8">
+            散件入库类型:{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}
+          </a-col>
+          <a-col class="gutter-row" :span="8">
+            备注:{{ (basicInfoData&&basicInfoData.remarks) || '--' }}
+          </a-col>
+        </a-row>
       </a-card>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
@@ -109,6 +108,7 @@
                       :min="0"
                       :max="999999"
                       placeholder="请输入"
+                      class="rightPrice"
                       style="width: 100%;" />
                   </div>
                 </template>
@@ -166,7 +166,7 @@
                 <div slot="message">
                   总款数 <strong>{{ (productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0)) ? productTotal.productTotalCategory : '--' }}</strong> ,
                   总数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong> ,
-                  总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
+                  总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost,2) : '--' }}</strong>
                 </div>
               </a-alert>
               <div class="table-page-search-wrapper">
@@ -224,6 +224,7 @@
                     :min="0"
                     :max="999999"
                     placeholder="请输入"
+                    class="rightPrice"
                     @blur="e => putCostBlur(e.target.value, record)"
                     style="width: 100%;" />
                 </template>
@@ -322,6 +323,7 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import Print from '@/views/common/print.vue'
 import importGuideModal from './importGuideModal.vue'
+import { toThousands } from '@/libs/tools'
 import newProduct from '@/views/productManagement/productInfo/edit.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
@@ -330,6 +332,7 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
+      isShowBisiceInfo: false,
       advanced: false,
       spinning: false,
       loading: false,
@@ -404,7 +407,7 @@ export default {
         { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '成本价', scopedSlots: { customRender: 'putCost' }, width: '7%', align: 'center' },
         { title: '数量', scopedSlots: { customRender: 'putQty' }, width: '7%', align: 'center' },
-        { title: '成本小计', dataIndex: 'costSubtotal', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本小计', dataIndex: 'costSubtotal', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '13%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
@@ -824,5 +827,8 @@ export default {
         margin-left: 10px;
       }
     }
+    .rightPrice.ant-input-number-sm input{
+      text-align: right;
+    }
   }
 </style>

+ 3 - 3
src/views/productManagement/productInfo/detailModal.vue

@@ -17,9 +17,9 @@
         <a-descriptions-item label="基本单位:">{{ detailsData&&detailsData.unit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品品牌:">{{ detailsData&&detailsData.productBrandName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品分类:">{{ productTypeName || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="经销批发价:">{{ detailsData&&(detailsData.specialPrice || detailsData.specialPrice==0) ? detailsData.specialPrice : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="终端价:">{{ detailsData&&(detailsData.terminalPrice || detailsData.terminalPrice==0) ? detailsData.terminalPrice : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="车主价:">{{ detailsData&&(detailsData.carOwnersPrice || detailsData.carOwnersPrice==0) ? detailsData.carOwnersPrice : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="经销批发价:">{{ detailsData&&(detailsData.specialPrice || detailsData.specialPrice==0) ? toThousands(detailsData.specialPrice,2) : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="终端价:">{{ detailsData&&(detailsData.terminalPrice || detailsData.terminalPrice==0) ? toThousands(detailsData.terminalPrice,2) : '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车主价:">{{ detailsData&&(detailsData.carOwnersPrice || detailsData.carOwnersPrice==0) ? toThousands(detailsData.carOwnersPrice,2) : '--' }}</a-descriptions-item>
       </a-descriptions>
       <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>

+ 19 - 7
src/views/productManagement/productInfo/list.vue

@@ -30,6 +30,11 @@
                   <v-select code="ENABLE_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="4" :sm="24" style="margin-top:6px;">
+                <a-checkbox @change="handleHasQty" :checked="queryParam.hasQty">
+                  只查看有库存
+                </a-checkbox>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="searchForm()" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -143,6 +148,7 @@ export default {
   components: { STable, VSelect, productInfoDetailModal, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
+    const _this = this
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
@@ -158,7 +164,8 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        enabledFlag: undefined //  状态
+        enabledFlag: undefined, //  状态
+        hasQty: false
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -206,27 +213,27 @@ export default {
           title: '经销批发价',
           dataIndex: 'specialPrice',
           width: '7%',
-          align: 'center',
+          align: 'right',
           customRender: function (text) {
-            return text || text == 0 ? text : '--'
+            return text || text == 0 ? _this.toThousands(text, 2) : '--'
           }
         },
         {
           title: '终端价',
           dataIndex: 'terminalPrice',
           width: '6%',
-          align: 'center',
+          align: 'right',
           customRender: function (text) {
-            return text || text == 0 ? text : '--'
+            return text || text == 0 ? _this.toThousands(text, 2) : '--'
           }
         },
         {
           title: '车主价',
           dataIndex: 'carOwnersPrice',
           width: '6%',
-          align: 'center',
+          align: 'right',
           customRender: function (text) {
-            return text || text == 0 ? text : '--'
+            return text || text == 0 ? _this.toThousands(text, 2) : '--'
           }
         },
         {
@@ -297,11 +304,16 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.queryParam.enabledFlag = undefined
+      this.queryParam.hasQty = false
       this.productType = []
       this.$refs.table.clearSelected()
       this.rowSelectionInfo = null
       this.$refs.table.refresh(true)
     },
+    // 只查看有库存
+    handleHasQty (e) {
+      this.queryParam.hasQty = e.target.checked
+    },
     //  新增/编辑
     handleEdit (row) {
       if (row) {

+ 36 - 29
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -6,6 +6,10 @@
         <template slot="subTitle">
           <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
+          <a @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:30px;color: #666;font-size: 14px;font-weight: 600;">
+            基础信息
+            <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
+          </a>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_purchasePrint')">
@@ -13,29 +17,29 @@
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1">
-            <template slot="header">
-              基础信息
-            </template>
-            <a-descriptions :column="2">
-              <a-descriptions-item label="供应商">{{ detail&&detail.purchaseTargetName || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName || '--' }}({{ detail&&detail.consigneeTel || '--' }})</a-descriptions-item>
-              <a-descriptions-item label="收货地址">
-                <div v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
-                  {{ detail&&detail.shippingAddressProvinceName || '' }}
-                  {{ detail&&detail.shippingAddressCityName || '' }}
-                  {{ detail&&detail.shippingAddressCountyName || '' }}
-                  {{ detail&&detail.shippingAddress || '' }}
-                  <a-button type="link" @click="openAddrModal=true">更换地址 >></a-button>
-                </div>
-                <p v-else><a-button type="link" @click="openAddrModal=true">选择地址 >></a-button></p>
-              </a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
+      <a-card size="small" :bordered="false" v-if="isShowBisiceInfo" class="purchaseOrderEdit-cont">
+        <a-row :gutter="16" type="flex" align="middle" justify="center"s>
+          <a-col class="gutter-row" :span="12">
+            供应商:{{ detail&&detail.purchaseTargetName || '--' }}
+          </a-col>
+          <a-col class="gutter-row" :span="12">
+            支付方式:{{ detail&&detail.settleStyleSnDictValue || '--' }}
+          </a-col>
+          <a-col class="gutter-row" :span="12">
+            收货人:{{ detail&&detail.consigneeName || '--' }}({{ detail&&detail.consigneeTel || '--' }})
+          </a-col>
+          <a-col class="gutter-row" :span="12">
+            <span>收货地址:</span>
+            <div style="display: inline-block;vertical-align: middle;" v-if="detail&&(detail.shippingAddressProvinceName || detail.shippingAddressCityName || detail.shippingAddressCountyName || detail.shippingAddress)">
+              {{ detail&&detail.shippingAddressProvinceName || '' }}
+              {{ detail&&detail.shippingAddressCityName || '' }}
+              {{ detail&&detail.shippingAddressCountyName || '' }}
+              {{ detail&&detail.shippingAddress || '' }}
+              <a-button type="link" @click="openAddrModal=true">更换地址 >></a-button>
+            </div>
+            <div v-else><a-button type="link" @click="openAddrModal=true">选择地址 >></a-button></div>
+          </a-col>
+        </a-row>
       </a-card>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="purchaseOrderEdit-cont">
@@ -164,7 +168,7 @@
               <a-alert type="info" style="margin-bottom:10px">
                 <div slot="message">产品款数 <strong>{{ detail && (detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--' }}</strong> ,
                   采购数量合计 <strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong> ,
-                  <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">采购金额合计 <strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? '¥'+detail.discountedAmount : '--' }}</strong></div>
+                  <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">采购金额合计 <strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ?toThousands(detail.discountedAmount, 2) : '--' }}</strong></div>
                 </div>
               </a-alert>
               <!-- 搜索条件 -->
@@ -280,6 +284,7 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
+      isShowBisiceInfo: false,
       showPage: false,
       spinning: false,
       detail: null, // 详细信息
@@ -354,6 +359,7 @@ export default {
       return this.detail && this.detail.purchaseTargetType == 'DEALER_UP'
     },
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
@@ -362,8 +368,8 @@ export default {
         { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '包装数', scopedSlots: { customRender: 'baozh' }, width: '5%', align: 'center' },
         // { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '6%', align: 'center' },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -373,12 +379,13 @@ export default {
         arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
 
       return arr
     },
     chooseColumns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
@@ -390,8 +397,8 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }