Преглед изворни кода

Merge commit 'ba5dc98cdac6b865ee2bb92bc4d63fee6753d2a0' into HEAD

gitadmin пре 7 месеци
родитељ
комит
fed4e3888b

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.48",
+    "version": "2.2.482",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 2 - 1
src/utils/util.js

@@ -286,11 +286,12 @@ export function getAuthPriceCode (config, router, store) {
     
     // 从所有的权限菜单中查找当前权限code对应的权限菜单数据
     const authNode = treeFind(authTree,(item)=>item.code == authCode)
-    // console.log(authNode,authCode)
+    console.log(authNode,url.replace(/\//g,'_'))
     if(!authNode){return []}
     if(!authNode.permission){return []}
     // 从找到的对应权限菜单数据中判断当前调用接口的url是否存在,这里和权限菜单中的后台权限code比较
     const hasReqUrl = authNode.permission.split(',').find(item => url.replace(/\//g,'_').indexOf(item)>=0)
+    console.log(hasReqUrl)
     // 如果存在则返回一个如 [1,0,1,0,0] 的格式的价格权限字符串给后台接口
     if(hasReqUrl&&authNode.children&&authNode.children.length){
       return hasPriceAuth(authNode.children,priceOptions,userAuthCode)

+ 2 - 2
src/views/common/productTypeAll.js

@@ -63,8 +63,8 @@ const ProductType = {
       console.log(inputValue, path)
       return path.some(option => option.productTypeName.indexOf(inputValue) > -1);
     },
-    setDefValue(defaultVal){
-      this.handleChange(defaultVal)
+    setDefValue(defaultVal,row){
+      this.handleChange(defaultVal,row)
     },
     handleChange (value,row) {
       this.defaultVal = value

+ 12 - 1
src/views/expenseManagement/expenseReimbursement/employee.js

@@ -29,6 +29,10 @@ const Employee = {
       type: String,
       default: '请选择申请人(输入名称搜索)'
     },
+    notInSn:{
+      type: Array,
+      default: () => []
+    }
   },
   data() {
     return {
@@ -43,6 +47,12 @@ const Employee = {
     value(newValue, oldValue) {
       this.defaultVal = newValue
     },
+    notInSn(a,b){
+      console.log(a,b)
+      if(JSON.stringify(a) !== JSON.stringify(b)){
+        this.getList()
+      }
+    }
   },
   methods: {
     filterOption (input, option) {
@@ -57,7 +67,8 @@ const Employee = {
       this.$emit('input', value);
     },
     getList () {
-      this.list = this.$store.state.app.employeeList
+      console.log(11)
+      this.list = this.$store.state.app.employeeList.filter(item => this.notInSn.indexOf(item.employeeSn)<0)
       if(this.list.length==0){
         employeeQueryList({}).then(res => {
           if (res.status == 200) {

+ 4 - 4
src/views/expenseManagement/expenseReimbursement/epenseCdfModal.vue

@@ -81,11 +81,11 @@
                 v-for="(item,idx) in record.childDetailSplitList"
                 :id="item.id"
                 :key="item.id">
-                <employee style="width: 40%;" placeholder="请选择承担人员" v-model="item.splitObjSn"></employee>
+                <employee style="width: 50%;" placeholder="请选择承担人员" :notInSn="record.childDetailSplitList.filter(a=>a.splitObjSn!=item.splitObjSn).map(b=>b.splitObjSn)" v-model="item.splitObjSn"></employee>
                 -
                 <a-input-number
                   :id="'cdfTable-childsplitAmount-'+index"
-                  style="width: 40%;"
+                  style="width: 30%;"
                   v-model="item.splitAmount"
                   :precision="2"
                   :min="0"
@@ -100,7 +100,7 @@
                     size="small"
                     type="danger"
                     shape="circle"
-                    icon="delete" />
+                    icon="minus" />
                 </div>
                 <div v-if="record.childDetailSplitList&&idx == record.childDetailSplitList.length - 1">
                   <a-button
@@ -127,7 +127,7 @@
             </template>
             <template slot="footer" slot-scope="currentPageData">
               <a-button
-                :id="'cdfTable-add-'+index"
+                id="cdfTable-add-0"
                 type="link"
                 class="button-info"
                 block

+ 29 - 20
src/views/expenseManagement/expenseReimbursement/productInfoModal.vue

@@ -26,9 +26,9 @@
           <a-table
             class="sTable fixPagination"
             ref="table"
-            :scroll="{ y: 200 }"
+            :scroll="{ y: 300 }"
             size="small"
-            :rowKey="(record) => record.id"
+            :rowKey="(record,index) => 'productTable-'+index"
             :columns="columns"
             :data-source="dataList"
             :pagination="false"
@@ -36,7 +36,7 @@
             <div slot="customTitle"><span style="color: red;">*</span>费用金额</div>
             <template slot="action" slot-scope="text,record,index">
               <a-button
-                :id="'productInfoModal-del-'+record.id"
+                :id="'del-'+index"
                 size="small"
                 type="link"
                 class="button-error"
@@ -45,26 +45,30 @@
             </template>
             <!-- 产品品牌 -->
             <template slot="productBrand" slot-scope="text,record,index">
-              <ProductBrand style="width: 100%;" :disabled="!!record.productCode" :id="'productBrand-'+index" @change="productBrandChange" v-model="record.productBrandSn"></ProductBrand>
+              <span v-if="!!record.productCode">{{ record.productBrandName }}</span>
+              <ProductBrand style="width: 100%;" v-else :id="'productBrand-'+index" @change="productBrandChange" v-model="record.productBrandSn"></ProductBrand>
             </template>
             <!-- 产品分类 -->
             <template slot="productType" slot-scope="text,record,index">
+              <span v-if="!!record.productCode">
+                {{ record.productTypeName1 }}>{{ record.productTypeName2 }}>{{ record.productTypeName3 }}
+              </span>
               <ProductTypeAll
+                v-else
                 style="width: 100%;"
-                :disabled="!!record.productCode"
                 :ref="'productType-'+record.no"
-                :id="'productInfoModal-productType-'+record.id"
+                :id="'productType-'+index"
                 v-model="record.productType"
                 @change="changeProductType"></ProductTypeAll>
             </template>
             <!-- 产品编码 -->
             <template slot="productCode" slot-scope="text,record,index">
-              <productCodeList :ref="'productCode-'+record.no" :key="'productCode-'+index" :id="'productCode-'+record.id" @change="e => productCodeChange(e, record)" />
+              <productCodeList :ref="'productCode-'+record.no" :key="'productCode-'+index" :id="'productCode-'+index" @change="productCodeChange" />
             </template>
             <!-- 费用金额 -->
-            <template slot="expense" slot-scope="text,record">
+            <template slot="expense" slot-scope="text,record,index">
               <a-input-number
-                :id="'productInfoModal-expense-'+record.id"
+                :id="'expense-'+index"
                 style="width: 100%;"
                 v-model="record.expense"
                 :precision="2"
@@ -73,9 +77,9 @@
                 placeholder="请输入"
               />
             </template>
-            <template slot="footer" slot-scope="currentPageData">
+            <template slot="footer">
               <a-button
-                :id="'productInfoModal-add-'+record.id"
+                id="productInfoModal-add-0"
                 type="link"
                 class="button-info"
                 v-if="dataList.length==0"
@@ -129,7 +133,7 @@ export default {
       baseData: null, // 详细信息
       columns: [
         { title: '产品品牌', scopedSlots: { customRender: 'productBrand' }, align: 'center', width: '20%' },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '30%' },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '40%' },
         { title: '产品编码', scopedSlots: { customRender: 'productCode' }, align: 'center', width: '20%' },
         // { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'expense' }, align: 'center', width: '20%' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -138,7 +142,9 @@ export default {
   },
   methods: {
     // 产品编码
-    productCodeChange (val, row) {
+    productCodeChange (val, id) {
+      const index = id.split('-')[1]
+      const row = this.dataList[index]
       row.productSn = val.key || undefined
       row.productCode = val.row && val.row.code ? val.row.code : undefined
       row.productName = val.row && val.row.name ? val.row.name : undefined
@@ -152,9 +158,10 @@ export default {
       row.productTypeName3 = val.row && val.row.productTypeName3 ? val.row.productTypeName3 : undefined
       // 设置默认值
       const defval = row.productTypeSn1 || row.productTypeSn2 || row.productTypeSn3 ? [row.productTypeSn1, row.productTypeSn2, row.productTypeSn3] : []
-      this.$set(row, 'productType', defval)
+      row.productType = defval
+      console.log(row)
       this.$nextTick(() => {
-        this.$refs['productType-' + row.no].setDefValue(defval)
+        this.$refs['productType-' + row.no].setDefValue(defval, row)
       })
     },
     // 产品品牌
@@ -165,6 +172,7 @@ export default {
     },
     //  产品分类  change
     changeProductType (val, id, options) {
+      console.log(val, id, options)
       const index = id.split('-')[1]
       const row = this.dataList[index]
       if (val.length > 1) {
@@ -179,7 +187,7 @@ export default {
       } else if (val.length == 1) {
         this.$set(row, 'productType', [])
         this.$nextTick(() => {
-          this.$refs['productType-' + row.no].setDefValue([])
+          this.$refs['productType-' + row.no].setDefValue([], row)
         })
         this.$message.info('不能只选择一级分类')
       }
@@ -265,12 +273,13 @@ export default {
           this.dataList.map(item => {
             item.no = item.id
             this.$nextTick(() => {
-              if (item.productTypeSn1 || item.productTypeSn2 || item.productTypeSn3) {
-                item.productType = [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3]
-                this.$refs['productType-' + item.no].setDefValue([item.productTypeSn1, item.productTypeSn2, item.productTypeSn3])
-              }
               if (item.productCode) {
                 this.$refs['productCode-' + item.no].setDufaultVal(item.productCode)
+              } else {
+                if (item.productTypeSn1 || item.productTypeSn2 || item.productTypeSn3) {
+                  item.productType = [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3]
+                  this.$refs['productType-' + item.no].setDefValue([item.productTypeSn1, item.productTypeSn2, item.productTypeSn3], item)
+                }
               }
             })
           })

+ 6 - 0
src/views/productManagement/productPricing/editModal.vue

@@ -151,6 +151,12 @@ export default {
         ],
         afterSpecialPrice: [
           { required: true, message: '请输入特约价', trigger: 'blur' }
+        ],
+        afterTerminalPrice: [
+          { required: true, message: '请输入终端价', trigger: 'blur' }
+        ],
+        afterCarOwnersPrice: [
+          { required: true, message: '请输入车主价', trigger: 'blur' }
         ]
       },
       detailData: null //  数据详情

+ 3 - 21
src/views/promotionRulesManagement/dealerPromotions/lookUpCustomersModal.vue

@@ -29,18 +29,6 @@
                   <a-input id="lookUpCustomers-purchaseBillNo" v-model="queryParam.dealerName" placeholder="请输入经销商名称" allowClear/>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="客户状态">
-                  <v-select
-                    v-model="queryParam.state"
-                    ref="state"
-                    id="lookUpCustomers-state"
-                    code="PROMOTION_STATE"
-                    placeholder="请选择客户状态"
-                    allowClear
-                  ></v-select>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="lookUpCustomers-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="lookUpCustomers-reset">重置</a-button>
@@ -79,10 +67,6 @@
             <span>{{ record.dealerName ||'--' }}</span>
             <!-- <a-badge count="未" :number-style="{ zoom:'80%' }"></a-badge> -->
           </template>
-          <!-- 客户状态 -->
-        <!--  <template slot="dealerState" slot-scope="text, record">
-            <a-switch checkedChildren="启用" unCheckedChildren="禁用" :checked="record.isEnable" @change="changeStatus"/>
-          </template> -->
         </s-table>
       </a-card>
       <div style="text-align:right;color:#666;" v-if="showType ==='isEdit' || showType === 'isAudit'"><span v-if="showType === 'isAudit'">待审核,</span>增加的客户显示红色,删除的客户显示绿色</div>
@@ -126,7 +110,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 // 组件
-import { STable } from '@/components'
+import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import { hdExportExcel } from '@/libs/exportExcel'
@@ -136,7 +120,7 @@ import { dealerExport } from '@/api/promoTerminal'
 import { queryAuditPageList, dealerMidwayUpdate } from '@/api/promotion'
 export default {
   name: 'LookUpCustomersModal',
-  components: { STable, subarea, AreaList, chooseDealer },
+  components: { STable, VSelect, subarea, AreaList, chooseDealer },
   mixins: [commonMixin],
   props: {
     openModal: { //  弹框显示状态
@@ -173,8 +157,7 @@ export default {
         provinceSn: undefined, // 省
         citySn: undefined, // 市
         districtSn: undefined, // 区
-        dealerName: '', // 经销商名称
-        state: undefined// 客户状态
+        dealerName: '' // 经销商名称
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -206,7 +189,6 @@ export default {
         { title: '经销商名称', dataIndex: 'dealerName', scopedSlots: { customRender: 'dealerName' }, width: '20%', align: 'center', ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
-        // { title: '客户状态', scopedSlots: { customRender: 'dealerState' }, width: '10%', align: 'center' }
       ],
       openDealerModal: false, // 修改弹窗
       updateFlag: false// 是否刷新页面

+ 5 - 0
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -452,6 +452,11 @@ export default {
   watch: {
     salesBillSn (newValue, oldValue) {
       this.resetSearchForm()
+    },
+    spinning (a, b) {
+      if (a) {
+        this.$emit('spinning', a)
+      }
     }
   },
   methods: {

+ 7 - 0
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -291,6 +291,13 @@ export default {
       showStockCol: false // 是否显示第三方库存
     }
   },
+  watch: {
+    spinning (a, b) {
+      if (a) {
+        this.$emit('spinning', a)
+      }
+    }
+  },
   computed: {
     // 已选产品数量
     selectTotal () {

+ 2 - 0
src/views/salesManagement/salesQueryNew/edit.vue

@@ -37,6 +37,7 @@
           <productNormalList
             ref="productNormalList"
             @insterOk="insterActiveOk"
+            @spinning="e=>spinning=e"
             @openCpModal="openProductModal"
             @allThreeStock="searchAllThreeStock"
             :showTotal="showTotal"
@@ -70,6 +71,7 @@
             :id="item.promoRuleSn"
             @openCpModal="openProductModal"
             @insterOk="insterActiveOk"
+            @spinning="e=>spinning=e"
             @showDesc="v => showDescOk(v,item)"
             @upActive="upActive"
             :promo="item"

+ 1 - 0
src/views/salesManagement/stockPrint/list.vue

@@ -504,6 +504,7 @@ export default {
         this.$refs.subarea.clearData()
       }
       this.$refs.table.refresh(true)
+      this.pageInit()
     },
     pageInit () {
       const _this = this

+ 1 - 0
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -263,6 +263,7 @@ export default {
       return {
         disableSelectedRowKeys: this.disableSelectedRowKeys,
         selectedRowKeys: this.selectedRowKeys,
+        hideSelectAll: this.disableSelectedRowKeys.length == this.tableData.length,
         // 行选择改变事件
         selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
           this.selectedRowChange({ row, isSelected, selectedRowKeys })

+ 18 - 2
src/views/salesReturnManagement/salesReturn/detail.vue

@@ -118,7 +118,13 @@
       </a-card>
     </a-spin>
     <!-- 打印导出 -->
-    <print-modal :openModal="openModal" :itemData="detailData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
+    <print-modal
+      :openModal="openModal"
+      :showPrice="nowType=='export'?$hasPermissions('B_salesReturnExport_salesPrice'):$hasPermissions('B_salesReturnPrint_salesPrice')"
+      :itemData="detailData"
+      :nowType="nowType"
+      @ok="handleOk"
+      @close="openModal=false" />
   </div>
 </template>
 
@@ -250,7 +256,15 @@ export default {
       this.nowType = type
       // 选择是否导出价格
       if (a) {
-        this.openModal = true
+        if (type == 'export') {
+          if (this.$hasPermissions('B_salesReturnDetail_salesPrice')) {
+            this.openModal = true
+          } else {
+            this.handleOk({ priceType: 'SALES_RETURN_REASON' })
+          }
+        } else {
+          this.openModal = true
+        }
       } else {
         this.handleOk({ priceType: 'SALES_RETURN_REASON' })
       }
@@ -262,11 +276,13 @@ export default {
       _this.spinning = true
       // 导出
       if (this.nowType == 'export') {
+        this.$store.state.app.curActionPermission = 'B_salesReturnExport'
         exportExcel(salesReturnExport, params, '销售退货', function () {
           _this.spinning = false
           _this.$store.state.app.curActionPermission = ''
         })
       } else {
+        this.$store.state.app.curActionPermission = 'B_salesReturnPrint'
         // 打印或预览
         printFun(salesReturnPrint, params, this.nowType, '销售退货', () => {
           _this.spinning = false

+ 14 - 10
src/views/salesReturnManagement/salesReturn/printModal.vue

@@ -19,16 +19,10 @@
       >
         <a-form-model-item label="销售退货单号">{{ itemData&&itemData.salesReturnBillNo || '--' }}</a-form-model-item>
         <a-form-model-item label="销售退货对象">{{ itemData&&itemData.buyerName || '--' }}</a-form-model-item>
-        <a-form-model-item label="退货价格" prop="priceType" v-if="nowType=='export'">
+        <a-form-model-item label="退货价格" prop="priceType" v-if="showPrice">
           <a-radio-group v-model="form.priceType">
-            <a-radio value="SALES_RETURN_AMOUNT">导出</a-radio>
-            <a-radio value="SALES_RETURN">不导出</a-radio>
-          </a-radio-group>
-        </a-form-model-item>
-        <a-form-model-item label="退货价格" prop="priceType" v-if="nowType!='export'">
-          <a-radio-group v-model="form.priceType">
-            <a-radio value="SALES_RETURN_AMOUNT">打印</a-radio>
-            <a-radio value="SALES_RETURN">不打印</a-radio>
+            <a-radio value="SALES_RETURN_AMOUNT">{{ nowType!='export'?'打印':'导出' }}</a-radio>
+            <a-radio value="SALES_RETURN">{{ nowType!='export'?'不打印':'不导出' }}</a-radio>
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType!='export'">
@@ -63,6 +57,10 @@ export default {
     nowType: {
       type: String,
       default: ''
+    },
+    showPrice: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
@@ -93,7 +91,7 @@ export default {
     // 确认
     handleSave () {
       const _this = this
-      this.$store.state.app.curActionPermission = this.nowType=='export' ? 'B_salesReturnExport' : 'B_salesReturnPrint'
+      this.$store.state.app.curActionPermission = this.nowType == 'export' ? 'B_salesReturnExport' : 'B_salesReturnPrint'
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const obj = {
@@ -127,6 +125,12 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
+      } else {
+        if (this.showPrice) {
+          this.form.priceType = undefined
+        } else {
+          this.form.priceType = 'SALES_RETURN'
+        }
       }
     }
   }

+ 2 - 0
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -562,12 +562,14 @@ export default {
       _this.spinning = true
       // 导出
       if (type == 'export') {
+        this.$store.state.app.curActionPermission = 'B_salesReturnExport'
         exportExcel(salesReturnExport, params, '销售退货', function () {
           _this.spinning = false
           _this.$store.state.app.curActionPermission = ''
         })
       } else {
         // 打印或预览
+        this.$store.state.app.curActionPermission = 'B_salesReturnPrint'
         printFun(salesReturnPrint, params, type, '销售退货', () => {
           _this.spinning = false
           _this.$store.state.app.curActionPermission = ''