970319330@qq.com 2 дней назад
Родитель
Сommit
8d603a891c


+ 2 - 2
src/bgj/ServiceMaterialClass/component/saleclass/components/addTop.vue

@@ -59,7 +59,7 @@ export default {
       }
     }
   },
-  props:['type','sa_brandid'],
+  props:['type','sa_brand_bgjid'],
   computed:{
   },
   methods: {
@@ -74,7 +74,7 @@ export default {
             "version":1,
             "content": {
                 "itemclassid":0,
-                "sc_brandid":this.sa_brandid,
+                "sc_brandid":this.sa_brand_bgjid,
                 "parentid":0,
                 "itemclassnum":this.ruleForm.itemclassnum,
                 "itemclassname":this.ruleForm.itemclassname,

+ 2 - 2
src/bgj/ServiceMaterialClass/component/saleclass/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="brand">
-    <addTop class="mt-10" :sa_brandid="data.sa_brandid" @addSuccess="department"></addTop>
+    <addTop class="mt-10" :sa_brand_bgjid="data.sa_brand_bgjid" @addSuccess="department"></addTop>
     <el-table
       :data="tableData"
       stripe
@@ -94,7 +94,7 @@ export default {
       const res = await this.$api.requested({
         "id": "20230325141106",
         "content": {
-          "sc_brandid":this.data.sa_brandid
+          "sc_brandid":this.data.sa_brand_bgjid
         }
       })
       this.tableData = this.createTreeData(res.data[0].ttemclass)

+ 4 - 1
src/bgj/ServiceMaterialClass/index.vue

@@ -7,12 +7,13 @@
       }"
       tableName="brandTable"
       idName="sa_brandid"
-      :apiId="{query:20220922110406,del:20220922085203}"
+      :apiId="{query:20220922085104,del:20220922085203}"
       :options="options"
     >
       <div slot="custom">
       </div>
       <div slot="titleRight" style="display:flex;margin-left:10px">
+        <add v-if="tool.checkAuth($route.name,'create')" @onSuccess="$refs.basicLayout.listData()"></add>
       </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'brandLoge'">
@@ -33,12 +34,14 @@
 <script>
 import edit from './modules/edit'
 import brand_del from './modules/delete'
+import add from './modules/add'
 import previewImage from '@/components/previewImage/index'
 
 export default {
   components:{
     edit,
     brand_del,
+    add,
     previewImage
   },
   data () {

+ 45 - 32
src/bgj/ServiceMaterialClass/modules/add.vue

@@ -1,82 +1,95 @@
 <template>
-  <div>
-    <!-- <el-button size="small" type="primary" @click="onShow" >{{$t('新 建')}}</el-button> -->
+  <div class="inline-16">
+    <el-button size="small" type="primary" @click="onShow">{{$t('新 建')}}</el-button>
     <el-drawer
-      :title="$t(`新品牌`)"
+      :title="$t(`新品牌`)"
       :visible.sync="drawer"
       :wrapperClosable="false"
-      size="800px"
+      size="90%"
       direction="rtl"
       :show-close="false"
-      append-to-body
-      @close="drawer = false;form.brandName = ''">
+      append-to-body>
       <div class="drawer__panel">
-      <div>
-        <el-row :gutter="50">
-          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" :label-width="tool.onlyZh('80px')">
-            <el-col :span="20">
-              <el-form-item prop="brandName" :label="$t(`品牌名称`)">
-                <el-input v-model="form.brandName" :placeholder="$t(`输入品牌名称`)"></el-input>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
+        <el-form  :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" :label-width="tool.onlyZh('80px')">
+          <el-form-item  prop="brandname" :label="$t(`品牌名称`)">
+            <el-input v-model="form.brandname"  :placeholder="$t(`输入品牌名称`)" style="width:300px"></el-input>
+          </el-form-item>
+          <el-form-item  :label="$t(`品牌logo`)">
+            <uploadFile ref="upload" v-if="!form.attinfos || form.attinfos.length === 0" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sa_brand',ownerid:form.sa_brandid,usetype:'default'}" @onSuccess="uploadSuccess"></uploadFile>
+            <previewImage v-else  :image="form.attinfos[0]" :deletebtn="true"
+              @onSuccess="clearCover"></previewImage>
+            <small style="display:block;margin-top:20px" class="info">{{$t(`注:建议上传图片大小`)}}1024x1024px,{{$t('大小不超过')}}2M,{{$t('格式为')}}JPG/PNG</small>
+          </el-form-item>
+        </el-form>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="drawer = false;form.brandName = ''" class="normal-btn-width">{{$t('取 消')}}</el-button>
-        <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width">{{$t('确 定')}}</el-button>
-      </div>
+        <el-button size="small" @click="drawer = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"   class="normal-btn-width">{{$t('确 定')}}</el-button>
       </div>
     </el-drawer>
   </div>
 </template>
 
 <script>
+import uploadFile from '../../../components/upload/hw_obs_upload.vue'
+import previewImage from '@/components/previewImage/index.vue'
 export default {
-  name: "add",
+name: "add",
+  props:['data'],
   data(){
     return {
       drawer:false,
-      url:null,
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
       rules:{
-        brandName: [
+        brandname: [
           { required: true, message: this.$t('品牌名称不可为空'), trigger: 'blur' },
         ],
       },
       form:{
-        brandName:''
+        brandname:'',
+        attinfos:[],
+        sa_brand_bgjid:0
       },
     }
   },
   components:{
+    uploadFile,
+    previewImage
+  },
+  created() {
   },
   methods:{
-    onShow (){
+    onShow(){
       this.drawer = true
-    },
-    onClose () {
       this.form = {
-         brandName:''
+        brandname:'',
+        attinfos:[],
+        sa_brand_bgjid:0
       }
     },
     onSubmit () {
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({
-          "id": "20220922085003",
+          "id": "20220922085004",
           "version": 1,
           "content": {
-            "sa_brandid": 0,
-            "brandname": this.form.brandName
+            "sa_brand_bgjid": this.form.sa_brand_bgjid,
+            "brandname": this.form.brandname
           }
         })
         this.tool.showMessage(res, () => {
-          this.ownerid = res.data
           this.drawer = false
-          this.form.brandName = ''
           this.$emit('onSuccess')
         })
       })
+    },
+    uploadSuccess(res){
+      this.form.attinfos = JSON.parse(res.attinfos).data
+      this.$refs['upload'].dialogUploadVisible = false
+    },
+    clearCover () {
+      this.form.attinfos = []
     }
   }
 }

+ 4 - 1
src/bgj/integralgoverning/index.vue

@@ -2,11 +2,14 @@
     <basicLayout
         ref="list"
         tableName="integralAdjustTable"
-        idName="id"
+        idName="sc_points_adjustid"
         :apiId="{ query: 2026052510111106 }"
         :detailPath="{
             path: '/integralAdjustDetail',
         }"
+        :oldFormPath="{
+            add:'bgj/integralgoverning/modules'
+        }"
     >
         <template #custom>
             <div class="mt-10">

+ 274 - 0
src/bgj/integralgoverning/modules/add.vue

@@ -0,0 +1,274 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="onShow(visible = true)" v-if="tool.checkAuth($route.name, 'insert')">{{$t('新 建')}}</el-button>
+    <el-drawer
+      append-to-body
+      :title="$t('新建')"
+      :visible.sync="visible"
+      :wrapperClosable="false"
+      direction="rtl"
+      size="500px"
+      @close="cancelDrawer">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" :label-width="tool.onlyZh('100px')" label-position="right" size="mini">
+            <el-col :span="24">
+              <el-form-item :label="$t(`人员`)+':'" prop="userid">
+                <div class="flex-align-center">
+                  <el-input class="inline-16" v-model="form.username" readonly :placeholder="$t(`请选择人员`)"></el-input>
+                  <el-button size="mini" type="primary" @click="showUserDialog">{{$t('选择')}}</el-button>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`经销商`)+':'" prop="sys_enterpriseid">
+                <el-input v-model="form.enterprisename" disabled :placeholder="$t(`默认带出所选人员的经销商`)"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`积分类型`)+':'" prop="type">
+                <el-select v-model="form.type" :placeholder="$t(`请选择积分类型`)" clearable>
+                  <el-option :label="$t(`A类`)" value="A"></el-option>
+                  <el-option :label="$t(`C类`)" value="C"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整类型`)+':'" prop="adjusttype">
+                <el-select v-model="form.adjusttype" :placeholder="$t(`请选择调整类型`)" clearable>
+                  <el-option :label="$t(`增加`)" value="1"></el-option>
+                  <el-option :label="$t(`减少`)" value="0"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整积分`)+':'" prop="points">
+                <el-input v-model="form.points" :placeholder="$t(`请输入调整积分`)" @input="validatePoints"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整原因`)+':'" prop="reason">
+                <el-input type="textarea" v-model="form.reason" :placeholder="$t(`请输入调整原因`)"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="visible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">{{$t('确 定')}}</el-button>
+      </div>
+    </el-drawer>
+    <el-dialog
+      :title="$t(`选择人员`)"
+      :visible.sync="userDialogVisible"
+      append-to-body
+      width="700px">
+      <div class="flex-align-center mb-10">
+        <el-input
+          style="width:200px"
+          size="small"
+          suffix-icon="el-icon-search"
+          :placeholder="$t(`搜索姓名、手机号、经销商`)"
+          v-model="searchCondition"
+          clearable
+          @keyup.enter.native="searchUsers"
+          @clear="searchUsers"></el-input>
+        <el-button size="small" type="primary" @click="searchUsers" class="ml-10">{{$t('搜索')}}</el-button>
+      </div>
+      <el-table
+        ref="userTable"
+        :data="userList"
+        style="width: 100%"
+        size="mini"
+        height="40vh"
+        border
+        highlight-current-row
+        @row-click="selectUser">
+        <el-table-column
+          prop="name"
+          :label="$t(`姓名`)"
+          width="120">
+        </el-table-column>
+        <el-table-column
+          prop="phonenumber"
+          :label="$t(`手机号`)"
+          width="150">
+        </el-table-column>
+        <el-table-column
+          prop="enterprisename"
+          :label="$t(`经销商`)"
+          >
+        </el-table-column>
+      </el-table>
+      <div style="margin-top:16px;text-align:right">
+        <el-pagination
+          background
+          small
+          @current-change="handleUserPageChange"
+          :current-page="userParams.pageNumber"
+          :page-size="userParams.pageSize"
+          layout="total, prev, pager, next, jumper"
+          :total="userTotal">
+        </el-pagination>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="userDialogVisible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" @click="confirmUser" class="normal-btn-width">{{$t('确 定')}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['data'],
+  data () {
+    const validatePoints = (rule, value, callback) => {
+      const num = Number(value)
+      if (!value) {
+        callback(new Error(this.$t('请输入调整积分')))
+      } else if (isNaN(num) || num <= 0) {
+        callback(new Error(this.$t('仅可填写大于0的数字')))
+      } else {
+        callback()
+      }
+    }
+    return {
+      visible:false,
+      userDialogVisible:false,
+      form:{
+        userid:'',
+        username:'',
+        sys_enterpriseid:'',
+        enterprisename:'',
+        type:'',
+        adjusttype:'',
+        points:'',
+        reason:''
+      },
+      rules:{
+        userid: [
+          { required: true, message: this.$t('请选择人员'), trigger: 'change' },
+        ],
+        sys_enterpriseid: [
+          { required: true, message: this.$t('经销商不能为空'), trigger: 'change' },
+        ],
+        type: [
+          { required: true, message: this.$t('请选择积分类型'), trigger: 'change' },
+        ],
+        adjusttype: [
+          { required: true, message: this.$t('请选择调整类型'), trigger: 'change' },
+        ],
+        points: [
+          { required: true, validator: validatePoints, trigger: 'blur' },
+        ],
+        reason: [
+          { required: true, message: this.$t('请输入调整原因'), trigger: 'blur' },
+        ],
+      },
+      userList:[],
+      userTotal:0,
+      searchCondition:'',
+      userParams:{
+        id: 2026052510111306,
+        content: {
+          pageSize: 20,
+          pageNumber: 1,
+          pageSorting: "",
+          where: {
+            condition: ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    onShow () {
+      if(this.data){
+        this.form = Object.assign({},this.form,this.data)
+      }
+    },
+    showUserDialog(){
+      this.userDialogVisible = true
+      this.searchCondition = ''
+      this.userParams.content.where.condition = ''
+      this.userParams.content.pageNumber = 1
+      this.listUsers()
+    },
+    async listUsers(){
+      const res = await this.$api.requested(this.userParams)
+      this.userList = res.data
+      this.userTotal = res.total
+    },
+    searchUsers(){
+      this.userParams.content.where.condition = this.searchCondition
+      this.userParams.content.pageNumber = 1
+      this.listUsers()
+    },
+    handleUserPageChange(val){
+      this.userParams.content.pageNumber = val
+      this.listUsers()
+    },
+    selectUser(row){
+      this.form.userid = row.userid
+      this.form.username = row.name
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+      this.form.enterprisename = row.enterprisename
+      this.userDialogVisible = false
+    },
+    confirmUser(){
+      if(!this.form.userid){
+        this.$message.warning(this.$t('请选择人员'))
+        return
+      }
+      this.userDialogVisible = false
+    },
+    validatePoints(){
+      this.form.points = this.form.points.replace(/[^0-9]/g,'')
+    },
+    cancelDrawer () {
+      this.form = {
+        userid:'',
+        username:'',
+        sys_enterpriseid:'',
+        enterprisename:'',
+        type:'',
+        adjusttype:'',
+        points:'',
+        reason:''
+      }
+      this.$refs.form.resetFields()
+    },
+    async onSubmit () {
+      this.$refs.form.validate(async (valid)=>{
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 2026052510111406,
+          "content": {
+            userid: this.form.userid,
+            sys_enterpriseid: this.form.sys_enterpriseid,
+            type: this.form.type,
+            adjusttype: Number(this.form.adjusttype),
+            points: Number(this.form.points),
+            reason: this.form.reason
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.visible = false
+          this.$emit('onSuccess')
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style>
+.ml-10{
+  margin-left: 10px;
+}
+.mb-10{
+  margin-bottom: 10px;
+}
+</style>

+ 333 - 0
src/bgj/integralgoverning/modules/detail.vue

@@ -0,0 +1,333 @@
+<template>
+  <div>
+    <basicDetails
+      ref="details"
+      :titleText="mainData.billno"
+      :editData="mainData"
+      :mainAreaData="mainAreaData"
+      turnPageId="2026052510111206"
+      idname="sc_points_adjustid"
+      ownertable="sc_points_adjust"
+      tags=""
+      :tabs="[]"
+      :column="4"
+      @pageChange="pageChange"
+      @onEditSuccess="queryMainData($route.query.id)"
+    >
+      <div slot="tags"></div>
+      <template slot="customOperation">
+        <el-button
+          v-if="tool.checkAuth($route.name, 'update')"
+          type="primary"
+          @click="showEditDialog"
+          size="mini"
+          :disabled="mainData.status !== '新建'"
+        >
+          {{ $t(`编 辑`) }}
+        </el-button>
+        <el-button
+          v-if="tool.checkAuth($route.name, 'audit')"
+          type="primary"
+          @click="onAudit"
+          size="mini"
+          :disabled="mainData.status !== '新建'"
+        >
+          {{ $t(`审 核`) }}
+        </el-button>
+        <el-button
+          v-if="tool.checkAuth($route.name, 'delete')"
+          type="primary"
+          @click="onDelete"
+          size="mini"
+          :disabled="mainData.status !== '新建'"
+          style="margin-right:10px"
+        >
+          {{ $t(`删 除`) }}
+        </el-button>
+      </template>
+    </basicDetails>
+    <el-drawer
+      append-to-body
+      :title="$t('编辑')"
+      :visible.sync="editDialogVisible"
+      :wrapperClosable="false"
+      direction="rtl"
+      size="500px"
+      @close="cancelEditDrawer"
+    >
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="editForm" :rules="editRules" ref="editForm" :label-width="tool.onlyZh('100px')" label-position="right" size="mini">
+            <el-col :span="24">
+              <el-form-item :label="$t(`积分类型`)+':'" prop="type">
+                <el-select v-model="editForm.type" :placeholder="$t(`请选择积分类型`)" clearable>
+                  <el-option :label="$t(`A类`)" value="A"></el-option>
+                  <el-option :label="$t(`C类`)" value="C"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整类型`)+':'" prop="adjusttype">
+                <el-select v-model="editForm.adjusttype" :placeholder="$t(`请选择调整类型`)" clearable>
+                  <el-option :label="$t(`增加`)" value="1"></el-option>
+                  <el-option :label="$t(`减少`)" value="0"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整积分`)+':'" prop="points">
+                <el-input v-model="editForm.points" :placeholder="$t(`请输入调整积分`)" @input="validatePoints"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`调整原因`)+':'" prop="reason">
+                <el-input type="textarea" v-model="editForm.reason" :placeholder="$t(`请输入调整原因`)"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="editDialogVisible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" @click="onEditSubmit" class="normal-btn-width">{{$t('确 定')}}</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "integralAdjustDetail",
+  data() {
+    const validatePoints = (rule, value, callback) => {
+      const num = Number(value);
+      if (!value) {
+        callback(new Error(this.$t("请输入调整积分")));
+      } else if (isNaN(num) || num <= 0) {
+        callback(new Error(this.$t("仅可填写大于0的数字")));
+      } else {
+        callback();
+      }
+    };
+    return {
+      mainData: {},
+      mainAreaData: [],
+      editDialogVisible: false,
+      editForm: {
+        type: "",
+        adjusttype: "",
+        points: "",
+        reason: "",
+      },
+      editRules: {
+        type: [
+          { required: true, message: this.$t("请选择积分类型"), trigger: "change" },
+        ],
+        adjusttype: [
+          { required: true, message: this.$t("请选择调整类型"), trigger: "change" },
+        ],
+        points: [
+          { required: true, validator: validatePoints, trigger: "blur" },
+        ],
+        reason: [
+          { required: true, message: this.$t("请输入调整原因"), trigger: "blur" },
+        ],
+      },
+    };
+  },
+  methods: {
+    async queryMainData() {
+      const res = await this.$api.requested({
+        id: 2026052510111206,
+        content: {
+          sc_points_adjustid: this.$route.query.id,
+        },
+      });
+      this.mainData = res.data;
+      this.changeDataStructure();
+    },
+    changeDataStructure() {
+      let that = this;
+      this.mainAreaData = [
+        {
+          label: "单号",
+          value: this.mainData.billno,
+        },
+        {
+          label: "经销商",
+          value: this.mainData.dealername,
+        },
+        {
+          label: "姓名",
+          value: this.mainData.personname,
+        },
+        {
+          label: "联系电话",
+          value: this.mainData.phonenumber,
+        },
+        {
+          label: "状态",
+          value: this.$t(this.mainData.status),
+          style: function () {
+            let style = {};
+            if (that.mainData.status === "已审核") {
+              style.color = "#52C41A";
+            } else if (that.mainData.status === "待审核") {
+              style.color = "#1890FF";
+            } else if (that.mainData.status === "已拒绝") {
+              style.color = "#F5222D";
+            }
+            return style;
+          },
+        },
+        {
+          label: "A积分",
+          value: this.mainData.type === "A" ? this.mainData.points : 0,
+        },
+        {
+          label: "C积分",
+          value: this.mainData.type === "C" ? this.mainData.points : 0,
+        },
+        {
+          label: "调整类型",
+          value: this.mainData.adjusttype == 1 ? "增加" : "扣减",
+          style: function () {
+            let style = {};
+            if (that.mainData.adjusttype == 1) {
+              style.color = "#52C41A";
+            } else {
+              style.color = "#F5222D";
+            }
+            return style;
+          },
+        },
+        {
+          label: "调整原因",
+          value: this.mainData.reason,
+        },
+        {
+          label: "创建时间",
+          value: this.mainData.createdate,
+        },
+        {
+          label: "审核时间",
+          value: this.mainData.auditdate,
+        },
+      ];
+    },
+    showEditDialog() {
+      this.editForm = {
+        type: this.mainData.type,
+        adjusttype: String(this.mainData.adjusttype),
+        points: String(this.mainData.points),
+        reason: this.mainData.reason,
+      };
+      this.editDialogVisible = true;
+    },
+    cancelEditDrawer() {
+      this.$refs.editForm.resetFields();
+    },
+    validatePoints() {
+      this.editForm.points = this.editForm.points.replace(/[^0-9]/g, "");
+    },
+    async onEditSubmit() {
+      this.$refs.editForm.validate(async (valid) => {
+        if (!valid) return false;
+        const res = await this.$api.requested({
+          id: 2026052510111506,
+          content: {
+            sc_points_adjustid: this.mainData.sc_points_adjustid,
+            type: this.editForm.type,
+            adjusttype: Number(this.editForm.adjusttype),
+            points: Number(this.editForm.points),
+            reason: this.editForm.reason,
+          },
+        });
+        this.tool.showMessage(res, () => {
+          this.editDialogVisible = false;
+          this.queryMainData();
+        });
+      });
+    },
+    onAudit() {
+      this.$confirm(this.$t("是否确定审核该记录") + "?", this.$t("提示"), {
+        confirmButtonText: this.$t("确定"),
+        cancelButtonText: this.$t("取消"),
+        type: "warning",
+        beforeClose: async (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            try {
+              const res = await this.$api.requested({
+                id: 2026052510111606,
+                content: {
+                  sc_points_adjustid: this.mainData.sc_points_adjustid,
+                },
+              });
+              if (res.code !== 1) {
+                this.$message.error(this.$t(res.msg));
+                instance.confirmButtonLoading = false;
+                return;
+              }
+              this.tool.showMessage(res, () => {
+                setTimeout(() => {
+                  instance.confirmButtonLoading = false;
+                  done();
+                  this.queryMainData();
+                }, 500);
+              });
+            } catch (error) {
+              instance.confirmButtonLoading = false;
+            }
+          } else {
+            done();
+          }
+        },
+      }).catch(() => {});
+    },
+    onDelete() {
+      this.$confirm(this.$t("是否确定删除该记录") + "?", this.$t("提示"), {
+        confirmButtonText: this.$t("确定"),
+        cancelButtonText: this.$t("取消"),
+        type: "warning",
+        beforeClose: async (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            try {
+              const res = await this.$api.requested({
+                id: 2026052510111706,
+                content: {
+                  sc_points_adjustid: this.mainData.sc_points_adjustid,
+                },
+              });
+              if (res.code !== 1) {
+                this.$message.error(this.$t(res.msg));
+                instance.confirmButtonLoading = false;
+                return;
+              }
+              this.tool.showMessage(res, () => {
+                setTimeout(() => {
+                  instance.confirmButtonLoading = false;
+                  done();
+                  this.$router.go(-1);
+                }, 500);
+              });
+            } catch (error) {
+              instance.confirmButtonLoading = false;
+            }
+          } else {
+            done();
+          }
+        },
+      }).catch(() => {});
+    },
+    pageChange() {},
+  },
+  mounted() {
+    this.queryMainData();
+  },
+};
+</script>
+
+<style>
+</style>

+ 209 - 6
src/bgj/pointsbasedproducts/index.vue

@@ -1,13 +1,216 @@
 <template>
-    <div>
-        积分商品管理
-    </div>
+  <div>
+    <basicLayout
+      ref="basicLayout"
+      :oldFormPath="{
+        add:'bgj/pointsbasedproducts/modules'
+      }"
+      tableName="productTable"
+      idName="sc_points_productid"
+      ownertable="sc_points_product"
+      :apiId="{query:2026052209103506}"
+      :options="options"
+      @onFixedClick="rows"
+      :specialKey="[]"
+      @checkboxCallBack="rows"
+      :autoQuery="false"
+      :detailPath="{
+        path:'/pointsbasedproductsDetail'
+      }"
+      :isExport="false"
+      >
+      <template #titleRight>
+        <batchUp class="inline-16" v-if="tool.checkAuth($route.name,'batchUp')" :rowData="rowData" :disabled="rowData.length === 0" @batchUpSuccess="onSuccess"></batchUp>
+        <batchDown class="inline-16" v-if="tool.checkAuth($route.name,'batchDown')" :rowData="rowData" :disabled="rowData.length === 0" @batchUpSuccess="onSuccess"></batchDown>
+        <to_examine v-if="tool.checkAuth($route.name,'toExamine')" class="inline-16"  :rowData="rowData" @examineSuccess="onSuccess" :disabled="rowData.length === 0"></to_examine>
+        <counter_examine v-if="tool.checkAuth($route.name,'reverseReview')" class="inline-16" :rowData="rowData" @examineSuccess="onSuccess" :disabled="rowData.length === 0"></counter_examine>
+        <importImage
+          v-if="tool.checkAuth($route.name,'exportImage')"
+          ref="importImage"
+          class="inline-16"
+          :bindData="{ownertable:'sc_points_product',ownerid:$route.query.id,usetype:'default'}"
+          :errorUrl="errorUrl"
+          @clearUrl="errorUrl = null"
+          @onSuccess="bindImportImage"
+        ></importImage>
+      </template>
+      <template #custom>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`是否上架`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.isonsale" :placeholder="$t(`请选择是否上架`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in isOnSaleData"
+                :key="item.value"
+                :label="$t(item.label)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`状态`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.status" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in statusData"
+                :key="item.value"
+                :label="$t(item.label)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >{{$t(`上架时间`)}}:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect"
+              type="daterange"
+              :range-separator="$t(`至`)"
+              :start-placeholder="$t(`开始日期`)"
+              :end-placeholder="$t(`结束日期`)"
+              clearable>
+          </el-date-picker>
+        </div>
+      </template>
+      <template v-slot:tbList="scope">
+        <div>
+        <p :style="{color:scope.data.column.data.isonsale === 1?tool.getStatusColor('上架',true):tool.getStatusColor('下架',true)}" v-if="scope.data.column.columnname === 'isonsale'">
+          {{ scope.data.column.data.isonsale ? $t('上架') : $t('下架') }}
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'status'">
+          <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])" >{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+        </p>
+        <div v-else>{{scope.data.column.columnname === 'operation' || scope.data.column.data[scope.data.column.columnname]?scope.data.column.data[scope.data.column.columnname] : '--'}}</div>
+        </div>
+      </template>
+    </basicLayout>
+  </div>
 </template>
 
 <script>
-export default {
+import previewImage from '@/components/previewImage/index'
+import to_examine from './modules/toExamine'
+import batchUp from './modules/batchUp'
+import batchDown from './modules/batchDown'
+import counter_examine from './modules/counterExamine'
+import importImage from './modules/importImage.vue'
 
+export default {
+  data () {
+    return {
+      options:[],
+      isOnSaleData:[
+        {
+          value:1,
+          label:'是'
+        },
+        {
+          value:0,
+          label:'否'
+        }
+      ],
+      statusData:[
+        {
+          value:'新建',
+          label:'新建'
+        },
+        {
+          value:'审核',
+          label:'审核'
+        }
+      ],
+      selectParam:{
+        isonsale:null,
+        begindate:'',
+        enddate:'',
+        status:'',
+        productcode:'',
+        productname:''
+      },
+      rowData:[],
+      errorUrl:null,
+      dateSelect:''
+    }
+  },
+  components:{
+    previewImage,
+    to_examine,
+    counter_examine,
+    importImage,
+    batchUp,
+    batchDown
+  },
+  methods:{
+    async bindImportImage (id) {
+      const res = await this.$api.requested({
+        "id": 2026052209130006,
+        "content": {
+          "attachmentid": id
+        }
+      })
+      if (res.msg !== '成功') {
+        this.errorUrl = res.msg
+        res.msg = this.$t('失败')
+        console.log(this.errorUrl)
+      }
+      this.tool.showMessage(res,() => {
+        this.$refs.basicLayout.listData()
+      })
+    },
+    selectChange(){
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.begindate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.begindate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.basicLayout.param.content.pageNumber = 1
+      this.$refs.basicLayout.param.content.where = {
+        condition: "",
+        isonsale: this.selectParam.isonsale,
+        status: this.selectParam.status,
+        begindate: this.selectParam.begindate,
+        enddate: this.selectParam.enddate,
+        productcode: this.selectParam.productcode,
+        productname: this.selectParam.productname
+      }
+      this.$refs.basicLayout.listData()
+    },
+    onSuccess(){
+      this.$refs.basicLayout.listData()
+    },
+    rows(val){
+      console.log("点击")
+      console.log(val)
+      this.rowData = val
+    },
+    listData(){
+      this.$refs.basicLayout.param.content.where = {
+        condition: "",
+        isonsale: this.selectParam.isonsale,
+        status: this.selectParam.status,
+        begindate: this.selectParam.begindate,
+        enddate: this.selectParam.enddate,
+        productcode: this.selectParam.productcode,
+        productname: this.selectParam.productname
+      }
+      this.$refs.basicLayout.listData()
+    }
+  },
+  mounted() {
+    this.listData()
+  }
 }
-</script>
 
-<style></style>
+</script>
+<style>
+</style>
+<style scoped>
+.image{
+  height: 38px;
+  width: 38px;
+  margin-top:0;
+}
+</style>

+ 47 - 0
src/bgj/pointsbasedproducts/modules/batchDown.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{$t(`批量下架`)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "batchDown",
+  props:["rowData","disabled"],
+  methods:{
+    onshow(){
+      this.onBatchDown()
+    },
+    onBatchDown(){
+      this.$confirm(this.$t('确定下架这些商品吗')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async () => {
+        let row = []
+        this.rowData.forEach(function (item,index) {
+          row[index] = item.sc_points_productid
+        })
+        const res = await this.$api.requested({
+          "id": 2026052209115606,
+          "content": {
+            "sc_points_productids": row.join(",")
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('batchUpSuccess')
+        })
+      }).catch(async () => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消批量下架')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 47 - 0
src/bgj/pointsbasedproducts/modules/batchUp.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{$t(`批量上架`)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "batchUp",
+  props:["rowData","disabled"],
+  methods:{
+    onshow(){
+      this.onBatchUp()
+    },
+    onBatchUp(){
+      this.$confirm(this.$t('确定上架这些商品吗')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async () => {
+        let row = []
+        this.rowData.forEach(function (item,index) {
+          row[index] = item.sc_points_productid
+        })
+        const res = await this.$api.requested({
+          "id": 2026052209114006,
+          "content": {
+            "sc_points_productids": row.join(",")
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('batchUpSuccess')
+        })
+      }).catch(async () => {
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消批量上架')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 77 - 0
src/bgj/pointsbasedproducts/modules/counterExamine.vue

@@ -0,0 +1,77 @@
+<template>
+  <div>
+    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{$t(`反 审`)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  props:["rowData","disabled"],
+  name: "counterExamine",
+  data(){
+    return {
+      flag:false
+    }
+  },
+  methods:{
+    onshow(){
+      this.flag = false
+      this.rowData.forEach(e => {
+        console.log(e)
+        if (e.status === '新建'){
+          this.flag = true
+        }
+      })
+      console.log(this.flag)
+      if (this.flag){
+        this.$alert(this.$t('所选数据中有数据还未被审核,请检查后再进行操作'), this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          callback: action => {
+            this.$message({
+              type: 'info',
+              message: this.$t(`请检查所选数据`)
+            });
+          }
+        });
+      }else {
+        this.onCounter()
+      }
+    },
+    onCounter(){
+      this.$confirm(this.$t('确定反审这些数据吗')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async () => {
+        console.log(this.rowData)
+        let row = []
+        this.rowData.forEach(function (item,index) {
+          console.log(index)
+          console.log(item)
+          row[index] = item.sc_points_productid
+        })
+        console.log(row)
+        const res = await this.$api.requested({
+          "id": 2026052209122806,
+          "content": {
+            "sc_points_productids": row.join(",")
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('examineSuccess')
+        })
+      }).catch(async () => {
+        console.log(err)
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消反审')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 182 - 0
src/bgj/pointsbasedproducts/modules/importImage.vue

@@ -0,0 +1,182 @@
+<template>
+  <div>
+    <el-button type="success" size="small" @click="onShow(0)" icon="el-icon-upload">{{$t(`图 片 导 入`)}}</el-button>
+    <el-dialog :title="$t('文件上传')" class="import-panel" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :show-close="false" @close="clearFiles">
+      <div slot="title"></div>
+      <div style="background:#f1f2f3" class="my-tabs" >
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+          <el-tab-pane :label="$t(`导入`)" name="second"></el-tab-pane>
+        </el-tabs>
+      </div>
+      <div style="padding:20px">
+        <el-upload
+          style="width:100%"
+          ref="my-upload"
+          class="upload-demo normal-margin"
+          :accept="accept"
+          action="#"
+          :auto-upload="false"
+          :show-file-list="false"
+          :on-change="handleChange"
+          drag
+          multiple>
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">{{$t('将文件拖到此处,或') + ' '}}<em>{{$t('点击上传')}}</em></div>
+        </el-upload>
+        <div class="progress_panel" v-for="file in filelist" :key="file.uid">
+          <img v-if="file.type === 'DOC' || file.type === 'DOCX'" width="30" src="@/assets/file_icons/word.png"
+            alt="">
+          <img v-else-if="file.type === 'PDF'" width="30" src="@/assets/file_icons/PDF.png" alt="">
+          <img v-else-if="file.type === 'MP4' || file.type === 'AVI'" width="30" src="@/assets/file_icons/video.png"
+            alt="">
+          <img v-else-if="file.type === 'XLS' || file.type === 'XLSX'" width="30" src="@/assets/file_icons/excel.png"
+            alt="">
+          <img v-else-if="file.type === 'PNG' || file.type === 'JPG'|| file.type === 'JPEG'" width="30"
+            src="@/assets/file_icons/image.png" alt="">
+          <img v-else-if="file.type === 'PPT' || file.type === 'PPTX'" width="30" src="@/assets/file_icons/PPT.png"
+            alt="">
+          <img v-else width="30" src="@/assets/file_icons/unknow.png" alt="">
+          <div>
+            <p v-if="file.progress === 100" style="float:right"><span style="color:#67C23A">●</span>{{$t('上传成功')}}</p>
+            <p>{{file.raw?file.raw.name:$t('暂无上传文件')}}</p>
+            <el-progress :percentage="file.progress" :show-text="false"></el-progress>
+          </div>
+        </div>
+        <slot name="errorFile"></slot>
+        <p class="tips">• + {{$t('为保证数据导入顺利,推荐您下载并使用' + ' ')}}<a :href="modelurl">《{{$t('Excel标准模板')}}》</a></p>
+        <p class="tips">• {{$t('文件中数据不能超过5000行')}}</p>
+        <a :href="errorUrl" class="tips" style="color:red" v-if="errorUrl">•{{$t(`下载错误数据`)}}</a>
+        <div class="dialog-footer">
+          <el-button size="small" @click="cancel" class="normal-btn-width">{{$t('取 消')}}</el-button>
+          <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">{{$t('确 定')}}</el-button>
+        </div>
+      </div>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  props:['btntype','accept','bindData','errorUrl'],
+  data () {
+    return {
+      dialogUploadVisible: false,
+      params: {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "getFileName",
+        "content": {
+          "filename": '',
+          "filetype": '',
+          "parentid": ""
+        }
+      },
+      file: {},
+      filelist: [],
+      CampaignList:[],
+      activeName:'last',
+      modelurl:'',
+      campaignid:'',
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+    }
+  },
+  mounted () {
+
+  },
+  methods: {
+    onShow () {
+      this.dialogUploadVisible = true
+       this.getModelUrl()
+    },
+    getModelUrl(){
+      this.$api.requested({
+        "id": 2026052209124406,
+        "content": {},
+      }).then(res=>{
+        if(res.data){
+          this.modelurl = res.data
+        }
+      })
+    },
+    handleClick () {
+
+    },
+    handleChange (file, fileList) {
+      this.filelist = []
+      this.filelist.push(file)
+      this.file = file
+    },
+    clearFiles () {
+      if (this.$refs['my-upload']) {
+        this.$refs['my-upload'].clearFiles()
+      }
+      this.filelist = []
+      this.file = {}
+    },
+    cancel () {
+      this.dialogUploadVisible = false
+      this.clearFiles()
+      this.$emit('clearUrl')
+    },
+    async getUploadUrl () {
+      this.params.content.filetype = this.file.raw ? this.file.raw.name.substring(this.file.raw.name.lastIndexOf('.') + 1) : ''
+      this.params.content.filename = this.file.raw ? this.file.raw.name : ''
+      const res = await this.$api.requested(this.params)
+      return res.data
+    },
+    async getAccessUrl (res) {
+      if (res.result) {
+        let param = {
+          "classname": "system.attachment.huawei.OBS",
+          "method": "getFileName",
+          "content": {
+            "filename": res.filename,
+            "filetype": res.filetype,
+            "parentid": this.folderid
+          }
+        }
+        const response = await this.$api.requested(param)
+        return response.data
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.tips{
+  color: #606266;
+  font-size: 12px;
+  line-height: 20px;
+  margin-top: 10px;
+}
+.tips a{
+  color: #409EFF;
+  text-decoration: none;
+}
+.progress_panel{
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  border-bottom: 1px solid #EBEEF5;
+}
+.progress_panel img{
+  margin-right: 10px;
+}
+.progress_panel div{
+  flex: 1;
+}
+.dialog-footer{
+  margin-top: 20px;
+  text-align: right;
+}
+.normal-btn-width{
+  width: 100px;
+}
+.btn-warning{
+  background: #E6A23C;
+  border-color: #E6A23C;
+  color: #fff;
+}
+</style>

+ 77 - 0
src/bgj/pointsbasedproducts/modules/toExamine.vue

@@ -0,0 +1,77 @@
+<template>
+  <div >
+    <el-button :type="disabled?'':'primary'"  size="small"  @click="onshow" :disabled="disabled">{{$t(`审 核`)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  props:["rowData","disabled"],
+  name: "toExamine",
+  data(){
+    return {
+      flag:false
+    }
+  },
+  methods:{
+    onshow(){
+      this.flag = false
+      this.rowData.forEach(e => {
+        console.log(e)
+        if (e.status === '审核'){
+          this.flag = true
+        }
+      })
+      console.log(this.flag)
+      if (this.flag){
+        this.$alert(this.$t('所选数据中已有数据被审核,请检查后再进行操作'), this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          callback: action => {
+            this.$message({
+              type: 'info',
+              message: this.$t(`请检查所选数据`)
+            });
+          }
+        });
+      }else {
+        this.onExamine()
+      }
+    },
+    onExamine(){
+      this.$confirm(this.$t('确定通过这些数据的审核吗')+'?', this.$t('提示'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: 'warning'
+      }).then(async () => {
+        console.log(this.rowData)
+        let row = []
+        this.rowData.forEach(function (item,index) {
+          console.log(index)
+          console.log(item)
+          row[index] = item.sc_points_productid
+        })
+        console.log(row)
+        const res = await this.$api.requested({
+          "id": 2026052209121206,
+          "content": {
+            "sc_points_productids": row.join(",")
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('examineSuccess')
+        })
+      }).catch((err) => {
+        console.log(err)
+        this.$message({
+          type: 'info',
+          message: this.$t('已取消审核')
+        });
+      });
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 15 - 2
src/router/bgj.js

@@ -140,7 +140,20 @@ const bgj = [
       ast_nav: true,
       keeproute: true,
     },
-    component: () => import(/* webpackChunkName: "about" */ '@/bgj/integralgoverning/index')
+    component: () => import(/* webpackChunkName: "about" */ '@/bgj/integralgoverning/index'),
+    children: [
+      {
+        path: '/integralAdjustDetail',
+        name: 'integralgoverning',
+        meta: {
+          title: '积分调整详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "about" */ '@/bgj/integralgoverning/modules/detail'),
+      },
+    ],
   }, {
     path: '/pointsbasedproducts',
     name: 'pointsbasedproducts',
@@ -183,7 +196,7 @@ const bgj = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/bgj/ServiceMaterialClass/index')
-  },
+  },{
     path: '/workOrderManage',
     name: 'workOrderManage',
     meta: {