Parcourir la source

Merge commit 'b0e27fdc1c3f1c0cc43edc8f9a74365e0d36cc3c' into HEAD

gitadmin il y a 7 mois
Parent
commit
0be8833642
54 fichiers modifiés avec 1504 ajouts et 742 suppressions
  1. 1 1
      public/version.json
  2. 58 48
      src/api/expenseManagement.js
  3. 1 1
      src/api/shopPromo.js
  4. 126 0
      src/components/SelectInput/index.js
  5. 2 0
      src/components/index.js
  6. 1 1
      src/config/financialManagement.js
  7. 1 0
      src/store/modules/app.js
  8. 6 0
      src/views/Home.vue
  9. 3 0
      src/views/allocationManagement/transferOut/detail.vue
  10. 20 7
      src/views/allocationManagement/transferOut/dsModal.vue
  11. 29 13
      src/views/allocationManagement/transferOut/edit.vue
  12. 28 5
      src/views/allocationManagement/transferOut/printModal.vue
  13. 1 0
      src/views/allocationManagement/transfersPrint/list.vue
  14. 0 89
      src/views/common/auditDetail.vue
  15. 11 0
      src/views/common/dealerSubareaScopeList.vue
  16. 20 13
      src/views/common/rangeDate.vue
  17. 1 1
      src/views/common/supplier.js
  18. 29 4
      src/views/dataExport/exportSales/list.vue
  19. 2 1
      src/views/easyPassManagement/homepageCarouselImg/chooseDealer.vue
  20. 3 3
      src/views/easyPassManagement/homepageCarouselImg/detailModal.vue
  21. 432 0
      src/views/easyPassManagement/promotionalActivities/addPromotionModal.vue
  22. 9 7
      src/views/easyPassManagement/promotionalActivities/chooseProductsModal.vue
  23. 21 34
      src/views/easyPassManagement/promotionalActivities/detailModal.vue
  24. 131 231
      src/views/easyPassManagement/promotionalActivities/edit.vue
  25. 19 4
      src/views/easyPassManagement/promotionalActivities/list.vue
  26. 37 7
      src/views/easyPassManagement/promotionalActivities/lookUpCustomersModal.vue
  27. 12 6
      src/views/easyPassManagement/promotionalActivities/productTable.vue
  28. 1 1
      src/views/expenseManagement/expenseReimbursement/detail.vue
  29. 16 13
      src/views/expenseManagement/expenseReimbursement/list.vue
  30. 6 6
      src/views/expenseManagement/expenseReimbursement/previewModal.vue
  31. 12 8
      src/views/expenseManagement/expenseReimbursement/verifyModal.vue
  32. 22 11
      src/views/financialManagement/financialCollection/edit.vue
  33. 71 66
      src/views/financialManagement/financialCollection/fcDetailModal.vue
  34. 32 12
      src/views/financialManagement/financialCollection/fcDetailSxItem.vue
  35. 20 5
      src/views/financialManagement/financialCollection/list.vue
  36. 11 7
      src/views/financialManagement/financialCollection/verifyModal.vue
  37. 7 0
      src/views/purchasingManagement/purchaseReceipt/basicInfoModal.vue
  38. 9 1
      src/views/purchasingManagement/purchaseReturn/list.vue
  39. 11 7
      src/views/purchasingManagement/purchaseReturn/reviewProgressModal.vue
  40. 36 8
      src/views/salesManagement/examineVerify/list.vue
  41. 60 8
      src/views/salesManagement/salesQueryNew/comps/productList.vue
  42. 47 1
      src/views/salesManagement/salesQueryNew/comps/productNormalList.vue
  43. 34 31
      src/views/salesManagement/salesQueryNew/comps/updateActiveModal.vue
  44. 36 32
      src/views/salesManagement/salesQueryNew/edit.vue
  45. 2 1
      src/views/salesManagement/salesQueryNew/newPromoModal.vue
  46. 26 12
      src/views/salesReturnManagement/billOfLading/add.vue
  47. 7 7
      src/views/salesReturnManagement/billOfLading/detail.vue
  48. 3 3
      src/views/salesReturnManagement/billOfLading/list.vue
  49. 1 1
      src/views/salesReturnManagement/billOfLading/logisticsCompany.js
  50. 1 1
      src/views/salesReturnManagement/billOfLading/logisticsPoint.js
  51. 11 7
      src/views/salesReturnManagement/billOfLading/verifyModal.vue
  52. 13 13
      src/views/salesReturnManagement/salesReturn/auditDetail.vue
  53. 3 2
      src/views/setting/dataValidManagement/list.vue
  54. 2 2
      vue.config.js

+ 1 - 1
public/version.json

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

+ 58 - 48
src/api/expenseManagement.js

@@ -6,7 +6,7 @@ export const departmentQueryList = (params) => {
     url: `/department/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('申请部门查询')
     }
   })
@@ -17,7 +17,7 @@ export const employeeQueryList = (params) => {
     url: `/employee/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('申请人查询')
     }
   })
@@ -27,7 +27,7 @@ export const otherOrgQuery = (params) => {
   return axios({
     url: `/otherorg/queryAll`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('其它往来人员')
     }
   })
@@ -42,7 +42,7 @@ export const expenseAccountList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -54,7 +54,7 @@ export const expenseAccountUpdateBatch = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量更新打印状态')
     }
   })
@@ -66,7 +66,7 @@ export const expenseAccountAgainEdit = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('再次编辑')
     }
   })
@@ -85,7 +85,7 @@ export const expenseAccountSave = (params) => {
     url: `/expenseAccount/save`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('新增')
     }
   })
@@ -96,7 +96,7 @@ export const expenseAccountDelete = (params) => {
     url: `/expenseAccount/deleteBySn/${params.expenseAccountSn}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -107,7 +107,7 @@ export const expenseAccountSubmit = (params) => {
     url: `/expenseAccount/submit`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -118,7 +118,7 @@ export const expenseAcctDetailDelete = (params) => {
   return axios({
     url: `/expenseAcctDetail/deleteDetail/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -129,7 +129,7 @@ export const expenseAcctDetailFindBySn = (params) => {
   return axios({
     url: `/expenseAcctDetail/findBySn/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细')
     }
   })
@@ -140,7 +140,7 @@ export const expenseAcctDetailFindProductsBySn = (params) => {
   return axios({
     url: `/expenseAcctDetail/findDetailProductsBySn/${params.detailSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细产品')
     }
   })
@@ -152,7 +152,7 @@ export const expenseAcctDetailFindList = (params) => {
     url: `/expenseAcctDetail/findList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用明细列表')
     }
   })
@@ -164,7 +164,7 @@ export const expenseAcctDetailSave = (params) => {
     url: `/expenseAcctDetail/saveDetail`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('保存费用明细')
     }
   })
@@ -175,7 +175,7 @@ export const updateBatchExpenseAcctDetail = (params) => {
     url: `/expenseAcctDetail/updateDetailByAccount`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量修改记账名称')
     }
   })
@@ -194,7 +194,7 @@ export const expenseImportDetail = (params) => {
     url: '/expenseAcctDetail/importDetail',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导入费用报销明细')
     }
   })
@@ -205,7 +205,7 @@ export const expenseInsertImport = (params) => {
     url: '/expenseAcctDetail/insertImport',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导入明细')
     }
   })
@@ -217,7 +217,7 @@ export const expenseFailExcel = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出报销明细错误项')
     }
   })
@@ -229,7 +229,7 @@ export const expenseAcctDetailSaveProducts = (params) => {
     url: `/expenseAcctDetail/saveDetailProducts`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('保存费用明细产品')
     }
   })
@@ -244,7 +244,7 @@ export const expenseAccountDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用报销明细列表查询')
     }
   })
@@ -266,19 +266,29 @@ export const expenseAcctDetailReport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('费用报销明细导出')
     }
   })
 }
 
 // 费用报销单审批进度
+// export const getProcessInstance = (params) => {
+//   return axios({
+//     url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
+//     data: params,
+//     method: 'post',
+//     headers:{
+//       'module': encodeURIComponent('审核进度')
+//     }
+//   })
+// }
 export const getProcessInstance = (params) => {
   return axios({
-    url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
+    url: `/dingTalk/queryList`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核进度')
     }
   })
@@ -288,7 +298,7 @@ export const getProcessInstanceList = (params) => {
   return axios({
     url: `/dingTalk/getProcessInstanceList/${params.businessType}/${params.businessSn}`,
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核进度列表')
     }
   })
@@ -299,7 +309,7 @@ export const getDingTalkDepartmentList = (params) => {
     url: `/dingTalk/getDingTalkDepartmentList/${params.deptId}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('钉钉部门列表')
     }
   })
@@ -310,32 +320,32 @@ export const queryDingTalkDeptUser = (params) => {
     url: `/dingTalk/queryDingTalkDeptUser/${params.deptId}/${params.pageNo}/${params.pageSize}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('钉钉人员列表')
     }
   })
 }
 
- // 同步钉钉部门人员
- export const refashDingTalkAllDeptUser = (params) => {
-   return axios({
-     url: `/dingTalk/syncAllDeptUser `,
-     data: params,
-     method: 'post',
-     headers:{
-       'module': encodeURIComponent('刷新部门人员数据')
-     }
-   })
- }
- 
+// 同步钉钉部门人员
+export const refashDingTalkAllDeptUser = (params) => {
+  return axios({
+    url: `/dingTalk/syncAllDeptUser `,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('刷新部门人员数据')
+    }
+  })
+}
+
 // 获取所以部门人员
- export const getDingTalkAllDeptUser = (params) => {
-   return axios({
-     url: `/dingTalk/getAllDeptUser`,
-     data: params,
-     method: 'post',
-     headers:{
-       'module': encodeURIComponent('部门人员数据')
-     }
-   })
- }
+export const getDingTalkAllDeptUser = (params) => {
+  return axios({
+    url: `/dingTalk/getAllDeptUser`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('部门人员数据')
+    }
+  })
+}

+ 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,

+ 126 - 0
src/components/SelectInput/index.js

@@ -0,0 +1,126 @@
+import { getLookUpData, listLookUp } from '@/api/data'
+const LogisticsPoint = {
+  template: `
+      <a-select
+          allowClear
+          :size="size"
+          :mode="isInput?'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="isTree?item.dispName:item" :value="isTree?item.dispName:item">
+            {{ isTree?item.dispName: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
+    },
+    isTree:{
+      type: Boolean,
+      default: false
+    },
+    isInput:{
+      type: Boolean,
+      default: 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):''
+      const child = this.list.find(item => item.dispName==value)
+      this.defaultVal = ret;
+      this.$emit('change', ret, this.isTree?child:null);
+      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) {
+          if(!this.isTree){
+            _this.list = res.data.list.map(item=>item.dispName)
+          }else{
+            const list = []
+            res.data.list.forEach(item=>{
+              list.push({
+                dispName: item.code,
+                code: item.dispName
+              })
+            })
+            _this.list = list
+          }
+          _this.$emit('loaded',_this.list)
+        }
+      })
+    },
+    clearData(){
+      this.list = []
+    }
+  },
+};
+
+export default LogisticsPoint

+ 2 - 0
src/components/index.js

@@ -29,6 +29,7 @@ import ExceptionPage from '@/components/Exception'
 import StandardFormRow from '@/components/StandardFormRow'
 import ArticleListContent from '@/components/ArticleListContent'
 import VSelect from '@/components/Select'
+import SelectInput from '@/components/SelectInput'
 import Upload from '@/components/UploadFile'
 export {
   AvatarList,
@@ -54,6 +55,7 @@ export {
   Tree,
   STable,
   VSelect,
+  SelectInput,
   Upload,
   MultiTab,
   Result,

+ 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)
+          })
+        }
       }
     }
   }

+ 29 - 13
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>
           <!-- 调出数量 -->
@@ -190,7 +199,7 @@
               type="link"
               class="button-primary"
               :loading="spinning"
-              @click="handleAdd(record, false, 'noRefresh')"
+              @click.stop="handleAdd(record, false, 'noRefresh')"
             >添加</a-button>
           </template>
         </s-table>
@@ -313,7 +322,7 @@
               type="link"
               class="button-error"
               :loading="spinning"
-              @click="handleDel(record)"
+              @click.stop="handleDel(record)"
               :id="'allocateBillEdit-del-btn'+record.id">删除</a-button>
           </template>
         </s-table>
@@ -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
@@ -599,7 +612,9 @@ export default {
       return {
         on: {
           dblclick: (event) => {
-            this.handleAdd(record, false, 'noRefresh')
+            if (!this.spinning) {
+              this.handleAdd(record, false, 'noRefresh')
+            }
           }
         }
       }
@@ -708,9 +723,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.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" />

+ 0 - 89
src/views/common/auditDetail.vue

@@ -1,89 +0,0 @@
-<template>
-  <div>
-    <p>说明:以下信息来自钉钉</p>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: 500 }"
-        :showPagination="false"
-        bordered>
-      </s-table>
-    </a-spin>
-  </div>
-</template>
-
-<script>
-import { STable } from '@/components'
-import { getProcessInstance } from '@/api/expenseManagement'
-export default {
-  name: 'AuditDetail',
-  components: { STable },
-  props: {
-    openModal: {
-      type: Boolean,
-      default: false
-    },
-    itemSn: {
-      type: [Number, String],
-      default: ''
-    },
-    businessType: {
-      type: [Number, String],
-      default: ''
-    }
-  },
-  data () {
-    return {
-      spinning: false,
-      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.spinning = true
-        delete parameter.tableId
-        delete parameter.index
-        return getProcessInstance({ businessType: this.businessType, businessSn: this.itemSn }).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = 0
-            for (var i = 0; i < data.length; i++) {
-              data[i].no = no + i + 1
-            }
-            this.spinning = false
-            return data
-          } else {
-            this.spinning = false
-            this.$emit('loadError')
-            return {
-              list: [],
-              count: 0
-            }
-          }
-        })
-      }
-    }
-  },
-  methods: {
-    clearTable () {
-      this.$refs.table.clearTable()
-    },
-    refresh () {
-      this.$refs.table.refresh(true)
-    }
-  }
-}
-</script>
-
-<style>
-</style>

+ 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
     }

+ 3 - 3
src/views/easyPassManagement/homepageCarouselImg/detailModal.vue

@@ -38,10 +38,10 @@
             <img
               :src="form.imageUrl"
               alt="图片走丢了"
-              width="80"
-              height="80"
+              width="750px"
+              height="300px"
               style="margin-right:10px;object-fit: cover;"/>
-            <div class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(420px)*高(230px)</div>
+            <div class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(750px)*高(300px)</div>
           </a-form-model-item>
           <a-form-model-item label="内容类型" prop="contentType">
             {{ form.contentType==='IMAGE_CONTENT'?'图文展示':form.contentType==='VIDEO'?'视频展示':form.contentType==='LINK'?'跳转链接':'促销活动' }}

+ 432 - 0
src/views/easyPassManagement/promotionalActivities/addPromotionModal.vue

@@ -0,0 +1,432 @@
+<template>
+  <a-modal
+    centered
+    class="promotionAdd-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="itemSn?'编辑':'新增'"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="70%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="promotionAdd-con">
+        <a-form-model
+          id="promotionAdd-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol">
+          <a-row>
+            <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="促销名称" prop="promoName" :label-col="{span:6}" :wrapper-col="{span:14}">
+                <a-input
+                  id="promotionAdd-promoName"
+                  :maxLength="20"
+                  v-model.trim="form.promoName"
+                  placeholder="请输入促销名称(最多20个字符)"
+                  allowClear/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="促销时间" prop="time" :label-col="{span:6}" :wrapper-col="{span:14}">
+                <a-range-picker
+                  style="width:100%"
+                  id="promotionAdd-time"
+                  v-model="form.time"
+                  :format="dateFormat"
+                  :disabled-date="disabledDate"
+                  @change="dateChange"
+                  :placeholder="['开始时间', '结束时间']" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="排序" prop="sort">
+                <a-input-number
+                  style="width:37%"
+                  id="promotionAdd-sort"
+                  allowClear
+                  placeholder="请输入排序数字(数字越大越靠后)"
+                  v-model="form.sort"
+                  :min="0"
+                  :max="99999999"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="参与经销商" prop="allDealerFlag">
+                <a-row :gutter="15">
+                  <a-col :md="10" :sm="24">
+                    <a-select
+                      style="width:90%;"
+                      id="promotionAdd-allDealerFlag"
+                      v-model="form.allDealerFlag"
+                      placeholder="请选择参与经销商"
+                      @change="changeDealerScope"
+                      allowClear>
+                      <a-select-option id="promotionAdd-dealerScope-all" value="1">全部经销商</a-select-option>
+                      <a-select-option id="promotionAdd-dealerScope-some" value="0">部分经销商</a-select-option>
+                    </a-select>
+                  </a-col>
+                  <a-col :md="3" :sm="24" v-show="form.allDealerFlag && form.allDealerFlag!='1' ">
+                    <a-button id="promotionAdd-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 }} 选项
+                  </a-col>
+                  <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
+                    <div class="buyerBox">
+                      <a-tag closable v-for="con in chooseDealerList" id="promotionAdd-dealerSn" :key="con.dealerSn" @close="delBuyerName(con)">
+                        {{ con.dealerName }}
+                      </a-tag>
+                    </div>
+                  </a-col>
+                </a-row>
+              </a-form-model-item>
+            </a-col>
+            <a-col
+              :xs="24"
+              :sm="24"
+              :md="24"
+              :lg="24"
+              :xl="24"
+              class="imageUrl_box">
+              <a-form-model-item label="封面图片" prop="imageUrl">
+                <Upload
+                  class="upload"
+                  id="promotionAdd-imageUrl"
+                  v-model="form.imageUrl"
+                  ref="imageSet"
+                  :fileSize="10"
+                  :maxNums="1"
+                  @change="changeImage"
+                  listType="picture-card"></Upload>
+                <div class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(750px)*高(300px)</div>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="促销描述" prop="description">
+                <a-input
+                  v-model="form.description"
+                  type="textarea"
+                  id="promotionAdd-description"
+                  placeholder="请输入促销描述(最多500个字符)"
+                  :maxLength="500" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <a-form-model-item label="加盟商开关权限" prop="dealerOpenFlag">
+                <v-select
+                  v-model="form.dealerOpenFlag"
+                  id="promotionAdd-dealerOpenFlag"
+                  code="FLAG"
+                  showType="radio"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button id="promotionAdd-close-btn" style="margin-right: 15px;" @click="isShow = false">取消</a-button>
+          <a-button
+            type="primary"
+            class="button-primary"
+            :disabled="spinning"
+            id="promotionAdd-submit-btn"
+            @click="handleSave()">保存</a-button>
+        </div>
+      </div>
+    </a-spin>
+    <!-- 选择经销商 -->
+    <chooseDealer ref="chooseDearler" :openModal="openDealerModal" :chooseInfo="chooseSnList" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+// 组件
+import { STable, VSelect, Upload } from '@/components'
+import chooseDealer from '@/views/easyPassManagement/homepageCarouselImg/chooseDealer'
+// 接口
+import { shopPromoDetail, saveShopPromo } from '@/api/shopPromo'
+
+export default {
+  name: 'AddPromotionModal',
+  mixins: [commonMixin],
+  components: { STable, VSelect, Upload, chooseDealer },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {// 活动sn
+      type: String,
+      default: ''
+    },
+    typeVal: {// 添加活动类型
+      type: String,
+      default: ''
+    },
+    chooseProductNum: {
+      type: [String, Number],
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false, // 页面加载状态
+      // form表单label布局
+      formItemLayout: {
+        labelCol: { span: 3 },
+        wrapperCol: { span: 19 }
+      },
+      dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
+      chooseDealerList: [], // 已选择的经销商列表
+      chooseSnList: [], // 已选经销商sn集合
+      openDealerModal: false, // 经销商弹窗
+      isAllDealerFlag: null, // 是否是全部经销商
+      form: {
+        promoType: undefined, // 促销类型
+        promoName: '', // '促销名称'
+        time: [], // 促销时间
+        promoStartDate: undefined, // 促销时间-开始
+        promoEndDate: undefined, // 促销时间-结束
+        sort: undefined, // 排序
+        allDealerFlag: '1', // 全部经销商 1   部分经销商0'
+        imageUrl: undefined, // 促销封面图
+        description: '', // '促销描述'
+        dealerEditFlag: '0', // 加盟商编辑 0否 1是
+        dealerOpenFlag: '0' // 加盟商开关权限 0否 1是
+      },
+      // 表单验证规则
+      rules: {
+        promoName: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
+        time: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
+        sort: [{ required: true, message: '请输入排序数字', trigger: 'blur' }],
+        allDealerFlag: [{ required: true, message: '请选择参与经销商', trigger: 'change' }],
+        imageUrl: [{ required: true, message: '请选择要上传的封面图片', trigger: 'change' }],
+        description: [{ required: true, message: '请输入促销描述内容', trigger: 'blur' }],
+        dealerOpenFlag: [{ required: true, message: '请选择加盟商开关权限', trigger: 'change' }]
+      }
+    }
+  },
+  methods: {
+    //  封面图片上传
+    changeImage (file) {
+      this.form.imageUrl = file
+    },
+    // 参与经销商 change
+    changeDealerScope (val) {
+      const _this = this
+      _this.form.allDealerFlag = val
+      if (val == '1' || !val) {
+        _this.chooseDealerList = []
+      }
+    },
+    // 部分 打开选择经销商弹窗
+    handleDealerModal () {
+      this.chooseSnList = this.chooseDealerList.map(item => item.dealerSn)
+      this.openDealerModal = true
+    },
+    // 关闭 选择经销商弹窗
+    closeDealerModal () {
+      this.chooseSnList = []
+      this.openDealerModal = false
+    },
+    // 部分经销商  选择经销商成功
+    addDealerOk (list) {
+      const _this = this
+      _this.chooseDealerList = list
+      _this.openDealerModal = false
+    },
+    // 部分经销商 删除
+    delBuyerName (row) {
+      const pos = this.chooseDealerList.findIndex(item => item.dealerSn == row.dealerSn)
+      if (pos >= 0) {
+        this.chooseDealerList.splice(pos, 1)
+      }
+    },
+    // 禁用日期时间
+    disabledDate (current) {
+      return current && current < moment().startOf('day')
+    },
+    // 促销时间  change
+    dateChange (date, dateStrings) {
+      if (dateStrings && dateStrings[0]) {
+        this.form.time = dateStrings
+        this.form.promoStartDate = date.length ? dateStrings[0] + ' 00:00:00' : ''
+        this.form.promoEndDate = date.length ? dateStrings[1] + ' 23:59:59' : ''
+      } else {
+        this.form.time = []
+      }
+    },
+    // 保存
+    handleSave () {
+      const _this = this
+      // 验证组件必填项
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.form.promoType = _this.typeVal
+          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 (_this.itemSn && _this.itemSn.length > 0) {
+            const hasEq = _this.chooseDealerList.filter(item => !formData.shopPromoDealerList.map(k => k.dealerSn).includes(item.dealerSn)) // 经销商是否变更
+            const hasEq1 = _this.isAllDealerFlag == 0 && formData.allDealerFlag == 1 // 部分变全部
+            const hasChange = _this.isAllDealerFlag == 0 && _this.isAllDealerFlag == formData.allDealerFlag // 是否部分经销商未变更
+            console.log(hasEq, hasEq1)
+            if (_this.chooseProductNum > 0 && (hasChange && hasEq && hasEq.length > 0 || hasEq1)) {
+              _this.$confirm({
+                title: '提示',
+                content: <div>变更【参与经销商】后将会【<span style="color:red">清空</span>】已选产品列表,确定变更吗?</div>,
+                centered: true,
+                onOk () {
+                  _this.saveSuccess(formData, '1')
+                }
+              })
+            } else {
+              _this.saveSuccess(formData, '0')
+            }
+          } else {
+            _this.saveSuccess(formData, '0')
+          }
+        }
+      })
+    },
+    saveSuccess (ajaxData, type) {
+      const _this = this
+      _this.spinning = true
+      delete ajaxData.time
+      delete ajaxData.shopPromoDealerList
+      ajaxData.saveType = 'alone'
+      saveShopPromo(ajaxData).then(res => {
+        if (res.status == 200) {
+          _this.spinning = false
+          if (res.data.errorMsg && res.data.errorMsg.length > 0) {
+            this.$confirm({
+              title: '提示',
+              content: res.data.errorMsg.map((item, i) => { return <p>{i * 1 + 1}、{item}</p> }),
+              centered: true,
+              okText: '知道了',
+              cancelText: '取消', // 将cancelText设置为空字符串或去掉该属性可以隐藏取消按钮
+              cancelButtonProps: {
+                style: {
+                  display: 'none' // 通过设置样式隐藏取消按钮
+                }
+              },
+              onOk () {
+                console.log('知道了')
+              }
+            })
+            return
+          }
+          _this.$message.success(res.message)
+          _this.$nextTick(() => {
+            _this.isShow = false
+            _this.$emit('ok', type)
+          })
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    // 重置
+    resetSearchForm () {
+      this.form = {
+        promoType: undefined, // 促销类型
+        promoName: '', // '促销名称'
+        time: [], // 促销时间
+        promoStartDate: undefined, // 促销时间-开始
+        promoEndDate: undefined, // 促销时间-结束
+        sort: undefined, // 排序
+        allDealerFlag: '1', // 全部经销商 1   部分经销商0'
+        imageUrl: undefined, // 促销封面图
+        description: '', // '促销描述'
+        dealerEditFlag: '0', // 加盟商编辑 0否 1是
+        dealerOpenFlag: '0' // 加盟商开关权限 0否 1是
+      }
+      this.chooseDealerList = []
+      if (this.$refs.imageSet) {
+        this.$refs.imageSet.setFileList('')
+      }
+      if (this.$refs.ruleForm) {
+        this.$refs.ruleForm.resetFields()
+      }
+    },
+    //  详情
+    async getDetail () {
+      const _this = this
+      const res = await shopPromoDetail({ sn: _this.itemSn })
+      if (res.status == 200) {
+        if (res.data.promoStartDate && res.data.promoEndDate) {
+          const startTime = res.data.promoStartDate.split(' ')[0]
+          const endTime = res.data.promoEndDate.split(' ')[0]
+          res.data.time = [startTime, endTime]
+        }
+        if (res.data.imageUrl) {
+          _this.$refs.imageSet.setFileList(res.data.imageUrl)
+        }
+        _this.form = res.data
+        _this.isShowNextStep = true
+        if (_this.$route.params.pageType === 'edit') {
+          _this.pageType = res.data.promoType
+          _this.promotionName = res.data.promoName
+        }
+        _this.isAllDealerFlag = _this.form.allDealerFlag // 存储是否是全部经销商
+        // 部分经销商
+        if (_this.form.allDealerFlag == 0) {
+          _this.chooseDealerList = _this.form.shopPromoDealerList
+        }
+      }
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .promotionAdd-modal{
+    /deep/.imageUrl_box .ant-form-item-control{
+      line-height:0 !important;
+    }
+    .upload-desc{// 商品图片描述
+    padding-top:10px;
+      font-size: 12px;
+      color: #808695;
+    }
+    .buyerBox{
+      border:1px solid #d9d9d9;
+      margin-top:10px;
+      border-radius:4px;
+      padding:4px 10px;
+      background:#f2f2f2;
+      max-height:130px;
+      overflow-y:scroll;
+      scrollbar-width: none;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+
+</style>

+ 9 - 7
src/views/easyPassManagement/promotionalActivities/chooseProductsModal.vue

@@ -116,6 +116,10 @@ export default {
       default: () => {
         return []
       }
+    },
+    propmSn: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -159,6 +163,7 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
+        params.promoSn = this.propmSn
         // 获取列表数据 有分页
         return shopPromoProductList(params).then(res => {
           let data
@@ -242,14 +247,11 @@ export default {
         const _this = this
         _this.resetData()
         if (_this.chooseData && _this.chooseData.length > 0) {
-          let selectedRows = []
-          const selectedRowKeys = []
-          _this.chooseData.forEach(item => {
-            selectedRowKeys.push(item.goodsSn)
-          })
-          selectedRows = _this.chooseData
+          let selectedRowKeys = _this.chooseData.map(item => {
+            return item.goodsSn
+            })
           this.$nextTick(() => { // 页面渲染完成后的回调
-            _this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
+            _this.$refs.table.setTableSelected(selectedRowKeys, _this.chooseData) // 设置表格选中项
           })
         }
       }

+ 21 - 34
src/views/easyPassManagement/promotionalActivities/detailModal.vue

@@ -14,17 +14,16 @@
           id="promotion-basicInfo-form"
           ref="ruleForm"
           :model="form"
-          :rules="rules"
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol" >
           <a-row>
             <a-col :xs="12" :sm="12">
-              <a-form-model-item label="促销名称" prop="promoName" :label-col="{span:8}" :wrapper-col="{span:14}">
+              <a-form-model-item label="促销名称" prop="promoName" required :label-col="{span:8}" :wrapper-col="{span:14}">
                 {{ form.promoName }}
               </a-form-model-item>
             </a-col>
             <a-col :xs="12" :sm="12">
-              <a-form-model-item label="促销时间" prop="promoName" :label-col="{span:8}" :wrapper-col="{span:14}">
+              <a-form-model-item label="促销时间" prop="promoName" required :label-col="{span:8}" :wrapper-col="{span:14}">
                 {{ form.promoStartDate }}~{{ form.promoEndDate }}
               </a-form-model-item>
             </a-col>
@@ -34,35 +33,35 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="12" :sm="12">
-              <a-form-model-item label="参与经销商" prop="allDealerFlag" :label-col="{span:8}" :wrapper-col="{span:14}">
+              <a-form-model-item label="参与经销商" required prop="allDealerFlag" :label-col="{span:8}" :wrapper-col="{span:14}">
                 {{ form.allDealerFlag=='1'?'全部经销商':'部分经销商' }}
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24">
-              <a-form-model-item label="封面图片" prop="imageUrl">
+              <a-form-model-item label="封面图片" required prop="imageUrl">
                 <img
                   :src="form.imageUrl"
                   alt="图片走丢了"
-                  width="80"
-                  height="80"
+                  width="750px"
+                  height="300px"
                   style="margin-right:10px;object-fit: cover;"/>
-                <div class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(420px)*高(230px)</div>
+                <div class="upload-desc">说明:单张大小小于10Mb;建议尺寸:宽(750px)*高(300px)</div>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24">
-              <a-form-model-item label="促销描述" prop="description" >
+              <a-form-model-item label="促销描述" prop="description" required>
                 {{ form.description||'--' }}
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24">
-              <a-form-model-item label="加盟商开关权限:" prop="dealerOpenFlag" >
+              <a-form-model-item label="加盟商开关权限:" prop="dealerOpenFlag" required>
                 {{ form.dealerOpenFlag?form.dealerOpenFlag==='1'?'是':'否':'--' }}
               </a-form-model-item>
             </a-col>
             <div v-if="form.promoType==='BUY_PROD_GIVE_VALID'">
               <a-col :xs="12" :sm="12">
-                <a-form-model-item label="券名称" prop="validName" :label-col="{span:8}" :wrapper-col="{span:14}">
-                  {{ form.validName }}
+                <a-form-model-item label="券名称" prop="validName" required :label-col="{span:8}" :wrapper-col="{span:14}">
+                  {{ form.validName||'--' }}
                 </a-form-model-item>
               </a-col>
               <a-col :xs="12" :sm="12">
@@ -76,14 +75,17 @@
                 </a-form-model-item>
               </a-col> -->
               <a-col :xs="24" :sm="24">
-                <a-form-model-item label="券有效期" prop="validType">
-                  <span>{{ form.validType==='FIXED'?'固定日期':'领取后,立即生效' }}</span>
-                  <span style="margin-left:10px;" v-if="form.validType==='FIXED'">{{ form.validStartDate }}~{{ form.validEndDate }}</span>
-                  <span style="margin-left:10px;" v-else>有效期{{ form.validDays }}天</span>
+                <a-form-model-item label="券有效期" prop="validType" required>
+                  <div v-if="form.validType">
+                    <span>{{ form.validType==='FIXED'?'固定日期':'领取后,立即生效' }}</span>
+                    <span style="margin-left:10px;" v-if="form.validType==='FIXED'">{{ form.validStartDate }}~{{ form.validEndDate }}</span>
+                    <span style="margin-left:10px;" v-else>有效期{{ form.validDays }}天</span>
+                  </div>
+                  <div v-else>--</div>
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24">
-                <a-form-model-item label="券适用范围" prop="validScope">
+                <a-form-model-item label="券适用范围" prop="validScope" required>
                   {{ form.validScope=='1'?'全部产品':'--' }}
                 </a-form-model-item>
               </a-col>
@@ -94,7 +96,7 @@
               </a-col>
             </div>
             <a-col :xs="24" :sm="24">
-              <a-form-model-item :label="form.promoType==='BUY_PROD_GIVE_PROD'?'满赠规则': form.promoType==='PROMO_PROD'?'优惠方式':'返券产品'" prop="promoName" >
+              <a-form-model-item required :label="form.promoType==='BUY_PROD_GIVE_PROD'?'满赠规则': form.promoType==='PROMO_PROD'?'优惠方式':'返券产品'" prop="promoName" >
                 <div class="productTable">
                   <s-table
                     class="sTable"
@@ -177,21 +179,6 @@ export default {
         validScope: '1', // 券适用范围标记 1-全部 0-指定  死值 1
         validInfo: '' // 使用说明
       },
-      // 表单验证规则
-      rules: {
-        promoName: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
-        time: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
-        sort: [{ required: true, message: '请输入排序数字', trigger: 'blur' }],
-        allDealerFlag: [{ required: true, message: '请选择参与经销商', trigger: 'change' }],
-        imageUrl: [{ required: true, message: '请选择要上传的封面图片', trigger: 'change' }],
-        description: [{ required: true, message: '请输入促销描述内容', trigger: 'blur' }],
-        dealerOpenFlag: [{ required: true, message: '请选择加盟商开关权限', trigger: 'change' }],
-        rangeList: [{ required: true, message: '请选择促销产品', trigger: 'change' }],
-        validName: [{ required: true, message: '请输入券名称', trigger: ['change', 'blur'] }],
-        validBaseType: [{ required: true, message: '请选择生成方式', trigger: 'change' }],
-        validType: [{ required: true, message: '请选择券有效期类型', trigger: 'change' }],
-        validScope: [{ required: true, message: '请选择券适用范围', trigger: 'blur' }]
-      },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -269,7 +256,7 @@ export default {
     getDetail () {
       shopPromoDetail({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {
-          this.form = res.data
+          this.form = { ...this.form, ...res.data }
           this.$nextTick(() => {
             this.$refs.table.refresh(true)
           })

+ 131 - 231
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -6,8 +6,43 @@
         <template slot="subTitle">
           <a id="promotionEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" />返回列表</a>
           <span v-if="$route.params.sn" style="margin: 0 10px 0 20px;color: #666;font-size: 14px;font-weight: 600;">促销名称:{{ promotionName||'--' }}</span>
+          <a-button
+            type="link"
+            class="button-primary"
+            id="promotionEdit-edit-btn"
+            @click.stop="handleEdit">
+            <a-icon type="edit"/>编辑
+          </a-button>
+          <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
+            <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
+          </a-button>
         </template>
       </a-page-header>
+      <div ref="tableSearch">
+        <a-card size="small" :bordered="false" class="promotionEditInfo" v-show="showDetail">
+          <div slot="title">
+            <span>基础信息</span>
+          </div>
+          <div v-if="form">
+            <a-descriptions>
+              <a-descriptions-item label="促销名称">{{ form.promoName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="促销类型">{{ form.promoTypeDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="促销时间">
+                {{ form.promoStartDate }}{{ form.promoStartDate?' ~ ':'' }}{{ form.promoEndDate }}
+              </a-descriptions-item>
+              <a-descriptions-item label="排序">{{ (form.sort||form.sort==0)? form.sort: '--' }}</a-descriptions-item>
+              <a-descriptions-item label="加盟商开关权限">{{ form.dealerOpenFlag=='0'?'否':'是' }}</a-descriptions-item>
+              <a-descriptions-item label="参与经销商" v-if="form.allDealerFlag=='1'">全部经销商</a-descriptions-item>
+              <a-descriptions-item label="参与经销商" v-else>
+                <span v-if="!form.shopPromoDealerList||(form.shopPromoDealerList&&form.shopPromoDealerList.length==0)">--</span>
+                <div v-else @click="handleSee">共<span class="link-bule">{{ form.shopPromoDealerList.length }}</span>个</div>
+              </a-descriptions-item>
+              <a-descriptions-item :span="3" label="封面图片"><img @click="handleCheckImg" :src="form.imageUrl" alt="图片走丢了" width="60" height="60" /></a-descriptions-item>
+              <a-descriptions-item :span="3" label="促销描述">{{ form.description || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </div>
+        </a-card>
+      </div>
       <!-- 表单 -->
       <a-card :bordered="false" class="promotionEdit-cont">
         <a-form-model
@@ -19,106 +54,6 @@
           :wrapper-col="formItemLayout.wrapperCol"
         >
           <a-row>
-            <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="促销名称" prop="promoName" :label-col="{span:4}" :wrapper-col="{span:16}">
-                <a-input
-                  id="promotionEdit-promoName"
-                  :maxLength="20"
-                  v-model.trim="form.promoName"
-                  placeholder="请输入促销名称(最多20个字符)"
-                  allowClear/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="促销时间" prop="time" :label-col="{span:4}" :wrapper-col="{span:16}">
-                <a-range-picker
-                  style="width:100%"
-                  id="promotionAdd-time"
-                  v-model="form.time"
-                  :format="dateFormat"
-                  :disabled-date="disabledDate"
-                  @change="dateChange"
-                  :placeholder="['开始时间', '结束时间']" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="排序" prop="sort" :label-col="{span:4}" :wrapper-col="{span:16}">
-                <a-input-number
-                  style="width:100%"
-                  id="promotionEdit-sort"
-                  allowClear
-                  placeholder="请输入排序数字(数字越大越靠后)"
-                  v-model="form.sort"
-                  :min="0"
-                  :max="99999999"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="参与经销商" prop="allDealerFlag">
-                <a-row :gutter="15">
-                  <a-col :md="10" :sm="24">
-                    <a-select
-                      style="width:98%;"
-                      id="promotionList-allDealerFlag"
-                      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-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 }}选项
-                  </a-col>
-                  <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
-                    <div class="buyerBox">
-                      <a-tag closable v-for="con in chooseDealerList" id="promotionList-dealerSn" :key="con.dealerSn" @close="delBuyerName(con)">
-                        {{ con.dealerName }}
-                      </a-tag>
-                    </div>
-                  </a-col>
-                </a-row>
-              </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>
-            </a-col>
-            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="促销描述" prop="description">
-                <a-input
-                  v-model="form.description"
-                  type="textarea"
-                  id="promotionEdit-description"
-                  placeholder="请输入促销描述(最多500个字符)"
-                  :maxLength="500" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="加盟商开关权限" prop="dealerOpenFlag">
-                <v-select
-                  v-model="form.dealerOpenFlag"
-                  id="promotion-dealerOpenFlag"
-                  code="FLAG"
-                  showType="radio"
-                  allowClear></v-select>
-              </a-form-model-item>
-            </a-col>
             <!-- 买产品送代金券 -->
             <div v-if="pageType=='BUY_PROD_GIVE_VALID'">
               <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
@@ -141,17 +76,6 @@
                     allowClear />
                 </a-form-model-item>
               </a-col>
-              <!-- <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-                <a-form-model-item label="生成方式" prop="validBaseType">
-                  <v-select
-                    style="width:40%;"
-                    v-model="form.validBaseType"
-                    id="promotionEdit-ruleBaseType"
-                    code="SHOP_PROMO_VALID_BASE_TYPE"
-                    placeholder="请选择生成方式"
-                    allowClear></v-select>
-                </a-form-model-item>
-              </a-col> -->
               <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                 <a-form-model-item label="券有效期" prop="validType">
                   <v-select
@@ -184,7 +108,7 @@
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-                <a-form-model-item class="productName" label="券适用范围" prop="validScope">
+                <a-form-model-item label="券适用范围" required>
                   全部产品
                 </a-form-model-item>
               </a-col>
@@ -199,10 +123,10 @@
                 </a-form-model-item>
               </a-col>
             </div>
-            <div v-if="isShowNextStep">
-              <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">
+            <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 style="width:80%;">
                     <!-- 买产品送产品 -->
                     <div v-if="pageType==='BUY_PROD_GIVE_PROD'">
                       同款产品买<a-input-number
@@ -229,24 +153,25 @@
                         class="button-primary"
                         size="small"
                         @click="handleBatchAdd">批量设置</a-button>
+                      <span>已选 {{ porductChooseTotal || 0 }} 项</span>
                     </div>
                     <!-- 特价产品 -->
-                    <div v-if="pageType==='PROMO_PROD'" style="width:80%;">
+                    <div v-if="pageType==='PROMO_PROD'">
                       <v-select
                         v-model="form.discountType"
                         ref="promoState"
                         id="promotionList-discountType"
                         code="SHOP_PROMO_DISCOUNT_TYPE"
                         size="small"
-                        style="width:15%;margin-right:5px;"
+                        style="width:20%;margin-right:5px;"
                         @change="handleDiscountType"
                         placeholder="请选择"
                         allowClear></v-select>
-                      <span v-show="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '直降':'折扣' }}</span>
+                      <span v-if="form.discountType">{{ form.discountType==='STRAIGHT_DOWN'? '直降':'折扣' }}</span>
                       <a-input-number
                         v-model="resultValue"
-                        v-show="form.discountType"
-                        style="width:15%;margin:0 5px;"
+                        v-if="form.discountType"
+                        style="width:20%;margin:0 5px;"
                         :min="0"
                         :step="1"
                         :precision="2"
@@ -259,6 +184,7 @@
                         class="button-primary"
                         size="small"
                         @click="handleBatchAdd">批量设置</a-button>
+                      <span>已选 {{ porductChooseTotal || 0 }} 项</span>
                     </div>
                     <!-- 买产品返代金券 -->
                     <div v-if="pageType=='BUY_PROD_GIVE_VALID'">
@@ -278,17 +204,20 @@
                         class="button-primary"
                         size="small"
                         @click="handleBatchAdd">批量设置</a-button>
+                      <span>已选 {{ porductChooseTotal || 0 }} 项</span>
                     </div>
+                  </div>
+                  <div style="width:20%;text-align:right;" >
                     <a-button type="primary" id="promotionEdit-add-btn" @click="handleChooseProduct" size="small">选择产品</a-button>
                   </div>
-                </a-form-model-item>
-              </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>
                 </div>
-              </a-col>
-            </div>
+              </a-form-model-item>
+            </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" @changeSel="v=>porductChooseTotal=v" :promoActiveSn="form.promoSn" :discountType="form.discountType" :activeType="pageType"></productTable>
+              </div>
+            </a-col>
           </a-row>
         </a-form-model>
       </a-card>
@@ -300,25 +229,24 @@
         :disabled="spinning"
         id="productInfoEdit-submit-btn"
         size="large"
-        @click="handleSave('all')"
-        v-if="isShowNextStep"
+        @click="handleSaveAll"
         style="padding: 0 60px;">保存</a-button>
-      <a-button
-        type="primary"
-        class="button-primary"
-        style="padding: 0 30px;"
-        size="large"
-        v-if="!isShowNextStep"
-        @click="handleSave('part')">保存后设置产品</a-button>
     </div>
     <!-- 添加产品 -->
-    <chooseProduct
-      ref="chooseProduct"
-      :openModal="showProModal"
-      @ok="addProductSuccess"
-      @close="closeProductModal"></chooseProduct>
-    <!-- 选择经销商 -->
-    <chooseDealer :openModal="openDealerModal" @close="closeDealerModal" @ok="addDealerOk"></chooseDealer>
+    <chooseProduct :propmSn="$route.params.sn" :openModal="showProModal" @ok="addProductSuccess" @close="closeProductModal"></chooseProduct>
+    <!--编辑  促销活动  基础信息    -->
+    <add-promotion-modal
+      ref="promotionAddModal"
+      :openModal="openAddModal"
+      :typeVal="form.promoType"
+      :chooseProductNum="form.productNum"
+      :itemSn="$route.params.sn"
+      @close="openAddModal=false"
+      @ok="promotionAddOk" ></add-promotion-modal>
+    <!-- 参与经销商 -->
+    <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
+    <!-- 封面展示 -->
+    <imgShowModal v-drag ref="checkedImg" :openModal="openCheckedImgModal" @close="openCheckedImgModal=false"></imgShowModal>
   </div>
 </template>
 
@@ -328,15 +256,17 @@ import moment from 'moment'
 // 组件
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
-import chooseDealer from '@/views/easyPassManagement/homepageCarouselImg/chooseDealer'
 import productTable from './productTable'
 import chooseProduct from './chooseProductsModal.vue'
+import addPromotionModal from './addPromotionModal'
+import lookUpCustomersModal from './lookUpCustomersModal'
+import imgShowModal from '@/views/easyPassManagement/shoppingManagement/imgShowModal'
 // 接口
 import { saveChooseProduct, saveShopPromo, shopPromoDetail } from '@/api/shopPromo'
 export default {
   name: 'ProductBrandEditModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, Editor, productTable, chooseDealer, chooseProduct },
+  components: { VSelect, Upload, Editor, productTable, chooseProduct, addPromotionModal, lookUpCustomersModal, imgShowModal },
   data () {
     return {
       spinning: false,
@@ -345,10 +275,12 @@ export default {
         labelCol: { span: 2 },
         wrapperCol: { span: 20 }
       },
-      productRangeList: [], // 产品范围列表
       dateFormat: 'YYYY-MM-DD', // 促销时间显示格式
       openDealerModal: false, // 打开选择经销商弹窗
       pageType: undefined, // 促销类型
+      showDetail: true, // 是否显示基础信息
+      openAddModal: false, // 基础信息编辑弹窗
+      openCheckedImgModal: false, // 查看图片弹窗
       // 链接配置内容
       form: {
         promoType: undefined, // 促销类型
@@ -377,56 +309,55 @@ export default {
       },
       conditionValue: undefined, // 买产品送产品 买
       resultValue: undefined, // 买产品送产品  赠  返券金额
-      chooseDealerList: [], // 所选经销商数据
+      porductChooseTotal: 0, // 已选产品总数
       timeLimit: [], // 有效期
       promotionName: '', // 促销名称
       showProModal: false, // 打开产品弹窗
-      isShowNextStep: false, // 是否显示下一步 并提交一半配置产品
+      openCustomerModal: false, // 打开参与经销商弹窗
       // 表单验证规则
       rules: {
-        promoName: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
-        time: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
-        sort: [{ required: true, message: '请输入排序数字', trigger: 'blur' }],
-        allDealerFlag: [{ required: true, message: '请选择参与经销商', trigger: 'change' }],
-        imageUrl: [{ required: true, message: '请选择要上传的封面图片', trigger: 'change' }],
-        description: [{ required: true, message: '请输入促销描述内容', trigger: 'blur' }],
-        dealerOpenFlag: [{ required: true, message: '请选择加盟商开关权限', trigger: 'change' }],
         rangeList: [{ required: true, message: '请选择促销产品', trigger: 'change' }],
         validName: [{ required: true, message: '请输入券名称', trigger: ['change', 'blur'] }],
         validBaseType: [{ required: true, message: '请选择生成方式', trigger: 'change' }],
         validType: [{ required: true, message: '请选择券有效期类型', trigger: 'change' }],
-        validScope: [{ required: true, message: '请选择券适用范围', trigger: 'blur' }],
         productNum: [{ required: true, message: '选择产品不能为空', trigger: 'blur' }]
       }
     }
   },
   methods: {
-    // 参与经销商  change
-    changeDealerScope () {},
-    // 部分 打开选择经销商弹窗
-    handleDealerModal () {
-      this.openDealerModal = true
+    // 查看封面图片
+    handleCheckImg () {
+      this.openCheckedImgModal = true
+      const _this = this
+      _this.$nextTick(() => {
+        _this.$refs.checkedImg.pageInit(this.form.imageUrl)
+      })
+    },
+    // 查看参与经销商
+    handleSee () {
+      this.openCustomerModal = true
+      this.$nextTick(() => {
+        this.$refs.lookUpCustomers.pageInit({ dealerSnList: this.form.dealerSnList || undefined })
+      })
+    },
+    // 编辑
+    handleEdit () {
+      this.openAddModal = true
+      this.form.productNum = this.$refs.chooseProductList.getChooseProductNum()
+      this.$refs.promotionAddModal.getDetail()
     },
-    // 添加参与经销商成功
-    addDealerOk () {},
-    // 关闭经销商弹窗
-    closeDealerModal () {
-      this.openDealerModal = false
+    promotionAddOk (type) {
+      const _this = this
+      // 情况产品列表
+      if (type == '1') {
+        _this.$refs.chooseProductList.clearTable()
+      }
+      _this.getDetail({ sn: _this.$route.params.sn })
     },
     // 禁用日期时间
     disabledDate (current) {
       return current && current < moment().startOf('day')
     },
-    // 促销时间  change
-    dateChange (date, dateStrings) {
-      if (dateStrings && dateStrings[0]) {
-        this.form.time = dateStrings
-        this.form.promoStartDate = date.length ? dateStrings[0] + ' 00:00:00' : ''
-        this.form.promoEndDate = date.length ? dateStrings[1] + ' 23:59:59' : ''
-      } else {
-        this.form.time = []
-      }
-    },
     // 有效期
     dateLimitChange (date, dateStrings) {
       if (dateStrings && dateStrings[0]) {
@@ -441,17 +372,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) {
@@ -511,25 +435,19 @@ export default {
       const _this = this
       const res = await shopPromoDetail(ajaxData)
       if (res.status == 200) {
-        if (res.data.promoStartDate && res.data.promoEndDate) {
-          const startTime = res.data.promoStartDate.split(' ')[0]
-          const endTime = res.data.promoEndDate.split(' ')[0]
-          res.data.time = [startTime, endTime]
-        }
-        if (res.data.imageUrl) {
-          _this.$refs.imageSet.setFileList(res.data.imageUrl)
-        }
-        _this.form = res.data
+        _this.form = { ..._this.form, ...res.data }
         _this.form.productNum = 0
-        _this.isShowNextStep = true
         if (_this.$route.params.pageType === 'edit') {
           _this.pageType = res.data.promoType
           _this.promotionName = res.data.promoName
         }
-
+        // 买产品送代金券
+        if (_this.form.promoType == 'BUY_PROD_GIVE_VALID' && _this.form.validType == 'FIXED') {
+          // 固定日期
+          _this.timeLimit = [res.data.validStartDate, res.data.validEndDate]
+        }
         _this.$nextTick(() => {
           _this.$refs.chooseProductList.pageInit()
-          _this.form.productNum = _this.$refs.chooseProductList.getChooseProductNum()
         })
       }
     },
@@ -545,13 +463,12 @@ export default {
       }
     },
     //  确定保存  验证必填
-    handleSave (type) {
+    handleSaveAll () {
       const _this = this
       // 验证组件必填项
-      console.log('_this.form.productNum ', _this.form.productNum)
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.savePartInfo(type)
+          _this.savePartInfo()
         }
       })
     },
@@ -573,16 +490,14 @@ export default {
           }
         }
       }
-      if (type === 'all') {
-        formData.productNum = _this.$refs.chooseProductList.getChooseProductNum()
-        if (formData.productNum && formData.productNum == 0) {
-          _this.$message.warning('请先选择产品!')
-          return
-        }
-        delete formData.productNum
+      formData.productNum = _this.$refs.chooseProductList.getChooseProductNum()
+      if (formData.productNum && formData.productNum == 0) {
+        _this.$message.warning('请先选择产品!')
+        return
       }
-      delete formData.time
+      delete formData.productNum
       _this.spinning = true
+      formData.saveType = 'all'
       saveShopPromo(formData).then(res => {
         if (res.status == 200) {
           _this.spinning = false
@@ -605,24 +520,15 @@ export default {
             return
           }
           _this.$message.success(res.message)
-          if (type === 'all') {
-            _this.$nextTick(() => {
-              _this.handleBack()
-              _this.resetSearchForm()
-            })
-          } else {
-            _this.isShowNextStep = true
-            _this.getDetail({ sn: res.data.shopPromo.promoSn })
-          }
+          _this.$nextTick(() => {
+            _this.handleBack()
+            _this.resetSearchForm()
+          })
         } else {
           _this.spinning = false
         }
       })
     },
-    //  封面图片上传
-    changeImage (file) {
-      this.form.imageUrl = file
-    },
     // 重置
     resetSearchForm () {
       this.form = {
@@ -650,8 +556,6 @@ export default {
         validInfo: '', // 使用说明
         productNum: 0
       }
-      this.$refs.imageSet.setFileList('')
-      this.isShowNextStep = false
       if (this.$refs.ruleForm) {
         this.$refs.ruleForm.resetFields()
       }
@@ -667,11 +571,7 @@ export default {
     // 初始化
     pageInit () {
       this.form.discountType = ''
-      if (this.$route.params.pageType === 'edit') {
-        this.getDetail({ sn: this.$route.params.sn })
-      } else {
-        this.pageType = this.$route.params.pageType
-      }
+      this.getDetail({ sn: this.$route.params.sn })
     }
   },
   mounted () {
@@ -701,6 +601,9 @@ export default {
     height: 100%;
     box-sizing: border-box;
     padding-bottom:51px;
+    .promotionEditInfo{
+      margin-bottom:10px;
+    }
     .buyerBox{
       border:1px solid #d9d9d9;
       margin-top:10px;
@@ -722,9 +625,6 @@ export default {
     .promotionEdit-cont{
       margin-bottom: 10px;
     }
-    .upload{
-      width: 100%!important;
-    }
     //  文本编辑器  工具栏样式换行
     .promotionEdit-editor{
       .w-e-toolbar{
@@ -762,8 +662,8 @@ export default {
     }
 
     .productInfo{
+      width:100%;
       display:flex;
-      justify-content: space-between;
     }
     #setPromotion-productRange{
       /deep/.ant-select-dropdown{

+ 19 - 4
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>
           <!-- 促销类型 -->
@@ -135,6 +140,8 @@
           </template>
         </s-table>
       </a-spin>
+      <!-- 新增促销活动 -->
+      <add-promotion-modal :openModal="openAddModal" :typeVal="addPromotionType" @close="closeAddModal" @ok="$refs.table.refresh()" ></add-promotion-modal>
       <!-- 参与经销商 -->
       <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
       <!-- 详情 -->
@@ -188,6 +195,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import lookUpCustomersModal from './lookUpCustomersModal'
 import detailModal from './detailModal'
+import addPromotionModal from './addPromotionModal'
 // 接口
 import { shopPromoActiveList, shopPromoDel, shopPromoRelease, shopPromoDiscard, updateShopBanner } from '@/api/shopPromo'
 import { updateSetShopBanner } from '@/api/shopBanner'
@@ -195,7 +203,7 @@ import { updateSetShopBanner } from '@/api/shopBanner'
 export default {
   name: 'PromotionalActivitiesList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, lookUpCustomersModal, detailModal },
+  components: { STable, VSelect, rangeDate, lookUpCustomersModal, detailModal, addPromotionModal },
   data () {
     return {
       spinning: false,
@@ -205,6 +213,8 @@ export default {
       openDetailModal: false, // 打开详情弹窗
       createDate: [], //  创建时间
       openSetImgModal: false, // 设置首页轮播图弹窗
+      openAddModal: false, // 新增促销活动
+      addPromotionType: null, // 新增促销活动类型   BUY_PROD_GIVE_PROD买产品送产品     BUY_PROD_GIVE_VALID买产品返代金券    PROMO_PROD特价产品
       // 查询参数
       queryParam: {
         beginDate: undefined, // 促销开始时间
@@ -260,15 +270,20 @@ 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 })
       })
     },
+    //
+    closeAddModal () {
+      this.openAddModal = false
+    },
     // 新增  编辑
     handleEdit (type, row) {
       if (type === 'edit') {
         this.$router.push({ name: 'promotionalEditActivity', params: { pageType: type, sn: row.promoSn } })
       } else {
-        this.$router.push({ name: 'promotionalAddActivity', params: { pageType: type } })
+        this.addPromotionType = type
+        this.openAddModal = true
       }
     },
     // 删除促销活动

+ 37 - 7
src/views/easyPassManagement/promotionalActivities/lookUpCustomersModal.vue

@@ -57,9 +57,35 @@
           :rowClassName="(record, index) => record.checkProfitLossQty < 0 ? 'redBg-row':''"
           bordered>
           <!-- 地区 -->
-          <template slot="address" slot-scope="text, record">
-            <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">{{ record.dealerEntity.provinceName }}/{{ record.dealerEntity.cityName }}/{{ record.dealerEntity.districtName }}</span>
-            <span v-else>--</span>
+          <template slot="address" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">{{ record.dealerEntity.provinceName }}/{{ record.dealerEntity.cityName }}/{{ record.dealerEntity.districtName }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              <span v-if="record.provinceName">{{ record.provinceName }}/{{ record.cityName }}/{{ record.districtName }}</span>
+              <span v-else>--</span>
+            </div>
+          </template>
+          <!-- 商户类型 -->
+          <template slot="businessType" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.dealerTypeName1">{{ record.dealerEntity.dealerTypeName1 }}{{ record.dealerEntity.dealerTypeName1?'>'+record.dealerEntity.dealerTypeName2:record.dealerEntity.dealerTypeName2 }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              {{ record.dealerTypeName1 }}{{ record.dealerTypeName1?'>'+record.dealerTypeName2:record.dealerTypeName2 }}
+            </div>
+          </template>
+          <!-- 商户级别 -->
+          <template slot="businessLevel" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.dealerLevelDictValue">{{ record.dealerEntity.dealerLevelDictValue }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              {{ record.dealerLevelDictValue||'--' }}
+            </div>
           </template>
         </s-table>
       </a-card>
@@ -81,6 +107,7 @@ import AreaList from '@/views/common/areaList.js'
 // 接口
 import { dealerExport } from '@/api/promoTerminal'
 import { shopBannerSeeDealer, shopBannerExport } from '@/api/shopBanner'
+import { queryDealerPageList } from '@/api/dealer'
 export default {
   name: 'LookUpCustomersModal',
   components: { STable, ProductType, subarea, AreaList },
@@ -116,7 +143,8 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return shopBannerSeeDealer(params).then(res => {
+        const ajaxName = this.queryParam.bannerSn ? shopBannerSeeDealer : queryDealerPageList
+        return ajaxName(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -137,8 +165,8 @@ export default {
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '经销商名称', dataIndex: 'dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户类型', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerEntity.dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '商户类型', scopedSlots: { customRender: 'businessType' }, width: '20%', align: 'center' },
+        { title: '商户级别', scopedSlots: { customRender: 'businessLevel' }, width: '13%', align: 'center' }
       ]
     }
   },
@@ -181,7 +209,9 @@ export default {
       const _this = this
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(shopBannerExport, _this.queryParam, '首页轮播图参与经销商列表导出', function () {
+      const ajaxExportName = this.queryParam.bannerSn ? shopBannerExport : dealerExport
+      const exportName = this.queryParam.bannerSn ? '首页轮播图参与经销商列表导出' : '促销活动参与经销商列表导出'
+      hdExportExcel(ajaxExportName, _this.queryParam, exportName, function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true

+ 12 - 6
src/views/easyPassManagement/promotionalActivities/productTable.vue

@@ -11,8 +11,6 @@
         :row-selection="{ columnWidth: 40 }"
         @rowSelection="rowSelectionFun"
         :defaultLoadData="false"
-        :style="{ maxHeight: 300+'px' }"
-        :scroll="{ y:230 }"
         bordered>
         <!-- 买 -->
         <template slot="conditionValue" slot-scope="text,record">
@@ -92,7 +90,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 +128,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 +171,7 @@ export default {
     // 表格选中项
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
+      this.$emit('changeSel', this.selectCount)
     },
     // 批量已选产品信息
     editProductVal (row, typeName) {
@@ -195,7 +193,7 @@ export default {
       }
       modifyChooseProduct(ajaxData).then(res => {
         if (res.status == 200) {
-          this.$refs.table.refresh(true)
+          this.$refs.table.refresh()
           this.$refs.table.clearSelected() // 清空表格选中项
         }
       })
@@ -226,13 +224,21 @@ export default {
       delChooseProduct([{ id: row.id, promoSn: _this.promoActiveSn }]).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
-          _this.$refs.table.refresh()
+          _this.$refs.table.refresh(true)
           _this.spinning = false
         } else {
           _this.spinning = false
         }
       })
     },
+    // 清空表格
+    clearTable () {
+      this.spinning = true
+      clearProductByPromoSn({ promoSn: this.promoActiveSn }).then(res => {
+        this.spinning = false
+        this.pageInit()
+      })
+    },
     getChooseProductNum () {
       return this.chooseProductNum
     },

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -192,7 +192,7 @@ export default {
       // 费用明细
       const fyListData = await expenseAcctDetailFindList({ expenseAccountSn: this.$route.params.sn }).then(res => res.data)
       // 审核明细,待提交状态不获取
-      const spListData = this.detailData.state != 'WAIT_SUBMIT' ? await getProcessInstance({ businessType: 'EXPENSES', businessSn: this.$route.params.sn }).then(res => res.data) : null
+      const spListData = this.detailData.state != 'WAIT_SUBMIT' ? await getProcessInstance({ businessType: 'EXPENSES', businessSn: this.$route.params.sn }).then(res => res.data[0].opinionList || []) : null
       // 打印预览弹框
       if (type == 'preview') {
         this.showTipModal = true

+ 16 - 13
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,12 +168,22 @@
               >
                 再次编辑
               </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>
       </a-spin>
       <!-- 审核进度 -->
-      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" @close="openModal=false"></verifyModal>
+      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" :itemId="itemId" @close="openModal=false"></verifyModal>
       <!-- 新增 -->
       <baseDataModal :show="openBaseModal" @close="openBaseModal=false"></baseDataModal>
       <!-- 打印预览 -->
@@ -230,6 +230,7 @@ export default {
       openBaseModal: false, // 基础信息新建
       showTipModal: false, // 打印预览组件
       itemSn: '', // 费用单sn
+      itemId: '', // 费用单id
       tableHeight: 0, // 表格高度
       expenseTypes: [], // 费用类型
       // 查询参数
@@ -378,7 +379,7 @@ export default {
     },
     // 详情页面
     handleDetail (row) {
-      this.$router.push({ name: 'expenseReimbursementListDetail', params: { sn: row.expenseAccountSn } })
+      this.$router.push({ name: 'expenseReimbursementListDetail', params: { sn: row.expenseAccountSn, itemId: row.id } })
     },
     // 新增、编辑
     handleEdit (row) {
@@ -394,7 +395,7 @@ export default {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '确认要删除吗?',
+        content: '确定删除该单据吗,删除后不可恢复?',
         centered: true,
         closable: true,
         onOk () {
@@ -411,8 +412,10 @@ export default {
     },
     // 审核进度弹框
     handleSH (row) {
+      // debugger
       this.openModal = true
       this.itemSn = row.expenseAccountSn
+      this.itemId = row.id
     },
     // 再次编辑
     againEdit (row) {

+ 6 - 6
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -109,12 +109,12 @@
             <tbody>
               <tr style="height: 30px;padding: 5px;" v-for="(spitem,index) in item.spListData" :key="index">
                 <td style="padding:5px 0;">{{ index+1||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.userName||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.userType||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.state||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.remark||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.hasAttachments!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
-                <td style="padding:5px 0;">{{ spitem.date||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.approvalName||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.processTaskType||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.approvalStateDictValue||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.approvalOpinion||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.attachmentNames|| '--' }}</td>
+                <td style="padding:5px 0;">{{ spitem.approvalTime||'' }}</td>
               </tr></tbody>
           </table>
         </div>

+ 12 - 8
src/views/expenseManagement/expenseReimbursement/verifyModal.vue

@@ -18,7 +18,7 @@
         :data="loadData"
         :scroll="{ y: 500 }"
         :showPagination="false"
-        :defaultLoadData="true"
+        :defaultLoadData="false"
         bordered>
       </s-table>
     </a-spin>
@@ -39,6 +39,10 @@ export default {
     itemSn: { // 费用单sn
       type: [Number, String],
       default: ''
+    },
+    itemId: {// 费用单id
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -46,12 +50,12 @@ export default {
       spinning: false,
       isShow: this.openModal,
       columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -60,7 +64,7 @@ export default {
         return getProcessInstance({ businessType: 'EXPENSES', businessSn: this.itemSn }).then(res => {
           let data
           if (res.status == 200) {
-            data = res.data
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             const no = 0
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1

+ 22 - 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)
       }
@@ -451,6 +458,10 @@ export default {
       })
     },
     beforeSubmit () {
+      if (this.isEditDetail) {
+        this.handleBack()
+        return
+      }
       if (this.total) {
         this.openDepartUserModal = true
       } else {

+ 71 - 66
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -21,21 +21,16 @@
               <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">
             <a-form-model-item style="margin-bottom:5px;" label="付款方类型" prop="payerType">
-              <!-- <v-select
-                v-model="form.payerType"
-                showType="radio"
-                code="PAYER_TYPE"
-                placeholder="请选择付款方类型"
-                @change="payerTypeChange"
-              ></v-select> -->
               {{ form.payerTypeDictValue }}
             </a-form-model-item>
           </a-col>
@@ -101,11 +96,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 +110,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 +137,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 +154,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,24 +182,40 @@
               <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">
             <a-form-model-item style="margin-bottom:5px;" label="户名" prop="bankAccount">
-              <a-select placeholder="请选择户名" v-model="form.bankAccount" id="fcDetailModal-bankAccount" style="width: 100%" @change="handleChange">
-                <a-select-option v-for="item in bankList" :value="item.bankAccount">
-                  {{ item.bankAccount }}
-                </a-select-option>
-              </a-select>
+              <SelectInput
+                v-model="form.bankAccount"
+                ref="bankList"
+                id="fcDetailModal-bankAccount"
+                code="FINANCE_BOOK_BANK_INFO"
+                placeholder="请选择户名"
+                @change="handleChange"
+                @loaded="getBankNameList"
+                isTree
+                :isInput="false"
+                allowClear
+              ></SelectInput>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="汇入银行" prop="bankName">
-              <a-select placeholder="请选择汇入银行" id="fcDetailModal-bankName" v-model="form.bankName" style="width: 100%">
+              <a-select
+                placeholder="请选择汇入银行"
+                allowClear
+                id="fcDetailModal-bankName"
+                v-model="form.bankName"
+                style="width: 100%">
                 <a-select-option v-for="item in bankNameList" :value="item">
                   {{ item }}
                 </a-select-option>
@@ -199,18 +224,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;">
@@ -227,7 +261,7 @@
 <script>
 import moment from 'moment'
 import { commonMixin } from '@/utils/mixin'
-import { VSelect, Upload } from '@/components'
+import { VSelect, SelectInput, Upload } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import fcDetailSxItem from './fcDetailSxItem.vue'
 import { financeBookDetailSave, financeBookDetailQueryBySn, lastPayerAccountInfo } from '@/api/financeBook.js'
@@ -235,7 +269,7 @@ import { dealerDetailBySn } from '@/api/dealer'
 export default {
   name: 'FcDetailModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, dealerSubareaScopeList, fcDetailSxItem },
+  components: { VSelect, SelectInput, Upload, dealerSubareaScopeList, fcDetailSxItem },
   props: {
     show: {
       type: [Boolean],
@@ -257,6 +291,7 @@ export default {
       disabled: false,
       title: '新增收款明细',
       confirmLoading: false,
+      isEditDetail: false,
       bookDetailSn: '', // 收款明细sn
       formItemLayout: {
         labelCol: { span: 6 },
@@ -296,41 +331,10 @@ export default {
       },
       useTotalAmount: '',
       payTotalAmount: '',
-      bankList: [
-        {
-          bankAccount: '张丽友',
-          bankName: ['建设银行', '微信收款']
-        },
-        {
-          bankAccount: '张丽添',
-          bankName: ['农业银行']
-        },
-        {
-          bankAccount: '东莞箭冠',
-          bankName: ['东莞银行']
-        },
-        {
-          bankAccount: '江西箭冠',
-          bankName: ['九江银行']
-        }
-      ],
       bankNameList: ['东莞银行']
     }
   },
   methods: {
-    payerTypeChange (v) {
-      this.$refs.ruleForm.clearValidate()
-      // 重置数据
-      this.form.dealerSn = ''
-      this.form.dealerCode = ''
-      this.form.licenseName = ''
-      this.form.payerAccountType = 'PUBLIC'
-      this.form.bankAccount = '东莞箭冠'
-      this.form.bankName = '东莞银行'
-      this.bankNameList = ['东莞银行']
-      this.form.payerAccountInfo = ''
-      this.form.payerName = ''
-    },
     accountTypeChange (v) {
       this.$refs.ruleForm.clearValidate()
       // 已选经销商
@@ -341,21 +345,21 @@ export default {
         this.form.licenseName = ''
         this.form.payerAccountInfo = ''
       }
+      // 公户
       if (this.form.payerAccountType == 'PUBLIC') {
         this.form.bankAccount = '东莞箭冠'
         this.form.bankName = '东莞银行'
-        this.bankNameList = ['东莞银行']
       } else {
         this.form.bankAccount = '张丽添'
         this.form.bankName = '农业银行'
-        this.bankNameList = ['农业银行']
       }
+      this.getBankNameList()
     },
-    handleChange (v) {
+    // 户名改变
+    handleChange (v, row) {
       if (v) {
         this.form.bankAccount = v
-        const row = this.bankList.find(item => item.bankAccount == v)
-        this.bankNameList = row.bankName
+        this.bankNameList = row ? row.code.split(',') : []
         this.form.bankName = undefined
       }
     },
@@ -451,25 +455,26 @@ export default {
         }
       })
     },
+    // 新增时设置默认值
     setDetail (data) {
       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 = '张丽添'
           this.form.bankName = '农业银行'
-          this.bankNameList = ['农业银行']
         }
+        this.getBankNameList()
       })
     },
     //  详情
-    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
@@ -478,17 +483,18 @@ export default {
           this.form.receiptDate = moment(this.form.receiptDate).format('YYYY-MM-DD')
           this.form.payCreditFlag = this.form.payCreditFlag == 1
           this.form.useCreditFlag = this.form.useCreditFlag == 1
-          // 回显客户
-          // if (this.form.dealerSn && this.form.payerType == 'DEALER') {
-          //   this.$nextTick(() => {
-          //     this.$refs.settleClientName.getDetail(this.form.dealerSn)
-          //   })
-          // }
+          this.$nextTick(() => {
+            this.getBankNameList()
+          })
         }
         this.spinning = false
         this.confirmLoading = false
       })
     },
+    getBankNameList () {
+      const blist = this.$refs.bankList.list.find(item => item.dispName == this.form.bankAccount)
+      this.bankNameList = blist && blist.code.split(',') || []
+    },
     cancel () {
       this.opened = false
       this.$emit('cancel')
@@ -499,7 +505,6 @@ export default {
         this.title = '新增收款明细'
       })
       this.bankNameList = []
-      this.bankNameList = ['东莞银行']
       if (this.$refs.ruleForm) {
         this.$refs.ruleForm.resetFields()
       }

+ 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 () {

+ 20 - 5
src/views/financialManagement/financialCollection/list.vue

@@ -102,7 +102,7 @@
         <s-table
           class="sTable fixPagination"
           ref="table"
-          :style="{ height: tableHeight+70+'px' }"
+          :style="{ height: tableHeight+80+'px' }"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
@@ -159,11 +159,20 @@
             >
               再次编辑
             </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>
       <!-- 审核进度 -->
-      <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" @close="openModal=false"></verifyModal>
+      <verifyModal v-drag :openModal="openModal" :itemId="itemId" :itemSn="itemSn" @close="openModal=false"></verifyModal>
       <!-- 基础信息 -->
       <baseModal v-drag :show="baseModal" @cancel="baseModal=false"></baseModal>
       <!-- 关联备货单 -->
@@ -212,6 +221,7 @@ export default {
       auditDate: [], // 审核时间
       advanced: true,
       itemSn: null,
+      itemId: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -318,7 +328,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) {
@@ -346,6 +356,11 @@ export default {
     handleSH (row) {
       this.openModal = true
       this.itemSn = row.bookSn
+      this.itemId = row.id
+    },
+    // 修改明细
+    editDetail (row) {
+      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bookSn, type: 1 } })
     },
     // 再次编辑
     againEdit (row) {
@@ -360,7 +375,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
           })
@@ -375,7 +390,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 240
+      this.tableHeight = window.innerHeight - tableSearchH - 250
     }
   },
   watch: {

+ 11 - 7
src/views/financialManagement/financialCollection/verifyModal.vue

@@ -39,6 +39,10 @@ export default {
     itemSn: {
       type: [Number, String],
       default: ''
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -46,12 +50,12 @@ export default {
       spinning: false,
       isShow: this.openModal,
       columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -60,7 +64,7 @@ export default {
         return getProcessInstance({ businessType: 'FINANCE_BOOK', businessSn: this.itemSn }).then(res => {
           let data
           if (res.status == 200) {
-            data = res.data
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             const no = 0
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1

+ 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) {

+ 9 - 1
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -142,7 +142,13 @@
       <!-- 导出提示框 -->
       <reportModal :visible="showExport" @close="showExport=false"></reportModal>
       <!-- 审核进度弹窗 -->
-      <reviewProgressModal v-drag :itemSn="itemSnSh" :auditTime="auditTime" :openModal="openReviewModal" @close="openReviewModal=false"></reviewProgressModal>
+      <reviewProgressModal
+        v-drag
+        :itemSn="itemSnSh"
+        :itemId="itemIdSh"
+        :auditTime="auditTime"
+        :openModal="openReviewModal"
+        @close="openReviewModal=false"></reviewProgressModal>
     </a-card>
   </div>
 </template>
@@ -204,6 +210,7 @@ export default {
         })
       },
       itemSnSh: null,
+      itemIdSh: null, // 采购退货审核进度ID
       itemSn: null, // 采购退货SN
       auditTime: null// 审核时间
     }
@@ -269,6 +276,7 @@ export default {
     // 审核进度
     handleSH (row) {
       this.itemSnSh = row.sparePartsReturnSn
+      this.itemIdSh = row.id
       this.auditTime = row.submitDate
       const _this = this
       _this.$nextTick(() => {

+ 11 - 7
src/views/purchasingManagement/purchaseReturn/reviewProgressModal.vue

@@ -41,6 +41,10 @@ export default {
       type: [Number, String],
       default: ''
     },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    },
     auditTime: {
       type: String,
       default: ''
@@ -51,12 +55,12 @@ export default {
       spinning: false,
       isShow: this.openModal,
       columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -65,7 +69,7 @@ export default {
         return getProcessInstance({ businessType: 'SPARE_PARTS_RETURN', businessSn: this.itemSn }).then(res => {
           let data
           if (res.status == 200) {
-            data = res.data
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             const no = 0
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1

+ 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') { // 审核不通过
         // 已对单

+ 60 - 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,49 @@ export default {
       this.$refs.table.clearSelected()
       this.$refs.table.refresh(!!flag)
     },
+    // 批量取消出现产品
+    handleBatchCancelActive () {
+      const _this = this
+      const len = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length
+      if (!_this.rowSelectionInfo || (len < 1)) {
+        _this.$message.warning('请先选择产品后再进行批量操作!')
+        return
+      }
+      const obj = []
+      const gift = []
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+        // 赠品
+        if (item.promotionFlag == 'GIFT') {
+          gift.push(item.productCode)
+        } else {
+          obj.push(item.salesBillDetailSn)
+        }
+      })
+      if (gift.length == len) {
+        this.$info({
+          title: '提示',
+          content: '所选全部为赠品,其不能转为正常产品!',
+          centered: true,
+          okText: '知道了'
+        })
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '已选产品' + len + '项,' + (gift.length ? '其中包含赠品' + gift.join(',') + '(赠品不能转正常产品),确认要继续批量取消促销转为正常产品吗?' : '确认要批量取消促销转为正常产品吗?'),
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          const params = {
+            salesBillDetailSnList: obj,
+            salesBillSn: _this.salesBillSn,
+            oldSalesPromoSn: _this.promo.salesPromoSn
+          }
+          // 更换活动
+          _this.$emit('upActive', _this.promo, '0', params)
+        }
+      })
+    },
     // 删除全部产品
     handleBatchDelAll () {
       const _this = this
@@ -633,7 +681,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 +689,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,7 +769,9 @@ export default {
     // 更换活动成功
     upAcitveSuccess () {
       this.spinning = false
+      this.$refs.updateActive.confirmLoading = false
       this.openUpActiveModal = false
+      this.$refs.table.clearSelected()
       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

+ 34 - 31
src/views/salesManagement/salesQueryNew/comps/updateActiveModal.vue

@@ -5,43 +5,33 @@
     centered
     :maskClosable="false"
     :confirmLoading="confirmLoading"
-    width="450px"
+    :width="total?'450px':'300px'"
     :footer="null"
     @cancel="cancel"
   >
     <a-spin :spinning="spinning" tip="Loading...">
-      <div style="padding: 0 30px;">
+      <div style="padding: 0 30px;" v-if="total">
         <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: 10px 30px;text-align:center;" v-else>
+        没有可参与的【启用状态】的促销规则
+      </div>
+      <div style="padding: 30px 0 0;text-align: center;">
+        <a-button @click="cancel" style="margin-right: 15px" :type="total?'default':'primary'" id="chooseCustom-btn-back">{{ total?'取消':'知道了' }}</a-button>
+        <a-button v-if="total" type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+      </div>
     </a-spin>
   </a-modal>
 </template>
@@ -59,20 +49,32 @@ export default {
     return {
       opened: this.show,
       spinning: false,
-      title: '确定换促销活动?',
       confirmLoading: false,
       upActiveVal: null,
-      radioStyle:"display:block;height: '30px';lineHeight: '30px';padding:5px 0;",
-      activeList: null,
-      editRow: null
+      radioStyle: "display:block;height: '30px';lineHeight: '30px';padding:5px 0;",
+      activeList: [],
+      editRow: null,
+      promoRuleSn: null
+    }
+  },
+  computed: {
+    title () {
+      if (this.total == 0) {
+        return '提示'
+      }
+      return this.promoRuleSn ? '确定换促销活动?' : '确定参加促销活动?'
+    },
+    total () {
+      return this.promoRuleSn ? 1 : this.activeList.length
     }
   },
   methods: {
-    getActiveList(data, record){
+    getActiveList (data, record) {
+      this.promoRuleSn = data.promoRuleSn
       this.editRow = record
       this.spinning = true
       salesPromoMatchProduct(data).then(res => {
-        this.activeList = res.data
+        this.activeList = res.data || []
         this.spinning = false
       })
     },
@@ -80,10 +82,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('请选择要参与的新活动')

+ 26 - 12
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,14 @@
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
               <a-form-model-item label="收货人">
-                <a-input
+                <SelectInput
+                  v-model="form.receiverName"
                   id="billOfLadingEdit-receiverName"
-                  :maxLength="30"
-                  v-model.trim="form.receiverName"
-                  placeholder="请输入收货人(最多30个字符)"
-                  allowClear />
+                  code="CONSIGNEE"
+                  placeholder="请选择或输入收货人(最多30字符)"
+                  @loaded="v=>form.receiverName?'':form.receiverName=v[0]"
+                  allowClear
+                ></SelectInput>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -201,7 +204,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect, Upload } from '@/components'
+import { STable, VSelect, SelectInput, Upload } from '@/components'
 import { pickUpSave, pickUpSubmit, pickUpDetail, pickUpDetailQueryList } from '@/api/pickUp'
 import selectXtModal from './selectXtModal.vue'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
@@ -213,7 +216,7 @@ 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, SelectInput, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal, logisticsCompany, logisticsPoint, chooseWarehouse },
   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: {

+ 7 - 7
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -210,12 +210,12 @@ export default {
       auditData: [],
       auditColumns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -225,7 +225,7 @@ export default {
         return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.$route.params.sn }).then(res => {
           let data
           if (res.status == 200) {
-            data = res.data
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             const no = 0
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1

+ 3 - 3
src/views/salesReturnManagement/billOfLading/list.vue

@@ -96,7 +96,7 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
-          <!-- 单号 -->
+          <!-- 提货单号 -->
           <template slot="pickUpNo" slot-scope="text, record">
             <div v-if="$hasPermissions('M_detailPickUp')">
               <span class="link-bule" @click="handleDetail(record)">{{ record.pickUpNo }}</span>
@@ -144,7 +144,7 @@
         </s-table>
       </a-spin>
       <!-- 审核进度 -->
-      <verifyModal :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.pickUpSn" @close="visibleAudit=false"></verifyModal>
+      <verifyModal :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.pickUpSn" :itemId="auditInfo&&auditInfo.id" @close="visibleAudit=false"></verifyModal>
     </a-card>
   </div>
 </template>
@@ -265,7 +265,7 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.pickUpSn } })
+      this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.pickUpSn, itemId: row.id } })
     },
     // 删除
     handleDel (row) {

+ 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,

+ 11 - 7
src/views/salesReturnManagement/billOfLading/verifyModal.vue

@@ -39,6 +39,10 @@ export default {
     itemSn: {
       type: [Number, String],
       default: ''
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
     }
   },
   data () {
@@ -46,12 +50,12 @@ export default {
       spinning: false,
       isShow: this.openModal,
       columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -60,7 +64,7 @@ export default {
         return getProcessInstance({ businessType: 'PICK_UP', businessSn: this.itemSn }).then(res => {
           let data
           if (res.status == 200) {
-            data = res.data
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             const no = 0
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1

+ 13 - 13
src/views/salesReturnManagement/salesReturn/auditDetail.vue

@@ -2,15 +2,15 @@
   <div>
     <p>说明:以下信息来自钉钉</p>
     <a-spin :spinning="spinning" tip="Loading...">
-      <div style="margin-bottom:10px;" v-for="item in list" :key="item.businessId">
-        <div style="margin-bottom:10px;font-weight:bold;">提审时间:{{ item.createTime }}</div>
+      <div style="margin-bottom:10px;" v-for="item in list" :key="item.businessSn">
+        <div style="margin-bottom:10px;font-weight:bold;">提审时间:{{ item.createDate }}</div>
         <a-table
           class="sTable fixPagination"
           ref="table"
           size="small"
-          :rowKey="(record) => record.businessId"
+          :rowKey="(record) => record.businessSn"
           :columns="columns"
-          :dataSource="item.taskVOList"
+          :dataSource="item.opinionList"
           :scroll="{ y: 500 }"
           :pagination="false"
           bordered>
@@ -22,7 +22,7 @@
 
 <script>
 import { STable } from '@/components'
-import { getProcessInstanceList } from '@/api/expenseManagement'
+import { getProcessInstance } from '@/api/expenseManagement'
 export default {
   name: 'AuditDetail',
   components: { STable },
@@ -44,12 +44,12 @@ export default {
     return {
       spinning: false,
       columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
-        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       list: []
     }
   },
@@ -62,11 +62,11 @@ export default {
     },
     getData () {
       this.spinning = true
-      getProcessInstanceList({ businessType: this.businessType, businessSn: this.itemSn }).then(res => {
+      getProcessInstance({ businessType: this.businessType, businessSn: this.itemSn }).then(res => {
         if (res.status == 200) {
           this.list = res.data
           this.list.map(item => {
-            item.taskVOList.map((a, index) => a.no = index + 1)
+            item.opinionList.map((a, index) => a.no = index + 1)
           })
         }
         this.spinning = false

+ 3 - 2
src/views/setting/dataValidManagement/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="4" :sm="24">
               <a-form-item label="校验结果">
-                <a-select clearable placeholder="请选择校验结果" id="erpMessageManagement-checkResult" v-model="queryParam.resultType">
+                <a-select clearable placeholder="请选择校验结果" id="erpMessageManagement-checkResult" allowClear v-model="queryParam.resultType">
                   <a-select-option value="right" id="erpMessageManagement-checkResult-success">
                     成功
                   </a-select-option>
@@ -76,8 +76,9 @@
               <a-button
                 size="small"
                 type="link"
-                class="button-info"
+                class="button-error"
                 @click="handleCli(record)"
+                v-if="record.resultType!='right'"
                 :id="'erpMessageManagement-handle-btn'+record.id">处理</a-button>
               <a-button
                 v-if="record.bizNo"

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.100:89/ocs-admin',
+        // target: 'http://192.168.2.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {