Selaa lähdekoodia

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

# Conflicts:
#	public/version.json
#	src/config/router.config.js
#	src/views/inventoryManagement/chainInventory/list.vue
lilei 2 kuukautta sitten
vanhempi
commit
9de735c7b9

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1742264858900
+  "version": 1742777899033
 }

+ 12 - 0
src/api/stock.js

@@ -77,3 +77,15 @@ export const stockByProductSn = (params) => {
     method: 'post'
   })
 }
+
+//连锁库存  列表   有分页
+export const stockQueryLinkPage = (params) => {
+  const url = `/stock/queryLinkPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 4 - 4
src/config/router.config.js

@@ -2066,8 +2066,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '连锁库存',
-              icon: 'alert'
-              // permission: 'M_chainInventoryList'
+              icon: 'alert',
+              permission: 'M_chainInventory'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2078,8 +2078,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '连锁库存列表',
                   hidden: true,
-                  icon: 'alert'
-                  // permission: 'M_chainInventoryList'
+                  icon: 'alert',
+                  permission: 'M_chainInventoryList'
                 }
               }
             ]

+ 1 - 1
src/views/financialManagement/financialCollection/detailModal.vue

@@ -20,7 +20,7 @@
         <a-descriptions-item label="收款方式">{{ detailsData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="收款时间">{{ detailsData.settleTime || '--' }}</a-descriptions-item>
         <a-descriptions-item label="审核时间">{{ detailsData.auditTime || '--' }}</a-descriptions-item>
-        <template v-if="detailsData.refundType&&detailsData.refundType=='WECHAT_PAY'">
+        <template v-if="detailsData.refundType&&(detailsData.refundType=='WECHAT_PAY'||detailsData.refundType=='RECHARGE_BALANCE')">
           <a-descriptions-item label="退款金额">{{ detailsData.refundAmount || '--' }}</a-descriptions-item>
           <a-descriptions-item label="退款时间">{{ detailsData.refundData || '--' }}</a-descriptions-item>
           <a-descriptions-item label="退款方式">{{ detailsData.refundTypeDictValue || '--' }}{{ detailsData.refundTypeDictValue?'(1-3个工作日到账)':'' }}</a-descriptions-item>

+ 53 - 11
src/views/inventoryManagement/chainInventory/list.vue

@@ -7,7 +7,16 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="门店名称">
-                <a-input id="chainInventoryList-storeName" v-model.trim="queryParam.storeName" allowClear placeholder="请输入门店名称"/>
+                <a-select
+                  placeholder="请选择门店名称"
+                  id="chainInventoryList-storeName"
+                  allowClear
+                  v-model.trim="queryParam.tenantId"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in linkageGroupData" :id="item.dealerSn" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
+                </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -78,7 +87,8 @@ import { STable, VSelect } from '@/components'
 import ProductType from '@/views/common/productType.js'// 产品分类
 import ProductBrand from '@/views/common/productBrand.js'// 产品品牌
 // 接口
-import { stockWarnList } from '@/api/stockWarn'
+import { stockQueryLinkPage } from '@/api/stock'
+import { linkageGroupList } from '@/api/reportData'
 export default {
   name: 'ChainInventoryList',
   components: { STable, VSelect, ProductType, ProductBrand },
@@ -90,7 +100,8 @@ export default {
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       queryParam: { //  查询条件
-        storeName: undefined, // 门店名称
+        tenantIdList: [],
+        tenantId: undefined, // 门店名称
         productCode: '', // 产品编码
         productName: '', // 产品名称
         productOrigCode: '', // 原厂编码
@@ -100,21 +111,29 @@ export default {
         productTypeSn3: undefined // 产品分类3
       },
       productType: [], // 产品分类默认值
+      linkageGroupData: [], // 门店列表
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '门店名称', dataIndex: 'storeName', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '门店名称', dataIndex: 'dealerName', align: 'center', width: '18%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'left', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'dealerProduct.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'brandName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'left', width: '23%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'brandName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
-        { title: '可用库存数量(个)', dataIndex: 'stockNum', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '可用库存数量(个)', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        if (this.queryParam.tenantId && this.queryParam.tenantId.length > 0) {
+          this.queryParam.tenantIdList[0] = this.queryParam.tenantId
+        } else {
+          this.queryParam.tenantIdList = []
+        }
         this.disabled = true
         this.spinning = true
-        return stockWarnList(Object.assign(parameter, this.queryParam)).then(res => {
+        const parames = Object.assign(parameter, this.queryParam)
+        delete parames.tenantId
+        return stockQueryLinkPage(parames).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -147,7 +166,8 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.storeName = undefined
+      this.queryParam.tenantIdList = []
+      this.queryParam.tenantId = undefined
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.productOrigCode = ''
@@ -159,6 +179,27 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 门店店筛选
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 门店列表
+    getLinkageGroup () {
+      linkageGroupList({}).then(res => {
+        if (res.status == 200) {
+          const data = res.data || []
+          if (data.length > 0) {
+            this.linkageGroupData = data
+          } else {
+            this.linkageGroupData = []
+          }
+        } else {
+          this.linkageGroupData = []
+        }
+      })
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -171,11 +212,12 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      _this.getLinkageGroup()
     },
     // 表格高度计算
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 180
+      this.tableHeight = window.innerHeight - tableSearchH - 190
     }
   },
   watch: {

+ 9 - 9
src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue

@@ -50,10 +50,10 @@
       <!-- 统计 -->
       <div class="table-operator" style="margin-bottom: 10px;">
         <div class="alert-message">
-          充值金额:<strong>{{ totalData&&(totalData.rechargeAmount || totalData.rechargeAmount==0) ? Math.abs(toThousands(totalData.rechargeAmount)) : '--' }}</strong>;
-          销售金额:<strong>{{ totalData&&(totalData.salesAmount || totalData.salesAmount==0) ? Math.abs(toThousands(totalData.salesAmount)) : '--' }}</strong>;
-          退款金额:<strong>{{ totalData&&(totalData.refundAmount || totalData.refundAmount==0) ? Math.abs(toThousands(totalData.refundAmount)) : '--' }}</strong>;
-          清零金额:<strong>{{ totalData&&(totalData.zeroAmount || totalData.zeroAmount==0) ? Math.abs(toThousands(totalData.zeroAmount)) : '--' }}</strong>;
+          充值金额:<strong>{{ totalData&&(totalData.rechargeAmount || totalData.rechargeAmount==0) ?toThousands(Math.abs(totalData.rechargeAmount)) : '--' }}</strong>;
+          销售金额:<strong>{{ totalData&&(totalData.salesAmount || totalData.salesAmount==0) ? toThousands(Math.abs(totalData.salesAmount)) : '--' }}</strong>;
+          退款金额:<strong>{{ totalData&&(totalData.refundAmount || totalData.refundAmount==0) ? toThousands(Math.abs(totalData.refundAmount)) : '--' }}</strong>;
+          清零金额:<strong>{{ totalData&&(totalData.zeroAmount || totalData.zeroAmount==0) ? toThousands(Math.abs(totalData.zeroAmount)) : '--' }}</strong>;
         </div>
       </div>
       <!-- 列表 -->
@@ -91,7 +91,7 @@ export default {
       type: Boolean,
       default: false
     },
-    modalType: { // 1是充值交易流水  2是补贴交易流水
+    modalType: { // 1是充值交易流水  2是抵扣交易流水
       type: String,
       default: '1'
     },
@@ -137,10 +137,10 @@ export default {
           let data
           if (res.status == 200) {
             data = res.data
-            const no = 0
-            for (var i = 0; i < data.length; i++) {
-              data[i].no = no + i + 1
-            }
+            const no = (data.pageNo - 1) * data.pageSize
+             for (var i = 0; i < data.list.length; i++) {
+               data.list[i].no = no + i + 1
+             }
             this.getCount(params)
             this.disabled = false
           }

+ 1 - 1
src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue

@@ -13,7 +13,7 @@
         <a-checkbox-group v-model="accountType" id="zero-clearing-checkbox">
           <a-checkbox value="RECHARGE" id="zero-clearing-checkbox1">清空{{ (conInfo.rechargeBalance||conInfo.rechargeBalance==0)?toThousands(conInfo.rechargeBalance):'--' }}元【充值余额】</a-checkbox>
           <br />
-          <a-checkbox value="GIVE" id="zero-clearing-checkbox2">清空{{ (conInfo.giveBalance||conInfo.giveBalance==0)?toThousands(conInfo.giveBalance):'--' }}元【补贴余额】</a-checkbox>
+          <a-checkbox value="GIVE" id="zero-clearing-checkbox2">清空{{ (conInfo.giveBalance||conInfo.giveBalance==0)?toThousands(conInfo.giveBalance):'--' }}元【抵扣余额】</a-checkbox>
         </a-checkbox-group>
         <div style="margin-top:10px;">注意:请慎重操作,一旦清空,不可变更</div>
       </div>

+ 1 - 0
src/views/promotionManagement/rechargeSettings/editModal.vue

@@ -136,6 +136,7 @@ export default {
       this.form.rechargeAmount = undefined
       this.form.giveAmount = undefined
       this.form.remarks = undefined
+      this.form.id = undefined
       this.$refs.ruleForm.resetFields()
     }
   },

+ 1 - 1
src/views/promotionManagement/subsidizedProducts/chooseImportModal.vue

@@ -112,7 +112,7 @@ export default {
       nowUnColumns: [
         { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '抵扣金额', dataIndex: 'subsidyAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '抵扣后售价', dataIndex: 'subsidyedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },

+ 3 - 1
src/views/promotionManagement/subsidizedProducts/editModal.vue

@@ -67,7 +67,7 @@ export default {
       subsidizedProductEdit({ subsidyAmount: _this.subsidyAmount, productSns: _this.itemSn }).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.getErrorInfo(res.data)
+            _this.getErrorInfo(res.data)
           } else {
             _this.$message.success(res.message)
             _this.$emit('ok')
@@ -81,10 +81,12 @@ export default {
     },
     // 报错弹窗
     getErrorInfo (infoTip) {
+      const _this = this
       this.$info({
         title: '提示',
         content: infoTip,
         onOk () {
+          _this.$emit('ok')
           console.log('我知道了')
         }
       })

+ 28 - 6
src/views/promotionManagement/subsidizedProducts/list.vue

@@ -30,6 +30,17 @@
                 <mallCategory id="subsidizedProducts-category" @change="changeProductsCategory" v-model="category"></mallCategory>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="促销产品">
+                <v-select
+                  v-model="queryParam.isPromoProduct"
+                  ref="sourceType"
+                  id="rechargeList-isPromoProduct"
+                  code="FLAG"
+                  placeholder="请选择是否是促销产品"
+                  allowClear></v-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="subsidizedProducts-refresh">查询</a-button>
@@ -40,10 +51,16 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator-nobor">
-      <a-button id="subsidizedProducts-add"  v-if="$hasPermissions('B_subsidizedProducts_add')" type="primary" class="button-error" @click="openAddModal=true">新增</a-button>
-      <a-button id="subsidizedProducts-edit"  v-if="$hasPermissions('B_subsidizedProducts_edit')" type="primary" class="button-info" @click="handleEdit()">批量编辑</a-button>
-      <a-button id="subsidizedProducts-del"  v-if="$hasPermissions('B_subsidizedProducts_del')" type="primary" class="button-error" ghost @click="handleDel()">批量删除</a-button>
-      <a-button id="subsidizedProducts-import"  v-if="$hasPermissions('B_subsidizedProducts_import')" style="margin-left:5px;" @click="openGuideModal=true">导入</a-button>
+      <a-button id="subsidizedProducts-add" v-if="$hasPermissions('B_subsidizedProducts_add')" type="primary" class="button-error" @click="openAddModal=true">新增</a-button>
+      <a-button id="subsidizedProducts-edit" v-if="$hasPermissions('B_subsidizedProducts_edit')" type="primary" class="button-info" @click="handleEdit()">批量编辑</a-button>
+      <a-button
+        id="subsidizedProducts-del"
+        v-if="$hasPermissions('B_subsidizedProducts_del')"
+        type="primary"
+        class="button-error"
+        ghost
+        @click="handleDel()">批量删除</a-button>
+      <a-button id="subsidizedProducts-import" v-if="$hasPermissions('B_subsidizedProducts_import')" style="margin-left:5px;" @click="openGuideModal=true">导入</a-button>
       <span style="margin-left: 10px;" v-if="selectTotal">已选{{ selectTotal }}项</span>
     </div>
     <a-spin :spinning="spinning" tip="Loading...">
@@ -148,7 +165,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         categorySn1: undefined, // 商城一级类目
         categorySn2: undefined, // 商城二级类目
-        categoryStatus: '1'// 状态 默认值1
+        categoryStatus: '1', // 状态 默认值1
+        isPromoProduct: undefined // 是否是促销产品
       },
       openAddModal: false, // 打开新增弹窗
       openEditModal: false, // 打开编辑弹窗
@@ -161,10 +179,11 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', align: 'center', width: '13%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品品牌', dataIndex: 'productEntity.productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '13%', align: 'center' },
+        { title: '促销产品', dataIndex: 'promoProductSn', align: 'center', width: '10%', customRender: function (text) { return (!text ? '否' : '是') } },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '11%', align: 'right', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
         { title: '抵扣金额', dataIndex: 'subsidyAmount', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
         { title: '抵扣后售价', dataIndex: 'subsidyedPrice', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
@@ -220,12 +239,14 @@ export default {
     },
     // 报错弹窗
     getErrorInfo (infoTip) {
+      const _this = this
       this.$info({
         title: '提示',
         content: infoTip,
         centered: true,
         onOk () {
           console.log('我知道了')
+          _this.clearChooseData()
         }
       })
     },
@@ -294,6 +315,7 @@ export default {
       this.queryParam.categorySn1 = undefined
       this.queryParam.categorySn2 = undefined
       this.queryParam.categoryStatus = '1'
+      this.queryParam.isPromoProduct = undefined
       this.productType = []
       this.category = []
       this.$refs.table.refresh()

+ 1 - 1
src/views/promotionManagement/subsidizedProducts/subsidyAddModal.vue

@@ -136,7 +136,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商城售价', dataIndex: 'price', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'ocsPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '品牌', dataIndex: 'productBrandName', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', width: '15%', align: 'center', scopedSlots: { customRender: 'productType' } },
         { title: '包装数', width: '10%', align: 'center', scopedSlots: { customRender: 'baozh' } },

+ 12 - 8
src/views/salesManagement/salesQuery/detail.vue

@@ -185,7 +185,12 @@ export default {
       },
       localDataSource: [], // 原始列表数据
       detailData: null, //  详情数据
-      colsArr: [
+      showCell: []// 已选要显示的列
+    }
+  },
+  computed: {
+    colsArr () {
+      return [
         {
           title: '成本价',
           key: 'totalCost',
@@ -198,11 +203,8 @@ export default {
           disabled: !(this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE'),
           checked: false
         }
-      ],
-      showCell: []// 已选要显示的列
-    }
-  },
-  computed: {
+      ]
+    },
     // 是否自建单据
     isOwerEdit () {
       return this.detailData && this.detailData.sourceType == 'SALES'
@@ -226,9 +228,11 @@ export default {
         { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
+      if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
+        arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       // 下级创建,不显示仓库仓位
       if (!this.isOwerEdit) {
         arr.push({ title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })

+ 6 - 19
src/views/salesManagement/salesQueryNew/carInfoModal.vue

@@ -14,28 +14,15 @@
           <a-divider style="margin: 12px 0;" />
         </div>
         <a-descriptions bordered :column="2" size="small" class="head-info-main">
-          <a-descriptions-item label="车型信息:">{{ infoData&&infoData.text || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="品牌:">{{ infoData&&infoData.brand_name || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="车型:">{{ infoData&&infoData.model_name || '--' }}</a-descriptions-item>
+          <!-- <a-descriptions-item label="车型信息:">{{ infoData&&infoData.text || '--' }}</a-descriptions-item> -->
+          <a-descriptions-item label="品牌:">{{ infoData&&infoData.brandName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="车型:">{{ infoData&&infoData.modelName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="品牌LOGO:">
             <img :src="infoData&&infoData.icon?infoData.icon:defImg" width="30" height="30" style="border-radius: 50%;" />
           </a-descriptions-item>
-          <a-descriptions-item label="排量:">{{ infoData&&infoData.sub_name || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="年款:">{{ infoData&&infoData.year || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="车型图:">
-            <div v-if="infoData&&infoData.images.length>0">
-              <img :src="infoData.images[0] || defImg" width="30" height="30" class="imageUrl" @click="inited(infoData.images)" />
-            </div>
-            <span v-else>--</span>
-          </a-descriptions-item>
-          <a-descriptions-item label="车系:">{{ infoData&&infoData.series_name || '--' }}</a-descriptions-item>
-        </a-descriptions>
-        <div class="head-info-con" v-if="infoData&&infoData.params">
-          <p class="head-info-title">配置信息</p>
-          <a-divider style="margin: 12px 0;" />
-        </div>
-        <a-descriptions bordered :column="2" size="small" v-if="infoData&&infoData.params" class="head-info-main">
-          <a-descriptions-item v-for="item in infoData.params" :key="item.type_name" :label="item.type_name+':'">{{ item.value || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="排量:">{{ infoData&&infoData.displacement || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="年款:">{{ infoData&&infoData.modelYear || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="配置信息:">{{ infoData&&infoData.confLevel || '--' }}</a-descriptions-item>
         </a-descriptions>
         <div class="btn-cont"><a-button id="carInfoDetail-modal-back" @click="isShow = false">返回</a-button></div>
       </div>

+ 84 - 18
src/views/salesManagement/salesQueryNew/chooseProductModal.vue

@@ -61,12 +61,11 @@
                 </a-select>
               </a-form-model-item>
             </a-col>
-            <a-col flex="2" v-if="$hasPermissions('B_salerVinFindProduct')">
-              <a-form-model-item label="车架号(VIN)" prop="vinCode">
+            <a-col flex="2" v-if="$hasPermissions('B_salerVinFindProduct')&&sourceType !== 'TRANSFER_ORDER'">
+              <a-form-model-item label="车架号(VIN)" prop="vinCode" class="vininputs">
                 <a-input id="productInfoList-vinCode" v-model.trim="queryParam.vinCode" allowClear placeholder="请输入车架号(VIN)">
-                  <a-icon @click="uploadFun" :type="vinLoading?'loading':'camera'" slot="addonAfter" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
+                  <a-icon slot="addonAfter" @click="showUploadImg=true" :type="vinLoading?'loading':'camera'" :style="{ fontSize: '18px', verticalAlign: 'bottom',cursor:'pointer',padding:'0 10px' }" title="点击拖动图片识别VIN" />
                 </a-input>
-                <input type="file" id="filed" accept="image/jpeg,image/png" hidden="" @change="filePreview">
               </a-form-model-item>
             </a-col>
             <a-col flex="200px">
@@ -90,17 +89,17 @@
         <!-- 查看更多 -->
         <div v-if="hasVaild&&showTable" class="vinInfo-box">
           <div>
-            <div class="vinInfo-error" v-if="vinInfoData&&!vinInfoData.vinInfo">
+            <div class="vinInfo-error" v-if="vinInfoData&&!vinInfoData.carInfo">
               <a-icon type="exclamation-circle" :style="{ color: '#E70012', fontSize: '15px', verticalAlign: 'sub', marginRight: '3px' }" />抱歉!暂未找到匹配VIN码的车型!
             </div>
-            <div v-if="vinInfoData&&vinInfoData.vinInfo" id="productInfoList-carinfo" @click="openCarInfoModal=true">
+            <div v-if="vinInfoData&&vinInfoData.carInfo" id="productInfoList-carinfo" @click="openCarInfoModal=true">
               <div style="display: flex;justify-content: space-between;align-items: center;" id="productInfoList-carinfoMoadl" @click="openCarInfoModal=true">
                 <div>
-                  <img :src="vinInfoData.vinInfo && vinInfoData.vinInfo.icon?(vinInfoData.vinInfo.icon+'?x-oss-process=image/resize,h_30,m_lfit'):defImg" width="30" height="30" class="imageUrl" style="border-radius: 50%;vertical-align: middle;margin-right: 3px;" />
-                  <span style="vertical-align: middle;">{{ vinInfoData.vinInfo.text }}</span>
+                  <img :src="vinInfoData.carInfo && vinInfoData.carInfo.icon?(vinInfoData.carInfo.icon+'?x-oss-process=image/resize,h_30,m_lfit'):defImg" width="30" height="30" class="imageUrl" style="border-radius: 50%;vertical-align: middle;margin-right: 3px;" />
+                  <span style="vertical-align: middle;">{{ vinInfoData.carInfo.brandName }} {{ vinInfoData.carInfo.modelName }} {{ vinInfoData.carInfo.displacement }} {{ vinInfoData.carInfo.modelYear+'年' }}</span>
                 </div>
-                <div style="color: #f90;cursor: pointer;">
-                  <span>查看更多</span> >
+                <div style="color: #f90;cursor: pointer;margin-left: 5px;">
+                  <span>查看详情</span> >
                 </div>
               </div>
             </div>
@@ -210,7 +209,37 @@
       </div>
 
       <!-- 查看车辆信息 -->
-      <car-info-modal ref="carInfoModal" :openModal="openCarInfoModal" :infoData="vinInfoData&&vinInfoData.vinInfo" @close="openCarInfoModal=false" />
+      <car-info-modal ref="carInfoModal" :openModal="openCarInfoModal" :infoData="vinInfoData&&vinInfoData.carInfo" @close="openCarInfoModal=false" />
+      <!-- 上传图片弹窗 -->
+      <a-modal
+        v-model="showUploadImg"
+        class="uploadimg-modal"
+        title="上传图片识别VIN"
+        :footer="null"
+        centered
+        @ok="showUploadImg=false">
+        <div>
+          <a-upload-dragger :before-upload="beforeUpload" accept="image/*" :showUploadList="false">
+            <div class="ant-upload-box">
+              <p class="ant-upload-drag-icon">
+                <a-icon type="inbox" />
+              </p>
+              <p class="ant-upload-text">
+                单击或拖动文件到此区域进行上传
+              </p>
+              <p class="ant-upload-hint">
+                最多一张图片,支持JPG、PNG、BMP格式,最大50M。
+              </p>
+            </div>
+          </a-upload-dragger>
+          <div>
+            <p></p>
+            <p><strong>系统声明:</strong></p>
+            <p>1、本系统仅作为查询辅助工具,在使用中如有对数据与实车配件产品不匹配疑问时,请务必核实实车配件产品及原车维修保养手册所推荐产品标准;</p>
+            <p>2、本系统查询数据仅供参考,请以车辆用户手册为准,一切查询数据均不可作为任何法律和纠错依据或证据。</p>
+          </div>
+        </div>
+      </a-modal>
     </a-spin>
   </a-drawer>
 </template>
@@ -282,6 +311,7 @@ export default {
       vinLoading: false, // vin识别loading
       productType: [], // 产品类型
       defImg, // 默认图片
+      showUploadImg: false, // 上传图片弹框
       queryParam: { //  查询条件
         customerSn: '', // 客户sn
         salesBillSn: '', // 销售单sn
@@ -549,16 +579,22 @@ export default {
     handleDetail (row) {
       this.$emit('viewRecord', row)
     },
-    uploadFun () {
-      document.getElementById('filed').click()
-    },
-    filePreview (e) {
+    beforeUpload (file) {
       const _this = this
-      var files = e.target.files[0]
+      console.log(file)
+      if (file.size > 10240 * 1024 * 5) {
+        _this.$notification.error({
+          message: '提示',
+          description: '文件大小不能超过50M'
+        })
+        return false
+      }
       const formData = new FormData()
       formData.append('savePathType', 'local')
-      formData.append('file', files)
+      formData.append('file', file)
+      // 解析图片
       this.vinLoading = true
+      this.disabled = true
       vinCodeParse(formData).then(res => {
         if (res.type == 'application/json') {
           var reader = new FileReader()
@@ -568,6 +604,8 @@ export default {
               _this.queryParam.vinCode = obj.data || ''
               // 移除表单项的校验结果
               _this.$refs.ruleForm.clearValidate('vinCode')
+              _this.showUploadImg = false
+              _this.searchForm()
             } else {
               _this.$notification.error({
                 message: '提示',
@@ -575,13 +613,15 @@ export default {
               })
             }
             _this.vinLoading = false
-            document.getElementById('filed').value = ''
+            _this.disabled = false
           })
           reader.readAsText(res)
         } else {
           _this.vinLoading = false
+          _this.disabled = false
         }
       })
+      return false
     },
     // 仓库
     getWarehouse () {
@@ -618,6 +658,25 @@ export default {
 </script>
 
 <style lang="less">
+.uploadimg-modal{
+  .ant-upload-box{
+    text-align: center;
+    width:100%;
+    .ant-upload-text {
+        margin: 0 0 4px;
+        color: rgba(0, 0, 0, .85);
+        font-size: 16px;
+    }
+    .ant-upload-hint {
+        color: rgba(0, 0, 0, .45);
+        font-size: 14px;
+    }
+    .ant-upload-drag-icon .anticon {
+        color: #40a9ff;
+        font-size: 48px;
+    }
+  }
+}
 .chooseProduct-drawer {
   .ant-drawer-header{
     padding: 13px 20px;
@@ -647,5 +706,12 @@ export default {
       }
     }
   }
+  .vininputs{
+    .ant-input-group-addon{
+      padding: 0;
+      border:0;
+      border-left: 1px solid #e7e7e7;
+    }
+  }
 }
 </style>

+ 12 - 8
src/views/salesManagement/salesQueryNew/detail.vue

@@ -196,7 +196,12 @@ export default {
       localDataSource: [], // 原始列表数据
       detailData: null, //  详情数据
       isShowBisiceInfo: false, // 显示基础内容
-      colsArr: [
+      showCell: []// 已选要显示的列
+    }
+  },
+  computed: {
+    colsArr () {
+      return [
         {
           title: '成本价',
           key: 'totalCost',
@@ -209,11 +214,8 @@ export default {
           disabled: !(this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE'),
           checked: false
         }
-      ],
-      showCell: []// 已选要显示的列
-    }
-  },
-  computed: {
+      ]
+    },
     // 是否自建单据
     isOwerEdit () {
       return this.detailData && this.detailData.sourceType == 'SALES'
@@ -237,9 +239,11 @@ export default {
         { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
+      if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
+        arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       // 下级创建,不显示仓库仓位
       if (!this.isOwerEdit) {
         arr.push({ title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })

+ 2 - 2
vue.config.js

@@ -209,8 +209,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.113:8550/qpls-md',
-        // target: 'https://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://192.168.2.113:8550/qpls-md',
+        target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,