Explorar o código

Merge branch 'develop_sale20' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh21

lilei %!s(int64=2) %!d(string=hai) anos
pai
achega
ae6d0f9db1

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

@@ -3219,8 +3219,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '修理厂促销',
-              icon: 'file-ppt'
-              // permission: 'M_promotionManagementList'
+              icon: 'file-ppt',
+              permission: 'M_promotionManagementList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -3231,8 +3231,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '促销列表',
                   icon: 'file-ppt',
-                  hidden: true
-                  // permission: 'M_promotionManagementList'
+                  hidden: true,
+                  permission: 'M_promotionManagementList'
                 }
               }
             ]

+ 1 - 1
src/views/inventoryManagement/inventoryConfirmation/list.vue

@@ -18,7 +18,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="仓库">
-                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">

+ 2 - 1
src/views/promotionRulesManagement/promotionManagement/addModal.vue

@@ -172,7 +172,7 @@ export default {
       this.chooseDealerList = list.map(con => {
         return {
           buyerSn: con.dealerSn,
-          buyerName:con.dealerName
+          buyerName: con.dealerName
         }
       })
       const newArr = list.map(item => {
@@ -182,6 +182,7 @@ export default {
       })
       this.form.promoBuyerList = newArr
       this.openDealerModal = false
+      // 移除表单必填项
       this.$refs.ruleForm.clearValidate('promoBuyerList')
     },
     // 获取编辑详情

+ 0 - 2
src/views/promotionRulesManagement/promotionManagement/chooseDealer.vue

@@ -145,7 +145,6 @@ export default {
                 }
               }
             }
-            console.log('22222222222222222222222222222222222:', chooseData)
             if (!this.pageFlag) {
               this.pageFlag = true
               _this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
@@ -184,7 +183,6 @@ export default {
   methods: {
     // 表格选中项
     rowSelectionFun (obj) {
-      console.log('111111111111111111111111111:', obj)
       this.rowSelectionInfo = obj || null
     },
     areaChange (val) {

+ 17 - 5
src/views/promotionRulesManagement/promotionManagement/editModal.vue

@@ -127,12 +127,12 @@
             </div>
             <span class="upload-desc">说明:文件最大100M;视频:mp4.avi.flv</span>
           </a-form-model-item>
-          <a-form-model-item label="跳转链接" prop="content" v-show="form.contentType =='LINK'">
+          <a-form-model-item label="跳转链接" prop="contentLink" v-if="form.contentType =='LINK'">
             <a-input
               :disabled="isDisabled"
               id="promotionEdit-title"
               :maxLength="100"
-              v-model.trim="form.content"
+              v-model.trim="form.contentLink"
               placeholder="请输入跳转链接"
               allowClear />
           </a-form-model-item>
@@ -217,7 +217,8 @@ export default {
         showFlag: '0',
         content: '',
         enabledFlag: '0',
-        sort: undefined
+        sort: undefined,
+        contentLink: ''
       },
       images: [],
       openShowModal: false,
@@ -238,6 +239,9 @@ export default {
         content: [
           { required: true, message: '请输入对应内容', trigger: ['blur', 'change'] }
         ],
+        contentLink: [
+          { required: true, message: '请输入对应内容', trigger: 'blur' }
+        ],
         enabledFlag: [
           { required: true, message: '请选择是否发布', trigger: 'change' }
         ],
@@ -271,13 +275,15 @@ export default {
           this.images = res.data.imageSet
           this.form.imageSet = res.data.images
           this.$refs.imageSet.setFileList(res.data.images)
-          this.form.content = res.data.content
           if (res.data.contentType == 'IMAGE_CONTENT') {
             this.$refs.editor.setHtml(res.data.content)
           } else if (res.data.contentType == 'VIDEO') {
-            if (res.data.state === 'CLOSE') {
+            this.form.content = res.data.content
+            if (res.data.state != 'PUBLISH') {
               this.$refs.videoSet.setFileList(res.data.content)
             }
+          } else if (res.data.contentType == 'LINK') {
+            this.form.contentLink = res.data.content
           }
         }
       })
@@ -285,12 +291,18 @@ export default {
     //  确定
     handleSave () {
       const _this = this
+      if (_this.form.contentType == 'LINK') {
+        _this.form.content = _this.form.contentLink
+      }
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
           _this.form.promoActiveSn = this.itemId
           const formData = JSON.parse(JSON.stringify(_this.form))
           formData.imageSet = formData.imageSet ? formData.imageSet.split(',') : []
           formData.showFlag = formData.enabledFlag == 0 ? '0' : formData.showFlag
+          if (formData.contentType == 'LINK') {
+            delete formData.contentLink
+          }
           _this.spinning = true
           saveActive(formData).then(res => {
             if (res.status == 200) {

+ 5 - 5
src/views/promotionRulesManagement/promotionManagement/list.vue

@@ -46,7 +46,7 @@
           </a-row>
         </a-form>
         <!-- 操作按钮 -->
-        <div class="table-operator">
+        <div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
           <a-button type="primary" class="button-error" @click="openAddModal = true">新增</a-button>
         </div>
       </div>
@@ -117,27 +117,27 @@
               type="link"
               class="button-warning"
               @click="promotionEdit(record)"
-              v-if="record.state=='UNPUBLISH' ||record.state=='CLOSE'"
+              v-if="(record.state=='UNPUBLISH' || record.state=='CLOSE') && $hasPermissions('B_promotionManagementAdd')"
               id="promotion-edit-btn">促销编辑</a-button>
             <a-button
               size="small"
               type="link"
               class="button-warning"
               @click="handleRelease(record,'edit')"
-              v-if="record.state=='PUBLISH' || record.state=='CLOSE'"
+              v-if="(record.state=='PUBLISH' || record.state=='CLOSE')&&$hasPermissions('B_promotionManagementContent')"
               id="promotion-modify-btn">发布修改</a-button>
             <a-button
               size="small"
               type="link"
               class="button-info"
               @click="handleRelease(record,'add')"
-              v-if="record.state=='UNPUBLISH'"
+              v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementContent')"
               id="promotion-release-btn">促销发布</a-button>
             <a-button
               size="small"
               type="link"
               class="button-error"
-              v-if="record.state=='UNPUBLISH'"
+              v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementDel')"
               @click="handleDel(record)"
               id="promotion-del-btn">删除</a-button>
             <span v-if="record.state=='End'">--</span>