Bladeren bron

Merge branch 'feature/Feature-sales' into develop

莫绍宝 3 jaren geleden
bovenliggende
commit
ce9a7095a8

+ 0 - 2
src/api/supply/sales.js

@@ -35,8 +35,6 @@ export function getConditionList(params) {
   })
 }
 
-
-
 export function updatePolicy(params) {
   return request({
     url: '/policy/update',

+ 4 - 1
src/mixin/index.js

@@ -9,6 +9,8 @@ export default {
       dataList: [], // 表格数据
       ids: [], // 多选数据id
       dialogVisible: false, // 弹框
+      conditionList: [],
+      dataList:[]
     }
   },
   created() {
@@ -50,7 +52,8 @@ export default {
     },
 
     // 筛选全部数据
-    hanleSelectAll(selection) {
+    hanleSelectAll(selection,index) {
+
       this.ids = selection.map((k) => {
         return k.id;
       });

+ 3 - 1
src/store/index.js

@@ -6,6 +6,7 @@ import settings from './modules/settings'
 import permission from './modules/permission'
 import tagsView from './modules/tagsView'
 import user from './modules/user'
+import sales from './modules/sales'
 
 Vue.use(Vuex)
 
@@ -15,7 +16,8 @@ const store = new Vuex.Store({
     settings,
     permission,
     tagsView,
-    user
+    user,
+    sales
   },
   getters
 })

+ 34 - 0
src/store/modules/sales.js

@@ -0,0 +1,34 @@
+import {
+  getId
+} from "@/api/supply/sales";
+
+const state = {
+  code: ''
+}
+
+const mutations = {
+  setId(state,id){
+       state.code = id
+       console.log('setId',id);
+  }
+}
+
+const actions = {
+  hanlenewInfo({
+    commit
+  }) {
+    return new Promise((resolve, reject) => {
+      getId().then(res=>{
+          commit('setId',res.data)
+          resolve()
+      })
+    })
+  }
+}
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions
+}

+ 198 - 4
src/views/sales_policy/components/AddCondition.vue

@@ -1,7 +1,11 @@
 <template>
   <el-container>
     <el-header height="50px" class="header">
+<<<<<<< HEAD
+      <el-page-header @back="handleBack" content="详情页面">
+=======
       <el-page-header @back="$parent.isShow = 2" content="详情页面">
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       </el-page-header>
     </el-header>
     <div class="line">
@@ -20,11 +24,18 @@
             v-for="(item, index) in conditionBox"
             :key="index"
           >
+<<<<<<< HEAD
+            <el-row>
+=======
             <el-row >
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
               <el-row class="pdt">
                 <el-button
                   type="primary"
                   size="small"
+<<<<<<< HEAD
+                  @click="(VisibleModle = true), getMaterialLists(index)"
+=======
                   @click="
                     (VisibleModle = true), getMaterialLists(), (arrIndex = index)
                   "
@@ -94,21 +105,90 @@
                   type="primary"
                   size="small"
                   @click="VisibleModle = true"
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
                   >添加机型</el-button
                 >
 
-                <el-button type="primary" size="small" @click=""
+                <el-button
+                  type="primary"
+                  size="small"
+                  @click="handleDeleteRow(index)"
                   >删除机型</el-button
                 >
               </el-row> -->
               <el-row>
-                <el-table style="width: 100%" :data="col" border>
+                <el-table
+                  style="width: 100%"
+                  :data="item"
+                  border
+                  @select="hanleSelectAll($event, index)"
+                  @select-all="hanleSelectAll($event, index)"
+                >
+                  <el-table-column type="selection" width="55" align="center">
+                  </el-table-column>
+                  <el-table-column
+                    label="货品名称"
+                    width="300"
+                    align="center"
+                    prop="materialName"
+                  >
+                  </el-table-column>
+                  <el-table-column
+                    prop="specification"
+                    label="规格型号"
+                    align="center"
+                  >
+                  </el-table-column>
+                </el-table>
+              </el-row>
+            </el-row>
+          </el-col>
+        </el-row>
+        <el-row v-if="conditionBoxs.length">
+          <el-form label-width="120px" :inline="false" size="small">
+            <el-row>
+              <el-form-item label="配置比例设置"> </el-form-item>
+            </el-row>
+
+            <el-col
+              :xs="24"
+              :sm="8"
+              :lg="8"
+              v-for="(len, index) in conditionBox"
+            >
+              <el-form-item :label="'配提' + (index + 1) + '比例'">
+                <el-input
+                  size="small"
+                  v-model="popArr['line_' + index]"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+        <el-divider></el-divider>
+      </el-row>
+    </el-main>
+    <el-main v-else>
+      <el-row>
+        <el-row :gutter="50">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :lg="24"
+            class="mgb"
+            v-for="(item, index) in conditionBoxs"
+            :key="index"
+          >
+            <el-row >
+
+              <el-row>
+                <el-table style="width: 100%" :data="item" border>
                   <el-table-column type="selection" width="55" align="center">
                   </el-table-column>
-                  <el-table-column label="货品名称" width="300" align="center">
+                  <el-table-column label="货品名称" width="300" align="center" prop="materialName" >
                     <template slot-scope="scope">{{ scope.row.date }}</template>
                   </el-table-column>
-                  <el-table-column prop="name" label="规格型号" align="center">
+                  <el-table-column prop="specification" label="规格型号" align="center">
                   </el-table-column>
                 </el-table>
               </el-row>
@@ -348,9 +428,16 @@ import {
   getConditionMaterialDetail,
 } from "@/api/supply/sales";
 import TabelTransfer from "./TabelTransfer.vue";
+<<<<<<< HEAD
+import { mapState} from "vuex";
+import AddModel from "./AddModel";
+import Minxin from "@/mixin";
+import { join } from "path";
+=======
 
 import AddModel from "./AddModel";
 import Minxin from "@/mixin";
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
 export default {
   mixins: [Minxin],
   props: {
@@ -381,7 +468,11 @@ export default {
         policyName: "",
         pop: "",
       },
+<<<<<<< HEAD
+      limit: "",
+=======
       limit:'',
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       VisibleModle: false,
       conditionBox: [[], []],
       conditionBoxs: [],
@@ -397,15 +488,41 @@ export default {
       type: "",
       saleTypeCode: "",
       arrIndex: 0,
+<<<<<<< HEAD
+      popArr: {},
+=======
       popArr:{}
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
     };
   },
   created() {
     this.getCommonApi();
+<<<<<<< HEAD
+    console.log(this.$parent.codeId, "codeid");
+=======
     console.log(this.$parent.codeId,'codeid' );
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
   },
+   computed: mapState({
+    comCode: (state) => state.sales.code,
+  }),
+    updated() {
+
+    },
   methods: {
+<<<<<<< HEAD
+    getList() {
+
+    },
+    handleBack(){
+      if (this.$parent.isShow==10) {
+          this.$parent.isShow = 8
+      }else{
+        this.$parent.isShow =2
+      }
+=======
     getList(){
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
     },
     getCommonApi() {
       if (this.id) {
@@ -436,6 +553,40 @@ export default {
       this.conditionBox.push([{}]);
     },
     handleSubmit() {
+<<<<<<< HEAD
+      console.log(this.comCode);
+      var tableData = [];
+      for (let i = 0; i < this.conditionBox.length; i++) {
+        for (let j = 0; j < this.conditionBox[i].length; j++) {
+          this.conditionBox[i][j].popType = i + 1;
+               this.conditionBox[i][j].policyId = this.comCode
+               this.conditionBox[i][j].id = ''
+        }
+        tableData = [...tableData, ...this.conditionBox[i]];
+      }
+      if (!tableData.length) {
+        this.$errorMsg("请选择机型");
+        return;
+      }
+      var pop = [];
+      for (const key in this.popArr) {
+
+        pop.push(this.popArr[key]);
+      }
+      const params = {
+        id: "",
+        policyConditionMaterials: tableData,
+        policyId: this.comCode,
+        policyName: "",
+        pop: pop.join(":"),
+      };
+      addPoliyCondition(params).then((res) => {
+        this.$successMsg("添加成功");
+        this.$parent.isShow = 2
+        this.$parent.isFlag = 1
+        this.$emit('handleSubmitCon',this.comCode)
+      });
+=======
       console.log(this.popArr);
       const params = {
         id: "",
@@ -460,14 +611,40 @@ export default {
       // addPoliyCondition(params).then((res) => {
       //   this.$successMsg("添加成功");
       // });
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
     },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+<<<<<<< HEAD
+    // 筛选全部数据
+    hanleSelectAll(selection, index) {
+      this.arrIndex = index;
+      this.ids = selection.map((k) => {
+        return k.id;
+      });
+      console.log(this.ids);
+    },
+    handleDeleteRow(index) {
+      if (this.arrIndex == index && this.ids.length) {
+        for (let i = 0; i < this.conditionBox[index].length; i++) {
+          for (let j = 0; j < this.ids.length; j++) {
+            if (this.conditionBox[index][i].id == this.ids[j]) {
+              this.conditionBox[index].splice(i, 1);
+            }
+          }
+        }
+      }
+      console.log(index, this.arrIndex);
+    },
+    getMaterialLists(index) {
+      this.arrIndex = index;
+=======
     handleDeleteRow(){
       console.log(this.arrIndex);
     },
     getMaterialLists() {
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       getMaterialList({
         pageNum: this.currentPage,
         pageSize: this.pageSize,
@@ -475,7 +652,11 @@ export default {
         policyId: this.$parent.codeId,
       }).then((res) => {
         this.conditList = res.data.records;
+<<<<<<< HEAD
+        console.log(4545, this.conditList);
+=======
         console.log(4545,this.conditList);
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         this.listTotal = res.data.total;
       });
     },
@@ -497,7 +678,11 @@ export default {
     },
     handleAllAdd() {
       this.conditList2 = this.leftData;
+<<<<<<< HEAD
+      this.leftData = [];
+=======
       this.leftData = []
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
     },
     handleAllDelete() {
       this.conditList2 = [];
@@ -523,12 +708,21 @@ export default {
           if (i == this.arrIndex) {
             this.$set(this.conditionBox, i, [
               ...this.conditList2,
+<<<<<<< HEAD
+              ...this.conditionBox[i],
+=======
               ...this.conditionBox[i]
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
             ]);
             console.log(this.conditionBox);
           }
         }
+<<<<<<< HEAD
+        this.VisibleModle = false;
+        this.conditList2 = [];
+=======
         this.VisibleModle = false
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       } else {
         this.$errorMsg("请选择内容");
       }

+ 109 - 12
src/views/sales_policy/components/AddPolicy.vue

@@ -1,7 +1,11 @@
 <template>
   <div>
     <el-header height="50px" class="header">
+<<<<<<< HEAD
+      <el-page-header @back="$parent.isShow = 1,$parent.isFlag=''" content="详情页面">
+=======
       <el-page-header @back="$parent.isShow = 1" content="详情页面">
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       </el-page-header>
     </el-header>
     <div class="app-container">
@@ -40,12 +44,21 @@
                   size="small"
                   v-model="searchForm.type"
                   placeholder="销售政策类型"
+<<<<<<< HEAD
+
+                  class="select_height"
+                >
+                  <el-option
+                    v-for="(item,index) in typeOptions"
+                    :key="index"
+=======
                   @change="hanleChange"
                   class="select_height"
                 >
                   <el-option
                     v-for="item in typeOptions"
                     :key="item.value"
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
                     :label="item.label"
                     :value="item.value"
                   >
@@ -57,8 +70,13 @@
               <el-form-item label="支付钱包类型" prop="name">
                 <el-select v-model="value" placeholder="请选择">
                   <el-option
+<<<<<<< HEAD
+                    v-for="(item,index) in walletList"
+                    :key="index"
+=======
                     v-for="item in walletList"
                     :key="item.mainId"
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
                     :label="item.mainName"
                     :value="item.mainId"
                   >
@@ -67,6 +85,8 @@
               </el-form-item>
             </el-col>
 
+<<<<<<< HEAD
+=======
             <!-- <el-col :xs="24" :ms="12" :lg="12">
             <el-form-item label="制单日期" prop="name">
               <el-date-picker
@@ -77,6 +97,7 @@
               </el-date-picker> </el-form-item
           ></el-col> -->
 
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
             <el-col :xs="24" :ms="12" :lg="12">
               <el-form-item label="生效日期" prop="startTime">
                 <el-date-picker
@@ -114,8 +135,12 @@
                   class="avatar-uploader"
                   action="https://jsonplaceholder.typicode.com/posts/"
                   :show-file-list="false"
+<<<<<<< HEAD
+
+=======
                   :on-success="handleAvatarSuccess"
                   :before-upload="beforeAvatarUpload"
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
                 >
                   <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                   <i v-else class="el-icon-plus avatar-uploader-icon"></i>
@@ -321,13 +346,12 @@
 
 <script>
 import {
-  getId,
+
   addPoliy,
   getTypeList,
   getWalletList,
   getMaterialList,
-  getConditionList,
-  getCrList,
+  getConditionList
 } from "@/api/supply/sales";
 import {
   downloadFiles,
@@ -337,6 +361,7 @@ import {
 import Minxin from "@/mixin";
 import Pagination from "@/components/Pagination";
 import Transfer from "./Transfer";
+import { mapState } from "vuex";
 export default {
   mixins: [Minxin],
   data() {
@@ -360,7 +385,7 @@ export default {
         ],
       },
       imageUrl: "",
-      dataList: [],
+
       importFileList: [],
       fileList: [],
       options: {},
@@ -369,7 +394,7 @@ export default {
       walletList: [],
       typeOptions: [
         {
-          vlaue: "PROVISION",
+          value: "PROVISION",
           label: "配提",
         },
         {
@@ -381,16 +406,39 @@ export default {
 
     };
   },
+    computed: mapState({
+    comCode: (state) =>{
+      return state.sales.code
+    },
+  }),
+
   created() {
+        console.log(this.$parent.isFlag,'flag');
     this.getCommonApi();
+       if (this.$parent.isFlag) {
+
+      const params = {
+        policyId: this.comCode,
+      };
+      // 获取条件政策
+      getConditionList(params).then((res) => {
+        this.conditionList = res.data;
+        console.log(789,'jsfdkljslkj');
+      });
+      this.handletwoList()
+    }
+  },
+  updated() {
+     this.searchForm.code= this.comCode
+
   },
-  mounted() {},
-  methods: {
+    methods: {
     //下载excel模板
     hanleDownloadFiles() {
       downloadFiles("/policy/download");
     },
     getCommonApi() {
+      // this.handletwoList()
       const params = {
         pageNum: 1,
         pageSize: 10,
@@ -406,12 +454,15 @@ export default {
         saleTypeName: "",
         status: "",
       };
+<<<<<<< HEAD
+=======
       // 获取销售政策编号
       getId().then((res) => {
         console.log(res.data);
         this.searchForm.code = res.data;
         this.$parent.codeId = res.data
       });
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       // 获取销售类型列表
       getTypeList(params).then((res) => {
         this.typeList = res.data.records;
@@ -437,7 +488,10 @@ export default {
         this.$alert(result.message, "导入成功", {
           confirmButtonText: "确定",
         });
+<<<<<<< HEAD
+=======
         // this.getList();
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         this.handletwoList();
       } else {
         this.$alert(result.message, "导入失败", {
@@ -446,6 +500,12 @@ export default {
       }
     },
     getList() {
+<<<<<<< HEAD
+    },
+    // 获取货品信息
+    handletwoList() {
+      // this.searchForm.type
+=======
       const params = {
         policyId: this.searchForm.code,
       };
@@ -460,28 +520,35 @@ export default {
     },
     // 获取货品信息
     handletwoList() {
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       const paramss = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        policyId: this.searchForm.code,
-        saleTypeCode: this.searchForm.type,
+        policyId: this.comCode,
+        saleTypeCode:'',
       };
       console.log(45454);
       getMaterialList(paramss)
         .then((result) => {
           this.dataList = result.data.records;
+<<<<<<< HEAD
+           this.listTotal = result.data.total;
+
+=======
           console.log(result, 9898989);
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         })
         .catch((err) => {
           console.error(err);
         });
     },
-    // 获取图片路径
-    beforeAvatarUpload() {},
-    handleAvatarSuccess() {},
     // 提交审核
     handleAddPolicy(policyCustomers) {
       console.log(policyCustomers, "选择的经销商");
+<<<<<<< HEAD
+      if (policyCustomers.length) {
+      var arr = [];
+=======
 
       var arr = [
         {
@@ -496,6 +563,7 @@ export default {
           remark: "",
         },
       ];
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       policyCustomers.forEach((el) => {
         arr.push({
           customerId: "",
@@ -503,26 +571,42 @@ export default {
           customerNumber: el.number,
           lastOrderTime: "",
           limitTakeNum: 0,
+<<<<<<< HEAD
+          policyId: this.comCode,
+=======
           policyId: this.searchForm.code,
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
           policyTitle: "",
           remark: "",
         });
       });
+<<<<<<< HEAD
+=======
 
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       const params = {
         adminCompanyId: "",
         code: "",
         customerCount: 0,
+<<<<<<< HEAD
+        examineBy: "",
+        examineRemark: "",
+        examineStatus: "",
+=======
 
         examineBy: "",
         examineRemark: "",
         examineStatus: "",
 
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         id: "",
         imgSrc: "",
         policyCustomers: arr,
         remark: "",
+<<<<<<< HEAD
+=======
 
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         status: true,
         title: "",
         type: "",
@@ -530,6 +614,19 @@ export default {
       };
       addPoliy(params).then((res) => {
         console.log(res);
+        this.$successMsg('新增成功')
+        this.$parent.isShow=1
+      });
+      return
+      }
+      this.$errorMsg('选择经销商  ')
+    },
+    //删除
+    hanleDelete(id) {
+      const params = { policyMaterialId: id };
+      deleteMaterialPolicy(params).then((res) => {
+        this.$successMsg("删除成功");
+        this.handletwoList();
       });
     },
     //删除

+ 8 - 1
src/views/sales_policy/components/Distributor.vue

@@ -153,7 +153,7 @@
             >
               备注</el-button
             >
-            <el-button type="text" size="small">删除</el-button>
+            <!-- <el-button type="text" size="small">删除</el-button> -->
           </template>
         </el-table-column>
       </el-table>
@@ -227,6 +227,7 @@ export default {
       dataList: [],
       detail: {},
       radio: "",
+      type:'',
       typeOptions: [
         {
           vlaue: "PROVISION",
@@ -281,12 +282,18 @@ export default {
       }).then((res) => {
         this.$successMsg("编辑成功");
         this.dialogVisible = false;
+        this.remark = ''
+        this.limitTakeNum = ''
         this.getList();
       });
     },
+<<<<<<< HEAD
+
+=======
     hanleSelectAll(){
 
     }
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
   },
   components: {
     Transfer,

+ 343 - 56
src/views/sales_policy/components/Examine.vue

@@ -1,4 +1,13 @@
 <template>
+<<<<<<< HEAD
+  <div>
+    <el-header height="50px" class="header">
+      <el-page-header @back="$parent.isShow = 1,$parent.id=''" content="详情页面">
+      </el-page-header>
+    </el-header>
+    <div class="app-container">
+      <div class="descriptions">
+=======
   <div class="app-container">
     <div class="descriptions">
       <el-row>
@@ -198,57 +207,310 @@
         </el-table-column>
       </el-table>
       <!-- <div class="descriptions">
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         <el-row>
-          <el-col :span="8">审核人</el-col>
-          <el-col :span="8">{{ detail.code }}</el-col>
-          <el-col :span="8">审核结果</el-col>
-          <el-col :span="8">
-            <template>
-              <el-radio-group v-model="radio">
-                <el-radio :label="3">通过</el-radio>
-                <el-radio :label="6">驳回</el-radio>
-              </el-radio-group>
+          <el-col :span="4">销售政策编号</el-col>
+          <el-col :span="4">{{ detail.code }}</el-col>
+          <el-col :span="4">销售政策说明</el-col>
+          <el-col :span="4">{{ detail.title }}</el-col>
+          <el-col :span="4">状态</el-col>
+          <el-col :span="4">{{
+            detail.status == 1 ? "已生效" : "未生效"
+          }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="4">销售政策类型</el-col>
+          <el-col :span="4">{{
+            detail.type == "PROVISION" ? "配提" : "限量"
+          }}</el-col>
+          <el-col :span="4">现金钱包</el-col>
+          <el-col :span="4"></el-col>
+          <el-col :span="4"></el-col>
+          <el-col :span="4"></el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="4">备注</el-col>
+          <el-col :span="20">{{ detail.remark }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="3">制单人</el-col>
+          <el-col :span="3">{{ detail.createBy }}</el-col>
+          <el-col :span="3">制单日期</el-col>
+          <el-col :span="3">{{ detail.createTime }}</el-col>
+          <el-col :span="3">生效日期</el-col>
+          <el-col :span="3">{{ detail.startTime }}</el-col>
+          <el-col :span="3">失败日期</el-col>
+          <el-col :span="3">{{ detail.endTime }}</el-col>
+        </el-row>
+        <el-row v-if="this.$parent.isShow == 4">
+          <el-col :span="3">审核人</el-col>
+          <el-col :span="3">{{ detail.examineBy }}</el-col>
+          <el-col :span="3">审核日期</el-col>
+          <el-col :span="3">{{ detail.examineTime }}</el-col>
+          <el-col :span="3">关闭人</el-col>
+          <el-col :span="3"></el-col>
+          <el-col :span="3">关闭日期</el-col>
+          <el-col :span="3"></el-col>
+        </el-row>
+      </div>
+      <div class="mymain-container">
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                货品信息
+              </h4>
+              <!-- <el-button size="small">查看</el-button> -->
+            </el-col>
+            <el-col :span="12" class="tr">
+              <el-button size="small" @click="$parent.isShow = 10"
+                >查看条件</el-button
+              >
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
+        </el-row>
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            fixed
+            prop="num"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="materialNumber"
+            label="货品编码"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="materialName" label="货品名称" align="center">
+          </el-table-column>
+          <el-table-column prop="specification" label="规格型号" align="center">
+          </el-table-column>
+          <el-table-column
+            prop="saleTypeCode"
+            label="销售类型编码"
+            width="500"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="saleTypeName" label="销售类型" align="center">
+          </el-table-column>
+          <el-table-column prop="price" label="单价" align="center">
+          </el-table-column>
+          <el-table-column label="支付钱包" align="center">
+            <template slot-scope="scope">
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletCommonly == 1"
+              >
+                允许普通钱包
+              </el-tag>
+              <el-tag type="danger" size="small" v-else
+                >不允许使用普通钱包</el-tag
+              >
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletDeduct == 1"
+              >
+                允许抵扣钱包</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>不允许抵扣钱包</el-tag>
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletRebate == 1"
+              >
+                允许返利钱包
+              </el-tag>
+              <el-tag type="danger" size="small" v-else>不允许返利钱包</el-tag>
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletSpecial == 1"
+                >允许特殊钱包</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>
+                不允许特殊钱包
+              </el-tag>
             </template>
-          </el-col>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div style="margin: 20px 0">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                条件信息
+              </h4>
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
+        <el-table
+          :data="conditionList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            fixed
+            type="index"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="name" label="限定条件" align="center">
+          </el-table-column>
+
+        </el-table>
         <el-row>
-          <el-col :span="4">审批说明</el-col>
-          <el-col :span="4">
-            <el-input
-              type="textarea"
-              autosize
-              placeholder="审批说明"
-              v-model="textarea1"
-            >
-            </el-input>
-          </el-col>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                经销商使用范围
+              </h4>
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
-      </div> -->
+        <el-table
+          v-loading="listLoading"
+          :data="custoList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            fixed
+            type="index"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="customerNumber"
+            label="经销商编码"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="customerName"
+            label="经销商名称"
+            align="center"
+          >
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div style="margin: 20px 0">
+          <el-pagination
+            @size-change="handleSizeChanges"
+            @current-change="handleCurrentChanges"
+            :current-page="currentPages"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="clistTotal"
+          >
+          </el-pagination>
+        </div>
+        <div class="descriptions" v-if="$parent.isShow == 6">
+          <el-row>
+            <el-col :span="6">审核人</el-col>
+            <el-col :span="6">{{ detail.code }}</el-col>
+            <el-col :span="6">审核结果</el-col>
+            <el-col :span="6">
+              <template>
+                <el-radio-group v-model="examineStatus">
+                  <el-radio :label="'OK'">通过</el-radio>
+                  <el-radio :label="'FAIL'">驳回</el-radio>
+                </el-radio-group>
+              </template>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="4">审批说明</el-col>
+            <el-col :span="20" class="col" style="padding: 0">
+              <el-input
+                type="textarea"
+                style="height: 100%"
+                autosize
+                placeholder="请输入内容"
+                v-model="remark"
+              >
+              </el-input>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-button type="primary" size="small" @click="handleSubmit"
+              >审核</el-button
+            >
+          </el-row>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
 import {
-  getList,
-  updatePolicy,
   getPolicyDetail,
+  getMaterialList,
   getCustomerList,
   getConditionList,
+  toExamine,
 } from "@/api/supply/sales";
 import Minxin from "@/mixin";
+import { ok } from "assert";
 
 export default {
   mixins: [Minxin],
   name: "examine",
   data() {
     return {
+      currentPages: 1, // 当前页码
+      pageSizes: 10, // 每页数量
+      clistTotal: 0,
       input: "",
+      remark: "",
       fileList: [],
       listLoading: false,
       imageUrl: "",
       dataList: [],
-      radio: "",
+      examineStatus: "OK",
       options: {},
       value: "",
       detail: {},
@@ -271,47 +533,66 @@ export default {
       custoList: [],
     };
   },
+  created() {},
   methods: {
     getList() {
+      this.listLoading = true;
       getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
         this.detail = res.data;
-        console.log(this.dataList);
-      });
-      const params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        code: this.screenForm.code,
-        createBy: this.screenForm.createBy,
-        endCreateTime: this.screenForm.endCreateTime,
-        endTime1: this.screenForm.endTime1,
-        endTime2: this.screenForm.endTime2,
-        examineBy: this.screenForm.examineBy,
-        remark: this.screenForm.remark,
-        startCreateTime: this.screenForm.startCreateTime,
-        startTime1: this.screenForm.startTime1,
-        startTime2: this.screenForm.startTime2,
-        status: this.screenForm.status,
-        title: this.screenForm.title,
-        type: this.screenForm.type,
-      };
-      getList(params).then((res) => {
-        this.dataList = res.data.records;
-      });
-      const condParams = {
-        policyId: this.$parent.id,
-      };
-      // 获取条件政策
-      getConditionList(condParams).then((res) => {
-        this.conditionList = res.data;
-        console.log(res, 46);
+        const condParams = {
+          policyId: this.detail.code,
+        };
+        // 获取条件政策
+        getConditionList(condParams).then((res) => {
+          this.conditionList = res.data;
+        });
+        const paramss = {
+          pageNum: this.currentPage,
+          pageSize: this.pageSize,
+          policyId: this.detail.code,
+          saleTypeCode: "",
+        };
+        getMaterialList(paramss).then((res) => {
+          this.dataList = res.data.records;
+          this.listTotal = res.data.total;
+          this.listLoading = false;
+        });
+
+        this.getCond();
       });
+    },
+    // 更改每页数量
+    handleSizeChanges(val) {
+      this.pageSizes = val;
+      this.currentPages = 1;
+      this.getCond();
+    },
+    // 更改当前页
+    handleCurrentChanges(val) {
+      this.currentPages = val;
+      this.getCond();
+    },
+    getCond() {
+      this.listLoading = true;
       const custoParams = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        policyId: this.$parent.id,
+        pageNum: this.currentPages,
+        pageSize: this.pageSizes,
+        policyId: this.detail.code,
       };
       getCustomerList(custoParams).then((res) => {
         this.custoList = res.data.records;
+        this.clistTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+    handleSubmit() {
+      toExamine({
+        examineStatus: this.examineStatus,
+        policyId: this.$parent.id ,
+        examineRemark: this.remark,
+      }).then((res) => {
+        this.$successMsg("已提交审核");
+        this.isShow = 1;
       });
     },
   },
@@ -319,6 +600,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.el-col {
+  overflow: hidden;
+}
 .descriptions {
   // border: #EBEEF5;
   border: 1px solid #ebeef5;
@@ -339,4 +623,7 @@ export default {
 .el-divider--horizontal {
   margin: 20px 0;
 }
+.col {
+  height: 100px;
+}
 </style>

+ 12 - 0
src/views/sales_policy/components/Transfer.vue

@@ -139,7 +139,11 @@ export default {
         },
       ],
       value: "",
+<<<<<<< HEAD
+      region: "",
+=======
       region: "0",
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       keyword: "",
     };
   },
@@ -154,10 +158,18 @@ export default {
         keyword: this.keyword,
         region: this.region,
       };
+<<<<<<< HEAD
+
+      // 获取经销商列表
+      getCrList(customerParams).then((res) => {
+        this.dataL = res.data.records;
+        console.log(res,'获取经销商列表');
+=======
       console.log(555);
       // 获取经销商列表
       getCrList(customerParams).then((res) => {
         this.dataL = res.data.records;
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
         this.listTotal = res.data.total;
       });
     },

+ 43 - 15
src/views/sales_policy/policy_list.vue

@@ -111,8 +111,8 @@
                   class="select_height"
                 >
                   <el-option
-                    v-for="item in statusOptions"
-                    :key="item.value"
+                    v-for="(item, index) in statusOptions"
+                    :key="index"
                     :label="item.label"
                     :value="item.value"
                   >
@@ -155,20 +155,9 @@
     </div>
     <div class="btn-group">
       <el-row type="flex">
-        <el-button type="primary" class="btn" size="small" @click="isShow = 2"
+        <el-button type="primary" class="btn" size="small" @click="hanlenewInfo"
           >新增</el-button
         >
-        <!-- <el-upload
-          class="import-btn"
-          :action="baseURL + 'student/import'"
-          :http-request="handleImport"
-          :file-list="importFileList"
-        >
-          <el-button type="primary" size="small">导入</el-button>
-        </el-upload>
-        <el-button type="primary" class="btn" size="small" @click="handleExport"
-          >导出</el-button
-        > -->
       </el-row>
     </div>
     <div class="mymain-container">
@@ -180,6 +169,8 @@
               size="small"
               @click="(isShow = 5), (id = scope.row.id)"
               >编辑</el-button
+<<<<<<< HEAD
+=======
             > -->
             <el-button
               type="text"
@@ -191,10 +182,21 @@
               style="margin-left: 10px"
               title="审核?"
               @onConfirm="hanleExamine(scope.row)"
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
             > -->
             <el-button
               type="text"
-              @click="(isShow = 6), (id = scope.row.id)"
+              size="small"
+              @click="
+                (isShow = 4), (id = scope.row.id), (code = scope.row.code)
+              "
+              >详情</el-button
+            >
+            <el-button
+              type="text"
+              @click="
+                (isShow = 6), (id = scope.row.id), (code = scope.row.code)
+              "
               size="small"
               >审核</el-button
             >
@@ -301,8 +303,13 @@
       </el-pagination>
     </div>
   </div>
+<<<<<<< HEAD
+  <AddPolicy v-else-if="isShow == 2"  />
+  <AddCondition v-else-if="isShow == 3 || isShow==10" :id="id" @handleSubmitCon='handleSubmitCon'/>
+=======
   <AddPolicy v-else-if="isShow == 2" />
   <AddCondition v-else-if="isShow == 3 || isShow == 6" :id="id" />
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
   <Examine v-else />
 </template>
 
@@ -313,6 +320,7 @@ import {
   deletePolicy,
   getpolicySubmit,
   toExamine,
+  getConditionList
 } from "@/api/supply/sales";
 import Minxin from "@/mixin";
 import { downloadFiles, handleImport } from "@/utils/util";
@@ -321,13 +329,19 @@ import AddModel from "./components/AddModel";
 import Pagination from "./components/Pagination";
 import AddCondition from "./components/AddCondition";
 import Examine from "./components/Examine";
+import { mapState} from "vuex";
 
 export default {
   mixins: [Minxin],
   data() {
     return {
       id: "",
+<<<<<<< HEAD
+      code: "",
+      codeId: "",
+=======
       codeId:'',
+>>>>>>> c6c6fe78bafa47aa89fa477db0c80cf2e9254cad
       isShow: 1,
       dataList: [],
       screenForm: {
@@ -370,9 +384,21 @@ export default {
       value: "",
       imageUrl: "",
       baseURL: "",
+      isFlag:''
     };
   },
+  computed: mapState({
+    comCode: (state) => state.sales.code,
+  }),
+  created() {
+
+  },
   methods: {
+    // ...mapActions("sales", ["hanlenewInfo"]),
+    hanlenewInfo(){
+      this.isShow = 2
+      this.$store.dispatch('sales/hanlenewInfo')
+    },
     getList() {
       const params = {
         pageNum: this.currentPage,
@@ -468,6 +494,8 @@ export default {
         this.$errorMsg("未满足条件");
       }
     },
+
+
   },
   components: {
     Examine,