lilei 7 mesi fa
parent
commit
970ac804d7
33 ha cambiato i file con 782 aggiunte e 289 eliminazioni
  1. 1 1
      src/api/shopPromo.js
  2. 1 1
      src/config/financialManagement.js
  3. 1 0
      src/store/modules/app.js
  4. 6 0
      src/views/Home.vue
  5. 3 0
      src/views/allocationManagement/transferOut/detail.vue
  6. 20 7
      src/views/allocationManagement/transferOut/dsModal.vue
  7. 24 10
      src/views/allocationManagement/transferOut/edit.vue
  8. 28 5
      src/views/allocationManagement/transferOut/printModal.vue
  9. 1 0
      src/views/allocationManagement/transfersPrint/list.vue
  10. 11 0
      src/views/common/dealerSubareaScopeList.vue
  11. 20 13
      src/views/common/rangeDate.vue
  12. 1 1
      src/views/common/supplier.js
  13. 29 4
      src/views/dataExport/exportSales/list.vue
  14. 2 1
      src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue
  15. 174 109
      src/views/easyPassManagement/promotionalActivities/edit.vue
  16. 7 2
      src/views/easyPassManagement/promotionalActivities/list.vue
  17. 10 2
      src/views/easyPassManagement/promotionalActivities/productTable.vue
  18. 11 11
      src/views/expenseManagement/expenseReimbursement/list.vue
  19. 18 11
      src/views/financialManagement/financialCollection/edit.vue
  20. 37 7
      src/views/financialManagement/financialCollection/fcDetailModal.vue
  21. 32 12
      src/views/financialManagement/financialCollection/fcDetailSxItem.vue
  22. 15 2
      src/views/financialManagement/financialCollection/list.vue
  23. 7 0
      src/views/purchasingManagement/purchaseReceipt/basicInfoModal.vue
  24. 36 8
      src/views/salesManagement/examineVerify/list.vue
  25. 48 8
      src/views/salesManagement/salesQueryNew/comps/productList.vue
  26. 47 1
      src/views/salesManagement/salesQueryNew/comps/productNormalList.vue
  27. 21 27
      src/views/salesManagement/salesQueryNew/comps/updateActiveModal.vue
  28. 36 32
      src/views/salesManagement/salesQueryNew/edit.vue
  29. 2 1
      src/views/salesManagement/salesQueryNew/newPromoModal.vue
  30. 25 11
      src/views/salesReturnManagement/billOfLading/add.vue
  31. 1 1
      src/views/salesReturnManagement/billOfLading/logisticsCompany.js
  32. 1 1
      src/views/salesReturnManagement/billOfLading/logisticsPoint.js
  33. 106 0
      src/views/salesReturnManagement/billOfLading/receiverName.js

+ 1 - 1
src/api/shopPromo.js

@@ -130,7 +130,7 @@ export const delChooseProduct = (params) => {
 }
 
 // 产品选择 清空已选产品
-export const clearByPromoSn = (params) => {
+export const clearProductByPromoSn = (params) => {
   return axios({
     url: '/shopPromoProduct/clearByPromoSn',
     data: params,

+ 1 - 1
src/config/financialManagement.js

@@ -76,7 +76,7 @@ export default {
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:type',
                 name: 'financialCollectionEdit',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/financialCollection/edit.vue'),
                 meta: {

+ 1 - 0
src/store/modules/app.js

@@ -37,6 +37,7 @@ const app = {
     defectiveReturnReason: [], // 不良品申请退货列表
     goodReturnReason: [], // 良品申请退货列表
     bookReason: [], // 收款事由
+    priceLeveList: [], // 价格等级
     tempBillOfData: null, // 临时存储收货单数据
     authMenusList: [], // 权限菜单数据
     priceAuthOptions: [], // 价格权限选项

+ 6 - 0
src/views/Home.vue

@@ -124,6 +124,12 @@ export default {
         key: 'bookReason',
         isEnable: 1
       })
+      // 价格级别
+      vm.getLookUpDataByCode({
+        code: 'PRICE_LEVEL',
+        key: 'priceLeveList',
+        isEnable: 1
+      })
 
       // 菜单数据
       vm.getYyMenuList()

+ 3 - 0
src/views/allocationManagement/transferOut/detail.vue

@@ -91,6 +91,9 @@
                 <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
                 <span v-else>--</span>
               </a-descriptions-item>
+              <a-descriptions-item label="发货说明" :span="4">
+                {{ (basicInfoData&&basicInfoData.explainInfo) || '--' }}
+              </a-descriptions-item>
               <a-descriptions-item label="备注" :span="4">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="附件" :span="4">
                 <div v-if="basicInfoData&&basicInfoData.attachmentList&&basicInfoData.attachmentList.length">

+ 20 - 7
src/views/allocationManagement/transferOut/dsModal.vue

@@ -45,9 +45,9 @@
             <a-input
               id="transferOutDs-explainInfo"
               type="textarea"
-              :maxLength="630"
+              :maxLength="500"
               v-model.trim="form.explainInfo"
-              placeholder="请输入发货说明"/>
+              placeholder="请输入发货说明(最多500个字符)"/>
           </a-form-model-item>
           <a-form-model-item label="备货打印" prop="printState">
             <a-radio-group id="transferOutDs-printState" v-model="form.printState">
@@ -116,6 +116,18 @@ export default {
     }
   },
   methods: {
+    // 初始化
+    pageInit (data) {
+      this.form.sendNo = data.sendNo
+      this.form.printState = data.printState
+      this.form.receiverSn = data.receiverSn
+      this.form.receiverName = data.receiverName
+      this.form.explainInfo = data.explainInfo
+    },
+    //  弹框关闭
+    handleCancel () {
+      this.isShow = false
+    },
     // 获取常用发货编号
     setSendNo (i) {
       this.form.sendNo = i
@@ -165,11 +177,12 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetForm()
-      }
-    },
-    itemId (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        this.getDetail()
+      } else {
+        if (this.form.receiverName && this.dealerLevel != 'OTHER') {
+          this.$nextTick(() => {
+            this.$refs.custList.setDufaultVal(this.form.receiverName)
+          })
+        }
       }
     }
   }

+ 24 - 10
src/views/allocationManagement/transferOut/edit.vue

@@ -56,7 +56,10 @@
             <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="打印状态" :span="2">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="发货说明" :span="4">
+              {{ (basicInfoData&&basicInfoData.explainInfo) || '--' }}
+            </a-descriptions-item>
           </a-descriptions>
           <a-divider>以下信息可修改,请点击<span style="color: dodgerblue;font-size: 14px;cursor: pointer;" @click="editRemark = true" ><a-icon type="form" title="编辑基础信息" />编辑</span></a-divider>
           <a-descriptions :column="4">
@@ -158,16 +161,22 @@
             <span v-if="!$hasPermissions('M_transferOut_edit_salesPrice')">--</span>
             <div v-else>
               <span v-if="record.powerFlag!=0">{{ record.priceLevelDictValue }}</span>
-              <v-select
-                :id="'allocateBillEdit-priceLevelDictValue'+record.id"
+              <a-select
                 v-else
-                style="width:90%;"
+                style="width:100%"
+                placeholder="请选择价格级别"
+                :id="'allocateBillEdit-priceLevel'+record.id"
                 size="small"
-                code="PRICE_LEVEL"
-                v-model="record.priceLevel"
                 allowClear
-                placeholder="请选择价格级别"
-                @change="e => handlePriceLevel(e,index)"></v-select>
+                v-model="record.priceLevel"
+                @change="e => handlePriceLevel(e,index)"
+              >
+                <a-select-option
+                  :id="'allocateBillEdit-priceLevel-'+item.code"
+                  v-for="item in priceLevelList"
+                  :key="item.code"
+                  :value="item.code">{{ item.dispName }}</a-select-option>
+              </a-select>
             </div>
           </template>
           <!-- 调出数量 -->
@@ -470,6 +479,10 @@ export default {
     selNums () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
     },
+    // 价格级别
+    priceLevelList () {
+      return this.$store.state.app.priceLeveList
+    },
     // 表头
     columns () {
       const _this = this
@@ -708,9 +721,10 @@ export default {
     //  提交
     handleOpen () {
       if (this.localDataSource.length) {
-        // 待提交
-        if (this.basicInfoData.state == 'WAIT_SUBMIT' && !this.basicInfoData.sendNo) {
+        // 待提交/待审核/审核不通过,打开发货信息弹框
+        if ((this.basicInfoData.state == 'WAIT_SUBMIT' && !this.basicInfoData.sendNo) || (this.basicInfoData.state == 'WAIT_AUDIT' || this.basicInfoData.state == 'AUDIT_REJECT')) {
           this.showDsModal = true
+          this.$refs.dsModal.pageInit(this.basicInfoData)
         } else {
           this.handleSubmit()
         }

+ 28 - 5
src/views/allocationManagement/transferOut/printModal.vue

@@ -55,6 +55,11 @@
             打印
           </a-checkbox>
         </a-form-model-item>
+        <a-form-model-item label="发货说明" v-if="nowType=='dbPrint'||showExplainInfo">
+          <a-checkbox @change="onChangeExplainInfo" :checked="explainInfoFlag" id="allocateBill-print-explainInfo">
+            打印
+          </a-checkbox>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button id="allocateBill-printcancel" @click="handleClose('preview')">取消</a-button>
@@ -99,6 +104,10 @@ export default {
     nowType: {
       type: String,
       default: ''
+    },
+    showExplainInfo: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -108,11 +117,13 @@ export default {
       form: {
         id: 'all', // 产品分类
         priceType: 'ALLOCATE_BILL', // 产品价格
-        orderBy: undefined, // 排序
-        remarkFlag: 1// 备货打印  1打印 0不打印
+        orderBy: '-1', // 排序
+        remarkFlag: 1, // 备货打印  1打印 0不打印
+        explainInfoFlag: 1 // 发货说明  1打印 0不打印
       },
       //
       remarkFlag: true, // 备货打印
+      explainInfoFlag: true, // 发货说明
       // 表单验证规则
       rules: {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
@@ -154,6 +165,11 @@ export default {
       this.remarkFlag = e.target.checked
       this.form.remarkFlag = e.target.checked ? 1 : 0
     },
+    // 发货说明
+    onChangeExplainInfo (e) {
+      this.explainInfoFlag = e.target.checked
+      this.form.explainInfoFlag = e.target.checked ? 1 : 0
+    },
     // 确认
     handleSave (type) {
       const _this = this
@@ -191,12 +207,17 @@ export default {
               if (_this.form.orderBy != '-1') {
                 obj.orderBy = _this.form.orderBy
               }
+              if (_this.showExplainInfo) {
+                obj.explainInfoFlag = this.form.explainInfoFlag
+              }
             }
           }
           // 打印
           if (this.nowType == 'dbPrint') {
             obj.remarkFlag = this.form.remarkFlag
+            obj.explainInfoFlag = this.form.explainInfoFlag
           }
+          // 打印或分类打印
           if (_this.nowType == 'dbPrint' || _this.nowType == 'dbflPrint') {
             _this.$emit('ok', obj)
           } else {
@@ -226,9 +247,11 @@ export default {
       this.$emit('close')
       this.$refs.ruleForm.resetFields()
       this.form = {
-        id: 'all',
-        priceType: 'ALLOCATE_BILL',
-        remarkFlag: 1
+        id: 'all', // 产品分类
+        priceType: 'ALLOCATE_BILL', // 产品价格
+        orderBy: '-1', // 排序
+        remarkFlag: 1, // 备货打印  1打印 0不打印
+        explainInfoFlag: 1 // 发货说明  1打印 0不打印
       }
       this.remarkFlag = true
     }

+ 1 - 0
src/views/allocationManagement/transfersPrint/list.vue

@@ -166,6 +166,7 @@
       v-drag
       :openModal="openModal"
       :itemData="itemData"
+      showExplainInfo
       nowType="dbflPrint"
       @ok="handleOk"
       @close="openModal=false" />

+ 11 - 0
src/views/common/dealerSubareaScopeList.vue

@@ -79,6 +79,17 @@ export default {
     resetForm () {
       this.dealerName = []
     },
+    setData (value) {
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+    },
+    setDufaultVal (itemSn) {
+      this.fetchUser(itemSn)
+      this.setData({ key: itemSn })
+    },
     // 查询详细
     getDetail (sn) {
       dealerDetailBySn({ sn: sn }).then(res => {

+ 20 - 13
src/views/common/rangeDate.vue

@@ -31,6 +31,14 @@ export default {
     today: {
       type: Boolean,
       default: true
+    },
+    year: {
+      type: Boolean,
+      default: false
+    },
+    minYear: {
+      type: Number,
+      default: 2
     }
   },
   data () {
@@ -42,27 +50,26 @@ export default {
   },
   computed: {
     rangesVal () {
+      const str = {}
       if (this.today) {
-        return {
-          '今天': [moment(), moment()],
-          '近一个月': [moment().subtract(1, 'months'), moment()],
-          '本月': [moment().startOf('month'), moment()],
-          '上月': [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')]
-        }
-      } else {
-        return {
-          '近一个月': [moment().subtract(1, 'months'), moment().subtract(1, 'days')],
-          '本月': [moment().startOf('month'), moment().subtract(1, 'days')],
-          '上月': [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')]
-        }
+        str['今天'] = [moment(), moment()]
+      }
+      str['近一个月'] = [moment().subtract(1, 'months'), moment()]
+      str['本月'] = [moment().startOf('month'), moment()]
+      str['上月'] = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')]
+      if (this.year) {
+        str['近一年'] = [moment().subtract(1, 'years'), moment()]
+        str['本年'] = [moment().startOf('year'), moment()]
+        str['去年'] = [moment().subtract(1, 'years').startOf('year'), moment().subtract(1, 'years').endOf('year')]
       }
+      return str
     }
   },
   methods: {
     // 不可选日期
     disabledDate (current) {
       //  最早可倒推选择两年数据,最晚为今天
-      const minYearVs = moment().subtract(2, 'years') //  两年前   负值
+      const minYearVs = moment().subtract(this.minYear, 'years') //  两年前   负值
       const maxYearVs = this.today ? moment().endOf('day') : moment().subtract(1, 'days').endOf('day') //  今天,包含今天
       //  限制最多只能查一年区间的数据
       if (this.selectPriceDate) {

+ 1 - 1
src/views/common/supplier.js

@@ -79,7 +79,7 @@ const Employee = {
         if (res.status == 200) {
           if (_this.enableFlag != '') {
             if (_this.pageSn === '福麦斯') {
-              _this.list = res.data.filter(item => item.supplierName.includes('福麦斯'))
+              _this.list = res.data.filter(item => item.supplierName.includes('福麦斯') && item.enableFlag == _this.enableFlag)
             } else {
               _this.list = res.data.filter(item => item.enableFlag == _this.enableFlag)
             }

+ 29 - 4
src/views/dataExport/exportSales/list.vue

@@ -37,6 +37,13 @@
               </a-form-model-item>
             </a-col>
           </a-row>
+          <a-row :gutter="15" v-if="queryParam.dateArr == '自主选择时间范围'">
+            <a-col :md="12" :sm="24">
+              <a-form-model-item :wrapper-col="{ span: 16, offset: 8 }" prop="timeDate">
+                <rangeDate ref="rangeDate" :minYear="10" year id="exportSalesList-timeDate" @change="changeDate" />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }">
             <a-button
               type="primary"
@@ -59,13 +66,14 @@ import { hdExportExcel } from '@/libs/exportExcel'
 // 组件
 import { STable, VSelect } from '@/components'
 import warehouse from '@/views/common/chooseWarehouse.js'
+import rangeDate from '@/views/common/rangeDate.vue'
 // 接口
 import { checkWarehouseExcelList } from '@/api/checkWarehouse'
 import { exportSalesOutProduct } from '@/api/stockOut.js'
 export default {
   name: 'ExportSalesList',
   mixins: [commonMixin],
-  components: { STable, VSelect, warehouse },
+  components: { STable, VSelect, warehouse, rangeDate },
   data () {
     return {
       spinning: false,
@@ -76,19 +84,25 @@ export default {
       //  查询条件
       queryParam: {
         dateArr: undefined, // 时间范围
+        timeDate: undefined,
         warehouseSn: undefined// 仓库
       },
       rules: {
         dateArr: [{ required: true, message: '请选择时间范围', trigger: 'change' }],
-        warehouseSn: [{ required: true, message: '请选择仓库', trigger: 'change' }]
+        warehouseSn: [{ required: true, message: '请选择仓库', trigger: 'change' }],
+        timeDate: [{ message: '请选择时间范围', trigger: 'change' }]
       },
-      checkList: []// 时间范围数据
+      checkList: [] // 时间范围数据
     }
   },
   methods: {
+    changeDate (v) {
+      this.queryParam.timeDate = v.join(' 至 ')
+    },
     // 获取时间范围数据
     getList (v) {
       this.queryParam.dateArr = undefined
+      this.queryParam.timeDate = undefined
       this.checkList = []
       if (v) {
         checkWarehouseExcelList({ warehouseSn: this.queryParam.warehouseSn }).then(res => {
@@ -100,6 +114,10 @@ export default {
           } else {
             this.checkList = []
           }
+          this.checkList.push('自主选择时间范围')
+          if (this.checkList[0] == '自主选择时间范围') {
+            this.queryParam.dateArr = this.checkList[0]
+          }
         })
       }
     },
@@ -107,8 +125,15 @@ export default {
     handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
+        if (this.queryParam.dateArr == '自主选择时间范围' && !this.queryParam.timeDate) {
+          this.$message.error('请自主选择时间范围')
+          return
+        }
         if (valid) {
-          const params = _this.queryParam.dateArr.split(' 至 ')
+          let params = _this.queryParam.dateArr.split(' 至 ')
+          if (_this.queryParam.dateArr == '自主选择时间范围') {
+            params = _this.queryParam.timeDate.split(' 至 ')
+          }
           _this.exportLoading = true
           _this.spinning = true
           hdExportExcel(exportSalesOutProduct, { 'beginDate': params[0], 'endDate': params[1] }, '导出销售', function () {

+ 2 - 1
src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue

@@ -130,7 +130,8 @@ export default {
       pagination: {
         pageSize: 20,
         showSizeChanger: true,
-        pageSizeOptions: ['20', '50', '100', '200', '500']
+        pageSizeOptions: ['20', '50', '100', '200', '500'],
+        showTotal: total => `共 ${total} 条`
       },
       pageFlag: false
     }

+ 174 - 109
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -63,17 +63,16 @@
                       v-model="form.allDealerFlag"
                       placeholder="请选择参与经销商"
                       @change="changeDealerScope"
-                      :disabled="true"
                       allowClear>
                       <a-select-option id="promotionList-dealerScope-all" value="1">全部经销商</a-select-option>
                       <a-select-option id="promotionList-dealerScope-some" value="0">部分经销商</a-select-option>
                     </a-select>
                   </a-col>
-                  <a-col :md="3" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
+                  <a-col :md="3" :sm="24" v-show="form.allDealerFlag && form.allDealerFlag!='1' ">
                     <a-button id="promotionList-basicInfo-dealerScope" type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
                   </a-col>
                   <a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
-                    已{{ chooseDealerList.length }}选项
+                    已 {{ chooseDealerList.length }} 选项
                   </a-col>
                   <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
                     <div class="buyerBox">
@@ -86,17 +85,19 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="封面图片" prop="imageUrl" class="promotionEdit-img">
-                <Upload
-                  class="upload"
-                  id="promotionEdit-imageUrl"
-                  v-model="form.imageUrl"
-                  ref="imageSet"
-                  :fileSize="10"
-                  :maxNums="1"
-                  @change="changeImage"
-                  listType="picture-card"></Upload>
-                <span class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(420px)*高(230px)</span>
+              <a-form-model-item label="封面图片" prop="imageUrl">
+                <div style="display:flex;">
+                  <Upload
+                    class="upload"
+                    id="promotionEdit-imageUrl"
+                    v-model="form.imageUrl"
+                    ref="imageSet"
+                    :fileSize="10"
+                    :maxNums="1"
+                    @change="changeImage"
+                    listType="picture-card"></Upload>
+                  <span class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(420px)*高(230px)</span>
+                </div>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
@@ -203,81 +204,84 @@
               <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                 <a-form-model-item prop="productNum" :label="pageType==='BUY_PROD_GIVE_PROD'?'满赠规则': pageType==='PROMO_PROD'?'优惠方式':'返券产品'">
                   <div class="productInfo flex-center">
-                    <!-- 买产品送产品 -->
-                    <div v-if="pageType==='BUY_PROD_GIVE_PROD'">
-                      同款产品买<a-input-number
-                        v-model="conditionValue"
-                        style="margin:0 5px;"
-                        :min="1"
-                        :step="1"
-                        :precision="0"
-                        :max="99999999"
-                        id="promotionEdit-conditionValue"
-                        size="small"/>赠
-                      <a-input-number
-                        v-model="resultValue"
-                        style="margin:0 5px;"
-                        :min="0"
-                        :step="1"
-                        :precision="0"
-                        :max="99999999"
-                        id="promotionEdit-resultValue"
-                        size="small"/>个(数量叠加)
-                      <a-button
-                        type="primary"
-                        id="promotionEdit-addSet-btn"
-                        class="button-primary"
-                        size="small"
-                        @click="handleBatchAdd">批量设置</a-button>
-                    </div>
-                    <!-- 特价产品 -->
-                    <div v-if="pageType==='PROMO_PROD'" style="width:80%;">
-                      <v-select
-                        v-model="form.discountType"
-                        ref="promoState"
-                        id="promotionList-discountType"
-                        code="SHOP_PROMO_DISCOUNT_TYPE"
-                        size="small"
-                        style="width:15%;margin-right:5px;"
-                        @change="handleDiscountType"
-                        placeholder="请选择"
-                        allowClear></v-select>
-                      <span v-show="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '直降':'折扣' }}</span>
-                      <a-input-number
-                        v-model="resultValue"
-                        v-show="form.discountType"
-                        style="width:15%;margin:0 5px;"
-                        :min="0"
-                        :step="1"
-                        :precision="2"
-                        :max="99999999"
-                        id="promotionEdit-resultValue"
-                        size="small"/><span v-show="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '元':'%' }}</span>
-                      <a-button
-                        type="primary"
-                        id="promotionEdit-addSet-btn"
-                        class="button-primary"
-                        size="small"
-                        @click="handleBatchAdd">批量设置</a-button>
-                    </div>
-                    <!-- 买产品返代金券 -->
-                    <div v-if="pageType=='BUY_PROD_GIVE_VALID'">
-                      返券金额
-                      <a-input-number
-                        v-model="resultValue"
-                        style="margin:0 5px;"
-                        :min="0"
-                        :step="1"
-                        :precision="2"
-                        :max="99999999"
-                        id="promotionEdit-resultValue"
-                        size="small"/>元
-                      <a-button
-                        type="primary"
-                        id="promotionEdit-addSet-btn"
-                        class="button-primary"
-                        size="small"
-                        @click="handleBatchAdd">批量设置</a-button>
+                    <div style="display:flex;">
+                      <!-- 买产品送产品 -->
+                      <div v-if="pageType==='BUY_PROD_GIVE_PROD'">
+                        同款产品买<a-input-number
+                          v-model="conditionValue"
+                          style="margin:0 5px;"
+                          :min="1"
+                          :step="1"
+                          :precision="0"
+                          :max="99999999"
+                          id="promotionEdit-conditionValue"
+                          size="small"/>赠
+                        <a-input-number
+                          v-model="resultValue"
+                          style="margin:0 5px;"
+                          :min="0"
+                          :step="1"
+                          :precision="0"
+                          :max="99999999"
+                          id="promotionEdit-resultValue"
+                          size="small"/>个(数量叠加)
+                        <a-button
+                          type="primary"
+                          id="promotionEdit-addSet-btn"
+                          class="button-primary"
+                          size="small"
+                          @click="handleBatchAdd">批量设置</a-button>
+                      </div>
+                      <!-- 特价产品 -->
+                      <div v-if="pageType==='PROMO_PROD'" style="width:80%;">
+                        <v-select
+                          v-model="form.discountType"
+                          ref="promoState"
+                          id="promotionList-discountType"
+                          code="SHOP_PROMO_DISCOUNT_TYPE"
+                          size="small"
+                          style="width:15%;margin-right:5px;"
+                          @change="handleDiscountType"
+                          placeholder="请选择"
+                          allowClear></v-select>
+                        <span v-show="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '直降':'折扣' }}</span>
+                        <a-input-number
+                          v-model="resultValue"
+                          v-show="form.discountType"
+                          style="width:15%;margin:0 5px;"
+                          :min="0"
+                          :step="1"
+                          :precision="2"
+                          :max="99999999"
+                          id="promotionEdit-resultValue"
+                          size="small"/><span v-show="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '元':'%' }}</span>
+                        <a-button
+                          type="primary"
+                          id="promotionEdit-addSet-btn"
+                          class="button-primary"
+                          size="small"
+                          @click="handleBatchAdd">批量设置</a-button>
+                      </div>
+                      <!-- 买产品返代金券 -->
+                      <div v-if="pageType=='BUY_PROD_GIVE_VALID'">
+                        返券金额
+                        <a-input-number
+                          v-model="resultValue"
+                          style="margin:0 5px;"
+                          :min="0"
+                          :step="1"
+                          :precision="2"
+                          :max="99999999"
+                          id="promotionEdit-resultValue"
+                          size="small"/>元
+                        <a-button
+                          type="primary"
+                          id="promotionEdit-addSet-btn"
+                          class="button-primary"
+                          size="small"
+                          @click="handleBatchAdd">批量设置</a-button>
+                      </div>
+                      <span>已选 {{ porductChooseTotal || 0 }} 项</span>
                     </div>
                     <a-button type="primary" id="promotionEdit-add-btn" @click="handleChooseProduct" size="small">选择产品</a-button>
                   </div>
@@ -285,7 +289,7 @@
               </a-col>
               <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                 <div style="width: 83%;margin:0 auto 10px;">
-                  <productTable ref="chooseProductList" :promoActiveSn="form.promoSn" :discountType="form.discountType" :activeType="pageType"></productTable>
+                  <productTable ref="chooseProductList" @changeSel="v=>porductChooseTotal=v" :promoActiveSn="form.promoSn" :discountType="form.discountType" :activeType="pageType"></productTable>
                 </div>
               </a-col>
             </div>
@@ -318,7 +322,7 @@
       @ok="addProductSuccess"
       @close="closeProductModal"></chooseProduct>
     <!-- 选择经销商 -->
-    <chooseDealer :openModal="openDealerModal" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
+    <chooseDealer ref="chooseDearler" :openModal="openDealerModal" :chooseInfo="chooseSnList" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
   </div>
 </template>
 
@@ -378,6 +382,8 @@ export default {
       conditionValue: undefined, // 买产品送产品 买
       resultValue: undefined, // 买产品送产品  赠  返券金额
       chooseDealerList: [], // 所选经销商数据
+      chooseSnList: [], // 已选经销商sn
+      porductChooseTotal: 0, // 已选产品总数
       timeLimit: [], // 有效期
       promotionName: '', // 促销名称
       showProModal: false, // 打开产品弹窗
@@ -401,18 +407,77 @@ export default {
     }
   },
   methods: {
-    // 参与经销商  change
-    changeDealerScope () {},
+    // 部分经销商 删除
+    delBuyerName (row) {
+      const pos = this.chooseDealerList.findIndex(item => item.dealerSn == row.dealerSn)
+      if (pos >= 0) {
+        this.chooseDealerList.splice(pos, 1)
+      }
+    },
+    // 参与经销商 change
+    changeDealerScope (val) {
+      const _this = this
+      const hasProduct = this.$refs.chooseProductList.getChooseProductNum()
+      if (hasProduct > 0) {
+        this.$confirm({
+          title: '提示',
+          content: <div>变更【参与经销商】后将会【<span style="color:red">清空</span>】已选产品列表,确定变更吗?</div>,
+          centered: true,
+          onOk () {
+            _this.form.allDealerFlag = val
+            if (val == '1') {
+              _this.chooseDealerList = []
+            }
+            // 情况产品列表
+            _this.$refs.chooseProductList.clearTable()
+          },
+          onCancel () {
+            _this.form.allDealerFlag = val == '1' ? '0' : '1'
+          }
+        })
+      } else {
+        _this.form.allDealerFlag = val
+        if (val == '1') {
+          _this.chooseDealerList = []
+        }
+      }
+    },
     // 部分 打开选择经销商弹窗
     handleDealerModal () {
+      this.chooseSnList = this.chooseDealerList.map(item => item.dealerSn)
       this.openDealerModal = true
     },
-    // 添加参与经销商成功
-    addDealerOk () {},
-    // 关闭经销商弹窗
+    // 关闭 选择经销商弹窗
     closeDealerModal () {
+      this.chooseSnList = []
       this.openDealerModal = false
     },
+    // 部分经销商  选择经销商成功
+    addDealerOk (list) {
+      const _this = this
+      const hasProduct = this.$refs.chooseProductList.getChooseProductNum()
+      const hasEq = list.filter(item => !this.chooseDealerList.map(k => k.dealerSn).includes(item.dealerSn))
+      if (hasEq.length > 0 && hasProduct > 0) {
+        this.$confirm({
+          title: '提示',
+          content: <div>变更【参与经销商】后将会【<span style="color:red">清空</span>】已选产品列表,确定变更吗?</div>,
+          centered: true,
+          onOk () {
+            _this.chooseDealerList = list
+            _this.openDealerModal = false
+            // 清空产品列表
+            _this.$refs.chooseProductList.clearTable()
+          },
+          onCancel () {
+            _this.$refs.chooseDearler.pageFlag = false
+            _this.$refs.chooseDearler.searchForm()
+          }
+        })
+      } else {
+        _this.chooseDealerList = list
+        _this.openDealerModal = false
+      }
+    },
     // 禁用日期时间
     disabledDate (current) {
       return current && current < moment().startOf('day')
@@ -441,17 +506,10 @@ export default {
     async handleDiscountType (val) {
       this.form.discountType = val
       this.resultValue = undefined
-      // const res = await clearByPromoSn({ promoSn: this.$route.params.sn })
-      // if (res.status == '200') {
-      //   this.$refs.chooseProductList.pageInit()
-      // }
     },
     // 添加产品
     handleChooseProduct () {
       this.showProModal = true
-      // this.$nextTick(() => {
-      //   this.$refs.chooseProduct.resetSearchForm()
-      // })
     },
     // 添加产品成功
     addProductSuccess (list) {
@@ -526,10 +584,12 @@ export default {
           _this.pageType = res.data.promoType
           _this.promotionName = res.data.promoName
         }
-
+        // 部分经销商
+        if (_this.form.allDealerFlag == 0) {
+          _this.chooseDealerList = _this.form.shopPromoDealerList
+        }
         _this.$nextTick(() => {
           _this.$refs.chooseProductList.pageInit()
-          _this.form.productNum = _this.$refs.chooseProductList.getChooseProductNum()
         })
       }
     },
@@ -548,7 +608,6 @@ export default {
     handleSave (type) {
       const _this = this
       // 验证组件必填项
-      console.log('_this.form.productNum ', _this.form.productNum)
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
           _this.savePartInfo(type)
@@ -560,6 +619,14 @@ export default {
       const _this = this
       _this.form.promoType = _this.pageType
       var formData = JSON.parse(JSON.stringify(_this.form))
+      // 部分经销商
+      if (formData.allDealerFlag == '0') {
+        if (_this.chooseDealerList && _this.chooseDealerList.length == 0) {
+          _this.$message.warning('请选择参与经销商!')
+          return
+        }
+        formData.dealerSnList = _this.chooseDealerList.map(con => con.dealerSn)
+      }
       if (formData.promoType === 'BUY_PROD_GIVE_VALID') {
         if (formData.validType === 'FIXED') {
           if (!formData.validStartDate || !formData.validEndDate) {
@@ -582,6 +649,7 @@ export default {
         delete formData.productNum
       }
       delete formData.time
+      delete formData.shopPromoDealerList
       _this.spinning = true
       saveShopPromo(formData).then(res => {
         if (res.status == 200) {
@@ -722,9 +790,6 @@ export default {
     .promotionEdit-cont{
       margin-bottom: 10px;
     }
-    .upload{
-      width: 100%!important;
-    }
     //  文本编辑器  工具栏样式换行
     .promotionEdit-editor{
       .w-e-toolbar{

+ 7 - 2
src/views/easyPassManagement/promotionalActivities/list.vue

@@ -78,7 +78,12 @@
           </template>
           <!-- 参与经销商 -->
           <template slot="joinCustomers" slot-scope="text, record">
-            <span @click="handleCustomers(record)" :id="'promotion-seeDealerInfo-'+record.id" v-if="record.allDealerFlag&&record.allDealerFlag!='1'">共有<span class="link-bule">{{ record.dealerSnList.length }}</span>个客户</span>
+            <div
+              @click="handleCustomers(record)"
+              :id="'promotion-seeDealerInfo-'+record.id"
+              v-if="record.allDealerFlag&&record.allDealerFlag!='1'">
+              共有<span class="link-bule">{{ record.dealerSnList && record.dealerSnList.length||0 }}</span>个客户
+            </div>
             <span v-else>全部经销商</span>
           </template>
           <!-- 促销类型 -->
@@ -260,7 +265,7 @@ export default {
     handleCustomers (row) {
       this.openCustomerModal = true
       this.$nextTick(() => {
-        this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined, promoActiveSn: row.promoActiveSn })
+        this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined, promoSn: row.promoSn })
       })
     },
     // 新增  编辑

+ 10 - 2
src/views/easyPassManagement/promotionalActivities/productTable.vue

@@ -92,7 +92,7 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import { STable } from '@/components'
 // 接口
-import { chooseProductList, delChooseProduct, modifyChooseProduct } from '@/api/shopPromo'
+import { chooseProductList, delChooseProduct, modifyChooseProduct, clearProductByPromoSn } from '@/api/shopPromo'
 export default {
   name: 'ProductTable',
   mixins: [commonMixin],
@@ -130,7 +130,6 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
-              console.log('11111111:', this.activeType)
               if (this.activeType === 'PROMO_PROD') {
                 data.list[i].conditionValue = data.list[i].conditionValue ? data.list[i].conditionValue : data.list[i].shopProductPrice
               }
@@ -174,6 +173,7 @@ export default {
     // 表格选中项
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
+      this.$emit('changeSel', this.selectCount)
     },
     // 批量已选产品信息
     editProductVal (row, typeName) {
@@ -233,6 +233,14 @@ export default {
         }
       })
     },
+    // 清空表格
+    clearTable () {
+      this.spinning = true
+      clearProductByPromoSn({ promoSn: this.promoActiveSn }).then(res => {
+        this.spinning = false
+        this.pageInit()
+      })
+    },
     getChooseProductNum () {
       return this.chooseProductNum
     },

+ 11 - 11
src/views/expenseManagement/expenseReimbursement/list.vue

@@ -148,16 +148,6 @@
               >
                 编辑
               </a-button>
-              <a-button
-                :id="'salesManagementList-del-'+record.id"
-                v-if="record.state=='WAIT_SUBMIT'&&$hasPermissions('B_ERDel')"
-                size="small"
-                type="link"
-                class="button-error"
-                @click="handleDel(record)"
-              >
-                删除
-              </a-button>
               <a-button
                 :id="'salesManagementList-audit-'+record.id"
                 v-if="record.state!='WAIT_SUBMIT'&&$hasPermissions('B_ERAudit')"
@@ -178,6 +168,16 @@
               >
                 再次编辑
               </a-button>
+              <a-button
+                :id="'salesManagementList-del-'+record.id"
+                v-if="(record.state=='WAIT_SUBMIT'||record.state=='AUDIT_REJECT')&&$hasPermissions('B_ERDel')"
+                size="small"
+                type="link"
+                class="button-error"
+                @click="handleDel(record)"
+              >
+                删除
+              </a-button>
             </div>
           </template>
         </s-table>
@@ -394,7 +394,7 @@ export default {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '确认要删除吗?',
+        content: '确定删除该单据吗,删除后不可恢复?',
         centered: true,
         closable: true,
         onOk () {

+ 18 - 11
src/views/financialManagement/financialCollection/edit.vue

@@ -15,7 +15,7 @@
       <a-card size="small" :bordered="false" class="financialCollectionAddcont" v-show="showDetail">
         <div slot="title">
           <span>基础信息</span>
-          <div style="cursor:pointer;color: #00aaff;float:right;" @click.stop="handleEditBase" >
+          <div v-if="!isEditDetail" style="cursor:pointer;color: #00aaff;float:right;" @click.stop="handleEditBase" >
             <a-icon type="edit" /> 编辑基础信息
           </div>
         </div>
@@ -46,7 +46,7 @@
           <div style="display: flex;justify-content: space-between;align-items: center;">
             <div>财务明细</div>
             <div>
-              <a-button size="small" class="button-error" type="primary" @click="handleEdit">新增收款明细</a-button>
+              <a-button v-if="!isEditDetail" size="small" class="button-error" type="primary" @click="handleEdit">新增收款明细</a-button>
             </div>
           </div>
         </div>
@@ -104,6 +104,7 @@
               @click="handleEdit(record)"
             >编辑</a-button>
             <a-button
+              v-if="!isEditDetail"
               size="small"
               type="link"
               class="button-error"
@@ -117,7 +118,7 @@
         <div slot="title">
           <div style="display: flex;justify-content: space-between;align-items: center;">
             <div>关联单据</div>
-            <div>
+            <div v-if="!isEditDetail">
               <a-button size="small" class="button-info" type="primary" @click="showGlSalseModal=true">选择销售单</a-button>
               <a-button size="small" class="button-info" type="primary" @click="showGlAllocaModal=true">选择调拨单</a-button>
             </div>
@@ -140,12 +141,15 @@
           :showPagination="false"
           bordered>
           <template slot="action" slot-scope="text,record">
-            <a-button
-              size="small"
-              type="link"
-              class="button-error"
-              @click="handleGlDel(record)"
-            >删除</a-button>
+            <div>
+              <a-button
+                v-if="!isEditDetail"
+                size="small"
+                type="link"
+                class="button-error"
+                @click="handleGlDel(record)"
+              >删除</a-button>
+            </div>
           </template>
         </s-table>
       </a-card>
@@ -158,7 +162,7 @@
         id="financialCollectionAddsubmit-btn"
         size="large"
         @click="beforeSubmit"
-        style="padding: 0 60px;">提交</a-button>
+        style="padding: 0 60px;">{{ isEditDetail?'保存':'提交' }}</a-button>
     </div>
     <!-- 基础信息 -->
     <baseModal
@@ -347,6 +351,9 @@ export default {
         arr.splice(9, 0, { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '6%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
+    },
+    isEditDetail () {
+      return this.$route.params.type == 1
     }
   },
   methods: {
@@ -423,7 +430,7 @@ export default {
     handleEdit (row) {
       this.openFcDetailModal = true
       if (row && row.bookDetailSn) {
-        this.$refs.fcDetailModal.getDetail(row.bookDetailSn, this.detailData)
+        this.$refs.fcDetailModal.getDetail(row.bookDetailSn, this.detailData, this.isEditDetail)
       } else {
         this.$refs.fcDetailModal.setDetail(this.detailData)
       }

+ 37 - 7
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -21,10 +21,12 @@
               <a-date-picker
                 id="fcDetailModal-receiptDate"
                 inputReadOnly
+                v-if="!isEditDetail"
                 style="width:100%"
                 format="YYYY-MM-DD"
                 v-model="form.receiptDate"
                 placeholder="请选择收款日期" />
+              <span v-else>{{ form.receiptDate }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -101,11 +103,13 @@
               <a-input-number
                 style="width:100%"
                 id="fcDetailModal-orderAmount"
+                v-if="!isEditDetail"
                 :min="0"
                 :max="99999999"
                 :precision="2"
                 placeholder="请输入订单金额"
                 v-model="form.orderAmount"></a-input-number>
+              <span v-else>{{ Number(form.orderAmount).toFixed(2) }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -113,22 +117,26 @@
               <a-input-number
                 style="width:100%"
                 id="fcDetailModal-receiptAmount"
+                v-if="!isEditDetail"
                 :min="0"
                 :max="99999999"
                 :precision="2"
                 placeholder="请输入收款金额"
                 v-model="form.receiptAmount"></a-input-number>
+              <span v-else>{{ Number(form.receiptAmount).toFixed(2) }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="使用授信">
-              <a-checkbox id="fcDetailModal-useCreditFlag" v-model="form.useCreditFlag" @change="form.detailItemUseList=[]">是</a-checkbox>
+              <a-checkbox id="fcDetailModal-useCreditFlag" v-if="!isEditDetail" v-model="form.useCreditFlag" @change="form.detailItemUseList=[]">是</a-checkbox>
+              <span v-else>{{ form.useCreditFlag?'是':'否' }}</span>
               <span v-if="form.useCreditFlag">合计: {{ useTotalAmount||'--' }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="授信还款">
-              <a-checkbox id="fcDetailModal-payCreditFlag" v-model="form.payCreditFlag" @change="form.detailItemPayList=[]">是</a-checkbox>
+              <a-checkbox id="fcDetailModal-payCreditFlag" v-if="!isEditDetail" v-model="form.payCreditFlag" @change="form.detailItemPayList=[]">是</a-checkbox>
+              <span v-else>{{ form.payCreditFlag?'是':'否' }}</span>
               <span v-if="form.payCreditFlag">合计:  {{ payTotalAmount||'--' }}</span>
             </a-form-model-item>
           </a-col>
@@ -136,12 +144,16 @@
             <a-form-model-item style="margin-bottom:5px;" label="余款抵扣">
               <a-input-number
                 id="fcDetailModal-balanceAmount"
+                v-if="!isEditDetail"
                 style="width:100%"
                 :min="0"
                 :max="99999999"
                 :precision="2"
                 placeholder="请输入余款抵扣"
                 v-model="form.balanceAmount"></a-input-number>
+              <span v-else>
+                {{ Number(form.balanceAmount).toFixed(2) }}
+              </span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -149,23 +161,27 @@
               <a-input-number
                 style="width:100%"
                 id="fcDetailModal-nextMonthAmount"
+                v-if="!isEditDetail"
                 :min="0"
                 :max="99999999"
                 :precision="2"
                 placeholder="请输入跨月打款金额"
                 v-model="form.nextMonthAmount"></a-input-number>
+              <span v-else>{{ Number(form.nextMonthAmount).toFixed(2) }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="特殊申请发货">
               <a-input-number
                 style="width:100%"
+                v-if="!isEditDetail"
                 id="fcDetailModal-specialSendAmount"
                 :min="0"
                 :max="99999999"
                 :precision="2"
                 placeholder="请输入特殊申请发货金额"
                 v-model="form.specialSendAmount"></a-input-number>
+              <span v-else>{{ Number(form.specialSendAmount).toFixed(2) }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -173,10 +189,14 @@
               <v-select
                 showType="radio"
                 id="fcDetailModal-fullPaymentFlag"
+                v-if="!isEditDetail"
                 v-model="form.fullPaymentFlag"
                 code="FLAG"
                 placeholder="请选择是否足额打款"
                 allowClear></v-select>
+              <span v-else>
+                {{ form.fullPaymentFlag == '1' ? '是' : '否' }}
+              </span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -199,18 +219,27 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item style="margin-bottom:5px;" label="说明" :labelCol="{span:3}" :wrapper-col="{ span: 20 }">
-              <a-textarea :rows="2" id="fcDetailModal-explainInfo" :maxLength="500" placeholder="请输入说明(最多500个字符)" v-model="form.explainInfo"></a-textarea>
+              <a-textarea
+                :rows="2"
+                v-if="!isEditDetail"
+                id="fcDetailModal-explainInfo"
+                :maxLength="500"
+                placeholder="请输入说明(最多500个字符)"
+                v-model="form.explainInfo"></a-textarea>
+              <div v-else>
+                {{ form.explainInfo||'--' }}
+              </div>
             </a-form-model-item>
           </a-col>
           <!-- 使用授信列表 -->
           <a-col :span="22" :offset="1" v-if="form.useCreditFlag">
             <div style="padding:10px 0">使用授信项目:</div>
-            <fcDetailSxItem title="使用授信" @updateItemAmount="updateUseAmount" :list="form.detailItemUseList" ref="useCreditItem"></fcDetailSxItem>
+            <fcDetailSxItem title="使用授信" @updateItemAmount="updateUseAmount" :readOnly="isEditDetail" :list="form.detailItemUseList" ref="useCreditItem"></fcDetailSxItem>
           </a-col>
           <!-- 授信还款列表 -->
           <a-col :span="22" :offset="1" v-if="form.payCreditFlag">
             <div style="padding:10px 0">授信还款项目:</div>
-            <fcDetailSxItem title="授信还款" @updateItemAmount="updatePayAmount" :list="form.detailItemPayList" ref="payCreditItem"></fcDetailSxItem>
+            <fcDetailSxItem title="授信还款" @updateItemAmount="updatePayAmount" :readOnly="isEditDetail" :list="form.detailItemPayList" ref="payCreditItem"></fcDetailSxItem>
           </a-col>
           <a-col :span="24">
             <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
@@ -257,6 +286,7 @@ export default {
       disabled: false,
       title: '新增收款明细',
       confirmLoading: false,
+      isEditDetail: false,
       bookDetailSn: '', // 收款明细sn
       formItemLayout: {
         labelCol: { span: 6 },
@@ -455,7 +485,6 @@ export default {
       this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
       this.$nextTick(() => {
         if (this.form.dealerSn) {
-          // this.$refs.settleClientName.getDetail(this.form.dealerSn)
           this.getDealerDetail(this.form.dealerSn)
         } else {
           this.form.bankAccount = '张丽添'
@@ -465,11 +494,12 @@ export default {
       })
     },
     //  详情
-    getDetail (bookDetailSn) {
+    getDetail (bookDetailSn, detail, isEditDetail) {
       this.spinning = true
       this.confirmLoading = true
       this.title = '编辑收款明细'
       this.bookDetailSn = bookDetailSn
+      this.isEditDetail = isEditDetail
       financeBookDetailQueryBySn({ bookDetailSn: this.bookDetailSn }).then(res => {
         if (res.status == 200) {
           const data = res.data

+ 32 - 12
src/views/financialManagement/financialCollection/fcDetailSxItem.vue

@@ -2,10 +2,12 @@
   <div>
     <a-table bordered :pagination="false" :columns="columns" :data-source="detailItemList">
       <template slot="itemName" slot-scope="text, record">
-        <a-input v-model="record.itemName" :maxLength="20" :placeholder="'请输入'+title+'项目'"></a-input>
+        <a-input v-if="!readOnly" v-model="record.itemName" :maxLength="20" :placeholder="'请输入'+title+'项目'"></a-input>
+        <div v-else>{{ record.itemName }}</div>
       </template>
       <template slot="itemAmount" slot-scope="text, record">
         <a-input-number
+          v-if="!readOnly"
           style="width:100%"
           :min="0"
           :max="99999999"
@@ -13,17 +15,23 @@
           :placeholder="'请输入'+title+'金额'"
           @change="getTotal"
           v-model="record.itemAmount"></a-input-number>
+        <div v-else>{{ Number(record.itemAmount).toFixed(2) }}</div>
       </template>
       <template slot="action" slot-scope="text, record,index">
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          @click="delItem(record,index)"
-        >删除</a-button>
+        <div>
+          <a-button
+            v-if="!readOnly"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="delItem(record,index)"
+          >删除</a-button>
+        </div>
       </template>
     </a-table>
-    <div style="border:1px solid #eee;border-top:0;"><a-button @click="addItem" type="link" ghost class="button-info" block>+ 新增{{ title }}明细</a-button></div>
+    <div style="border:1px solid #eee;border-top:0;" v-if="!readOnly">
+      <a-button @click="addItem" type="link" ghost class="button-info" block>+ 新增{{ title }}明细</a-button>
+    </div>
   </div>
 </template>
 
@@ -35,17 +43,29 @@ export default {
       type: String,
       default: ''
     },
-    list: [Array]
+    list: [Array],
+    readOnly: {
+      type: Boolean,
+      default: false
+    }
   },
   data () {
     return {
       // 使用授信合集
-      columns: [
+      detailItemList: this.list
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
         { title: this.title + '项目', scopedSlots: { customRender: 'itemName' }, width: '45%', align: 'center' },
         { title: this.title + '金额', scopedSlots: { customRender: 'itemAmount' }, width: '45%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-      ],
-      detailItemList: this.list
+      ]
+      if (this.readOnly) {
+        arr.pop()
+      }
+      return arr
     }
   },
   mounted () {

+ 15 - 2
src/views/financialManagement/financialCollection/list.vue

@@ -159,6 +159,15 @@
             >
               再次编辑
             </a-button>
+            <a-button
+              v-if="record.status=='AUDIT_PASS'&&$hasPermissions('B_againEdit')"
+              size="small"
+              type="link"
+              class="button-info"
+              @click="editDetail(record)"
+            >
+              修改明细
+            </a-button>
           </template>
         </s-table>
       </a-spin>
@@ -318,7 +327,7 @@ export default {
     },
     // 编辑
     handleEdit (row) {
-      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bookSn } })
+      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bookSn, type: 0 } })
     },
     // 删除
     handleDel (row) {
@@ -347,6 +356,10 @@ export default {
       this.openModal = true
       this.itemSn = row.bookSn
     },
+    // 修改明细
+    editDetail (row) {
+      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bookSn, type: 1 } })
+    },
     // 再次编辑
     againEdit (row) {
       const _this = this
@@ -360,7 +373,7 @@ export default {
           financeBookDgainEditBySn({ bookSn: row.bookSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.resetSearchForm()
+              _this.$refs.table.refresh()
             }
             _this.spinning = false
           })

+ 7 - 0
src/views/purchasingManagement/purchaseReceipt/basicInfoModal.vue

@@ -122,6 +122,7 @@ export default {
       warehouseCascadeList({}).then(res => {
         if (res.status == 200) {
           _this.warehouseCascadeData = res.data
+          _this.form.supplierSn = '544577718475575296'
         } else {
           _this.warehouseCascadeData = []
         }
@@ -170,6 +171,12 @@ export default {
     openModal (newValue, oldValue) {
       this.isShow = newValue
     },
+    'form.supplierSn' (newVal, oldVal) {
+      if (newVal == '544577718475575296') {
+        this.form.warehouseSn = '546323677073133568'
+        this.changeWarehouse('546323677073133568')
+      }
+    },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {

+ 36 - 8
src/views/salesManagement/examineVerify/list.vue

@@ -121,14 +121,22 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button
-              size="small"
-              type="link"
-              class="button-info"
-              v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'&&$hasPermissions('B_dispatchAduit')"
-              @click="handleExamine(record)"
-              id="examineVerifyList-examine-btn">备货审核</a-button>
-            <span v-else>--</span>
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'&&$hasPermissions('B_dispatchAduit')"
+                @click="handleExamine(record)"
+                id="examineVerifyList-examine-btn">备货审核</a-button>
+              <!-- <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                v-if="record.billStatus=='OUTING_WAREHOUSE'&&$hasPermissions('B_dispatchAduit')"
+                @click="handleNAudit(record)"
+                id="examineVerifyList-examine-btn">反审核</a-button> -->
+            </div>
           </template>
         </s-table>
       </a-spin>
@@ -316,6 +324,26 @@ export default {
       this.auditInfo = row
       this.visibleAudit = true
     },
+    // 反审核
+    handleNAudit (row) {
+      const _this = this
+      this.$confirm({
+        title: '操作提示',
+        content: '该单据状态会改为待备货审核状态,可再次对该单据进行审核操作,确认操作吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          financeBookDgainEditBySn({ bookSn: row.bookSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
     auditOrder (billStatus) {
       if (billStatus == 'STOCK_UP_REJECT') { // 审核不通过
         // 已对单

+ 48 - 8
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -86,18 +86,23 @@
           <!-- <a-button type="link" class="button-info" @click="searchThreeStock" id="salesEdit-updateStock"><a-icon type="redo"/>第三方库存</a-button> -->
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
-              <a-menu-item key="3" :disabled="disablePromo" :id="'salesEdit-menu-3'+id">
+              <a-menu-item key="3" :disabled="disablePromo" :id="'salesEdit-menu-3-'+id">
                 全部仓库设置
               </a-menu-item>
-              <a-menu-item key="0" :disabled="disablePromo" :id="'salesEdit-menu-0'+id">
+              <a-menu-item key="0" :disabled="disablePromo" :id="'salesEdit-menu-0-'+id">
                 部分仓库设置
               </a-menu-item>
-              <a-menu-item key="1" :id="'salesEdit-menu-1'+id">
+              <a-menu-divider />
+              <a-menu-item key="1" :id="'salesEdit-menu-1-'+id">
                 删除已选项
               </a-menu-item>
-              <a-menu-item key="2" :id="'salesEdit-menu-2'+id">
+              <a-menu-item key="2" :id="'salesEdit-menu-2-'+id">
                 全部删除
               </a-menu-item>
+              <a-menu-divider />
+              <a-menu-item key="4" :disabled="disablePromo" :id="'salesEdit-menu-4-'+id">
+                批量取消促销
+              </a-menu-item>
             </a-menu>
             <a-button
               :id="'salesEdit-plaction-'+id"
@@ -532,6 +537,38 @@ export default {
       this.$refs.table.clearSelected()
       this.$refs.table.refresh(!!flag)
     },
+    // 批量取消出现产品
+    handleBatchCancelActive () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请先选择产品后再进行批量操作!')
+        return
+      }
+      const obj = []
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+        obj.push(item.salesBillDetailSn)
+      })
+      this.$confirm({
+        title: '提示',
+        content: '已选产品' + obj.length + '项,确认要批量取消促销转为正常产品吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          salesDetailBatchDel({
+            salesBillSn: _this.salesBillSn,
+            salesPromoSn: _this.promo.salesPromoSn,
+            salesBillDetailSnList: obj
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$refs.table.refresh(false)
+              _this.$emit('insterOk', 'promo')
+              _this.$message.success(res.message)
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
     // 删除全部产品
     handleBatchDelAll () {
       const _this = this
@@ -633,7 +670,7 @@ export default {
     // 更多操作下拉菜单
     handleMenuClick (e) {
       const _this = this
-      if (e.key == 0) { // 仓库设置
+      if (e.key == 0) { // 部分仓库设置
         if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
           _this.$message.warning('请先选择要设置的产品!')
         } else {
@@ -641,12 +678,14 @@ export default {
         }
       } else if (e.key == 1) { // 删除已选项
         this.handleBatchDel()
-      } else if (e.key == 3) {
+      } else if (e.key == 3) { // 全部仓库设置
         _this.$refs.table.clearSelected()
         _this.warehouseTit = '全部仓库设置'
         _this.openWarehouseModal = true
-      } else {
-        this.handleBatchDelAll()
+      } else if (e.key == 4) { // 批量取消促销
+        _this.handleBatchCancelActive()
+      } else { // 全部删除
+        _this.handleBatchDelAll()
       }
     },
     // 打开换促销活动列表选项
@@ -719,6 +758,7 @@ export default {
     // 更换活动成功
     upAcitveSuccess () {
       this.spinning = false
+      this.$refs.updateActive.confirmLoading = false
       this.openUpActiveModal = false
       this.$refs.table.refresh(false)
     },

+ 47 - 1
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -58,6 +58,7 @@
               <a-menu-item key="0" id="salesEdit-pl-0">
                 部分仓库设置
               </a-menu-item>
+              <a-menu-divider />
               <a-menu-item key="1" id="salesEdit-pl-1">
                 删除已选项
               </a-menu-item>
@@ -160,6 +161,15 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          :loading="delLoading"
+          class="button-info"
+          :id="'salesEdit-addPromo-'+record.id"
+          v-if="hasActive"
+          @click="handleAddPromo(record)"
+        >参与促销</a-button>
         <a-button
           size="small"
           type="link"
@@ -185,6 +195,8 @@
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
     <!-- 仓库设置 -->
     <setWarehouse :show="openWarehouseModal" :title="warehouseTit" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
+    <!-- 换促销 -->
+    <updateActiveModal ref="updateActive" :show="openUpActiveModal" @ok="upActiveOk" @cancel="openUpActiveModal=false"></updateActiveModal>
   </div>
 </template>
 
@@ -193,6 +205,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import ImportGuideModal from './importGuideModal.vue'
 import setWarehouse from './setWarehouse.vue'
+import updateActiveModal from './updateActiveModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
@@ -216,7 +229,8 @@ export default {
     chooseWarehouse,
     setWarehouse,
     ProductBrand,
-    productTypeAll
+    productTypeAll,
+    updateActiveModal
   },
   props: {
     openModal: { //  弹框显示状态
@@ -239,12 +253,17 @@ export default {
     showTotal: { // 是否显示总计
       type: Boolean,
       default: true
+    },
+    hasActive: { // 是否显示参与促销
+      type: Boolean,
+      default: false
     }
   },
   data () {
     return {
       spinning: false,
       loading: false,
+      openUpActiveModal: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -524,6 +543,33 @@ export default {
       this.$refs.table.clearSelected()
       this.$refs.table.refresh(!!flag)
     },
+    // 参与促销
+    handleAddPromo (record) {
+      this.$refs.updateActive.getActiveList({
+        productSn: record.productSn,
+        salesBillSn: this.salesBillSn,
+        promoRuleSn: null
+      }, record)
+      this.openUpActiveModal = true
+    },
+    // 确定参与促销
+    upActiveOk (data, editRow) {
+      this.spinning = true
+      const params = {
+        salesBillDetailSn: editRow.salesBillDetailSn,
+        salesBillSn: this.salesBillSn,
+        priceLevel: editRow.priceLevel
+      }
+      // 参与促销活动
+      this.$emit('addActive', data, params)
+    },
+    // 参与促销活动成功
+    addAcitveSuccess () {
+      this.spinning = false
+      this.$refs.updateActive.confirmLoading = false
+      this.openUpActiveModal = false
+      this.$refs.table.refresh(false)
+    },
     // 删除产品
     handleDel (row) {
       const _this = this

+ 21 - 27
src/views/salesManagement/salesQueryNew/comps/updateActiveModal.vue

@@ -12,36 +12,23 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <div style="padding: 0 30px;">
         <aRadioGroup v-model="upActiveVal">
-          <aRadio :style="radioStyle" value="0">
+          <aRadio :style="radioStyle" value="0" v-if="promoRuleSn">
             不参加促销
           </aRadio>
           <div v-for="(item,idx) in activeList" :key="idx">
             <div>
-              <strong>{{ item.title }}</strong> 
-              <!-- <a-popover title="活动详情">
-                <div slot="content">
-                  <ul class="active-li">
-                    <li><strong>促销类型:</strong> 买产品送产品</li>
-                    <li><strong>促销门槛:</strong> 购买1000元门槛产品,可使用200元配额,采购正价产品</li>
-                    <li><strong>促销规则:</strong> 购买满10个正价产品,送10个促销产品</li>
-                    <li><strong>限制正价产品款数</strong> 40</li>
-                    <li><strong>订单起订金额:</strong> 20000</li>
-                    <li><strong>活动经费上线:</strong> 5000</li>
-                  </ul>
-                </div>
-                <a-button type="link">详情</a-button>
-              </a-popover> -->
+              <strong>{{ item.title }}</strong>
             </div>
             <aRadio :style="radioStyle" v-for="(sitem,sindex) in item.promotionRuleList" :key="sindex" :value="item.promotionSn+'-'+sitem.promotionRuleSn+'-'+sitem.promotionProductType">
-              {{sindex+1}}、{{ sitem.description }}
+              {{ sindex+1 }}、{{ sitem.description }}
             </aRadio>
           </div>
         </aRadioGroup>
       </div>
-        <div style="padding: 30px 0 0;text-align: center;">
-          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
-          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
-        </div>
+      <div style="padding: 30px 0 0;text-align: center;">
+        <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+      </div>
     </a-spin>
   </a-modal>
 </template>
@@ -59,16 +46,22 @@ export default {
     return {
       opened: this.show,
       spinning: false,
-      title: '确定换促销活动?',
       confirmLoading: false,
       upActiveVal: null,
-      radioStyle:"display:block;height: '30px';lineHeight: '30px';padding:5px 0;",
+      radioStyle: "display:block;height: '30px';lineHeight: '30px';padding:5px 0;",
       activeList: null,
-      editRow: null
+      editRow: null,
+      promoRuleSn: null
+    }
+  },
+  computed: {
+    title () {
+      return this.promoRuleSn ? '确定换促销活动?' : '确定参加促销活动?'
     }
   },
   methods: {
-    getActiveList(data, record){
+    getActiveList (data, record) {
+      this.promoRuleSn = data.promoRuleSn
       this.editRow = record
       this.spinning = true
       salesPromoMatchProduct(data).then(res => {
@@ -80,10 +73,11 @@ export default {
     handleSubmit (e) {
       e.preventDefault()
       const _this = this
-      if(_this.upActiveVal){
+      if (_this.upActiveVal) {
+        _this.confirmLoading = true
         _this.$emit('ok', _this.upActiveVal, _this.editRow)
-      }else{
-        _this.$message.info("请选择活动规则!")
+      } else {
+        _this.$message.info('请选择活动规则!')
       }
     },
     cancel () {

+ 36 - 32
src/views/salesManagement/salesQueryNew/edit.vue

@@ -40,7 +40,9 @@
             @spinning="e=>spinning=e"
             @openCpModal="openProductModal"
             @allThreeStock="searchAllThreeStock"
+            @addActive="addActive"
             :showTotal="showTotal"
+            :hasActive="activeList.length>0"
             :detailData="detailData"
             :warehouseSn="warehouseSn"
             :salesBillSn="salesBillSn"></productNormalList>
@@ -144,13 +146,6 @@
       :openModal="showCpModal"
       @close="closeProductModal"
       @addProduct="insterProduct"></chooseProduct>
-    <!-- 价格更新弹窗 -->
-    <!-- <setPriceModal
-      :show="priceUpdateModal"
-      :totalRealAmount="updataData.totalRealAmount"
-      :totalAmount="updataData.totalAmount"
-      @ok="updatePrice"
-      @cancel="priceUpdateModal=false"></setPriceModal> -->
     <!-- 新活动窗口 -->
     <newPromoModal
       :show="showNewActiveModal"
@@ -166,7 +161,6 @@ import { commonMixin } from '@/utils/mixin'
 import productList from './comps/productList.vue'
 import productNormalList from './comps/productNormalList.vue'
 import chooseProduct from './comps/chooseProduct.vue'
-import setPriceModal from './setPriceModal.vue'
 import newPromoModal from './newPromoModal.vue'
 import { salesDisablePromo, salesEnablePromoPromo, salesChangePromo } from '@/api/salesDetailNew'
 import { salesDetailBySn, salesPromoQueryCount, salesWriteSubmit, submitCheck, updateBatch, salesPromoQueryList, salesQueryUnPartPromo, salesPromoValidaSubmit, getThirdStockQty } from '@/api/salesNew'
@@ -174,7 +168,6 @@ export default {
   name: 'SalesNewEdit',
   mixins: [commonMixin],
   components: {
-    setPriceModal,
     productList,
     chooseProduct,
     productNormalList,
@@ -194,7 +187,6 @@ export default {
         totalRealAmount: '',
         totalAmount: ''
       },
-      // priceUpdateModal: false, // 价格更新弹窗
       showDetail: false, // 显示详细基本信息
       showCpModal: false, // 添加产品弹框
       cpCurRefId: '', // 当前操作的活动id
@@ -396,6 +388,40 @@ export default {
         this.$refs[this.cpCurRefId][0].insterProduct(row, promotionFlag, type)
       }
     },
+    // 正常产品添加到活动
+    addActive (data, params) {
+      const promo = data.split('-')
+      const newSn = this.activeList.find(item => item.promoRuleSn == promo[1])
+      const newSalesPromoSn = newSn && newSn.salesPromoSn || ''
+      salesChangePromo({
+        salesPromoSn: newSalesPromoSn,
+        promoRuleSn: promo[1],
+        promotionFlag: promo[2] || '',
+        ...params
+      }).then(res => {
+        if (res.status == 200) {
+          const mlist = []
+          this.spinning = true
+          // 刷新新参与活动
+          if (data != 0) {
+            const nt = this.$refs['productList-' + promo[1]][0]
+            nt && nt.resetSearchForm()
+            mlist.push(nt)
+          }
+
+          // 刷新正常活动
+          const pnt = this.$refs.productNormalList
+          pnt && pnt.addAcitveSuccess()
+          mlist.push(pnt)
+
+          // 判断是否全部调用完
+          this.isAllLoadFinish(mlist)
+
+          // 刷新详情统计
+          this.getOrderDetail()
+        }
+      })
+    },
     // 更换活动
     upActive (oldPromo, data, params) {
       const promo = data.split('-')
@@ -435,28 +461,6 @@ export default {
         }
       })
     },
-    // // 价格变更,需要选择价格类型  并更新价格
-    // updatePrice (type) {
-    //   const ajax_data = {
-    //     salesBillSn: this.salesBillSn,
-    //     productPriceChangeFlag: type
-    //   }
-    //   if (type == 0) {
-    //     this.submitResult(ajax_data)
-    //   } else {
-    //     // 批量更新价格
-    //     updateBatch(this.updataData.detailList).then(res => {
-    //       this.priceUpdateModal = false
-    //       if (res.status == 200) {
-    //         // 刷新详情统计
-    //         this.spinning = true
-    //         this.getOrderDetail(false, () => {
-    //           this.submitResult(ajax_data)
-    //         })
-    //       }
-    //     })
-    //   }
-    // },
     // 提交销售单
     async submitResult () {
       const _this = this

+ 2 - 1
src/views/salesManagement/salesQueryNew/newPromoModal.vue

@@ -4,7 +4,6 @@
     title="新活动提醒"
     centered
     :maskClosable="false"
-    :confirmLoading="confirmLoading"
     width="30%"
     :footer="null"
     @cancel="cancel"
@@ -54,6 +53,7 @@ export default {
     handleSubmit () {
       const _this = this
       if (_this.newPromoSnList.length) {
+        _this.confirmLoading = true
         salesDetailAddPromo({
           'salesBillSn': _this.salesBillSn,
           'promoSnList': _this.newPromoSnList
@@ -61,6 +61,7 @@ export default {
           if (res.status == 200) {
             _this.$emit('ok')
           }
+          _this.confirmLoading = false
         })
       } else {
         _this.$message.info('请选择要参与的新活动')

+ 25 - 11
src/views/salesReturnManagement/billOfLading/add.vue

@@ -36,6 +36,7 @@
                 <logisticsCompany
                   id="billOfLadingEdit-logisticsCompany"
                   ref="logisticsCompany"
+                  @change="changeCompany"
                   v-model.trim="form.logisticsCompany"
                 />
               </a-form-model-item>
@@ -56,12 +57,13 @@
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
               <a-form-model-item label="收货人">
-                <a-input
+                <receiverName
+                  v-model="form.receiverName"
                   id="billOfLadingEdit-receiverName"
-                  :maxLength="30"
-                  v-model.trim="form.receiverName"
-                  placeholder="请输入收货人(最多30个字符)"
-                  allowClear />
+                  code="CONSIGNEE"
+                  @loaded="v=>form.receiverName?'':form.receiverName=v[0]"
+                  allowClear
+                ></receiverName>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -207,13 +209,14 @@ import selectXtModal from './selectXtModal.vue'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import logisticsCompany from './logisticsCompany.js'
 import logisticsPoint from './logisticsPoint'
+import receiverName from './receiverName'
 import chooseDepartUserModal from '../../expenseManagement/expenseReimbursement/chooseDepartUserModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'ProductInfoEdit',
   mixins: [commonMixin],
-  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal, logisticsCompany, logisticsPoint, chooseWarehouse },
+  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal, logisticsCompany, logisticsPoint, chooseWarehouse, receiverName },
   data () {
     return {
       spinning: false,
@@ -310,13 +313,22 @@ export default {
         })
       })
     },
+    // 物流公司变动
+    changeCompany (val) {
+      const point = this.$refs.logisticsCompany.getPoint(val)
+      this.$refs.logisticsPoint.getList(point)
+      this.form.logisticsPoint = point[0]
+    },
     //  详情
-    getDetail () {
+    async getDetail () {
       this.spinning = true
       this.disabled = true
       pickUpDetail({ pickUpSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           const data = res.data
+          if (!data.receiverName) {
+            delete data.receiverName
+          }
           this.form = Object.assign(this.form, data)
           // 获取附件列表
           this.form.attachmentList = ''
@@ -327,10 +339,10 @@ export default {
             this.$refs.dealerSubareaScopeList.getDetail(this.form.senderSn)
           }
           // 物流点
-          // if (this.form.logisticsPoint) {
-          //   const point = this.$refs.logisticsCompany.getPoint(this.form.logisticsCompany)
-          //   this.$refs.logisticsPoint.getList(point)
-          // }
+          if (this.form.logisticsPoint) {
+            const point = this.$refs.logisticsCompany.getPoint(this.form.logisticsCompany)
+            this.$refs.logisticsPoint.getList(point)
+          }
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -450,6 +462,8 @@ export default {
           this.chooseData.push(cd)
         }
       }
+      // 电话
+      this.form.receiverPhone = this.$store.state.user.info && this.$store.state.user.info.mobile
     }
   },
   watch: {

+ 1 - 1
src/views/salesReturnManagement/billOfLading/logisticsCompany.js

@@ -34,7 +34,7 @@ const LogisticsCompany = {
     },
     placeholder: {
       type: String,
-      default: '请输入物流公司(最多50字符)'
+      default: '请选择或输入物流公司(最多50字符)'
     },
     size: {
       type: String,

+ 1 - 1
src/views/salesReturnManagement/billOfLading/logisticsPoint.js

@@ -34,7 +34,7 @@ const LogisticsPoint = {
     },
     placeholder: {
       type: String,
-      default: '请输入物流点(最多50字符)'
+      default: '请选择或输入物流点(最多50字符)'
     },
     defLoad:{
       type: Boolean,

+ 106 - 0
src/views/salesReturnManagement/billOfLading/receiverName.js

@@ -0,0 +1,106 @@
+import { getLookUpData, listLookUp } from '@/api/data'
+const LogisticsPoint = {
+  template: `
+      <a-select
+          allowClear
+          :size="size"
+          mode="combobox"
+          :value="defaultVal"
+          show-search
+          :placeholder="placeholder"
+          option-filter-prop="children"
+          style="width: 100%"
+          :filter-option="filterOption"
+          :dropdownMatchSelectWidth="false"
+          @change="onChange"
+          @blur="onBlur"
+          @focus="open=true"
+          @select="open=false"
+          :open="open"
+        >
+          <a-select-option v-for="item in list" :key="item" :value="item">
+            {{ item }}
+          </a-select-option>
+        </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择或输入收货人(最多30字符)'
+    },
+    defLoad:{
+      type: Boolean,
+      default: true
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    code:{
+      type: String,
+      default: '',
+      required: true
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: [],
+      open: false,
+    };
+  },
+  mounted() {
+    if(this.defLoad){
+      this.getList()
+    }
+  },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue
+    },
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    onChange(value) {
+      const ret = value?value.substr(0,30):''
+      this.defaultVal = ret;
+      this.$emit('change', ret);
+      this.$emit('input', ret);
+    },
+    onBlur(value){
+      this.open = false;
+      this.$emit('blur', value);
+    },
+    getList () {
+      const _this = this
+      getLookUpData({
+        pageNo: 1,
+        pageSize: 1000,
+        lookupCode: _this.code,
+        isEnable:  1
+      }).then(res => {
+        if (res.status == 200) {
+          _this.list = res.data.list.map(item=>item.dispName)
+          _this.$emit('loaded',_this.list)
+        }
+      })
+    },
+    clearData(){
+      this.list = []
+    }
+  },
+};
+
+export default LogisticsPoint