ソースを参照

业务端 经销商端 销售政策订单

howie 3 年 前
コミット
c265ba5ed7

+ 18 - 1
src/api/supply/retail.js

@@ -115,4 +115,21 @@ export function checkStock(params) {
     method: 'get',
     params
   })
-}
+}
+
+
+export function submitCancel(params) {
+  return request({
+    url: '/retail/submit/cancel',
+    method: 'post',
+    params
+  })
+}
+
+export function typeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}

+ 98 - 83
src/views/basic_data/warehouse/warehouse_site.vue

@@ -41,9 +41,7 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small" @click="newData"
-          >新增</el-button
-        >
+        <el-button type="primary" size="small" @click="newData">新增</el-button>
         <!-- <el-button type="primary" size="small" @click="showDialogForm = true,type=2">编辑</el-button> -->
         <el-button type="primary" size="small">删除</el-button>
       </div>
@@ -82,13 +80,13 @@
             :formatter="formDatas"
             show-overflow-tooltip
           >
-          <template slot-scope="scope">
-            <template v-if="scope.row.kingDeeStocks.length>1">
-            <el-tag type="danger" v-for="item in scope.row.kingDeeStocks">
-             {{item.name}}
-            </el-tag>
+            <template slot-scope="scope">
+              <template v-if="scope.row.kingDeeStocks.length > 1">
+                <el-tag type="danger" v-for="item in scope.row.kingDeeStocks">
+                  {{ item.name }}
+                </el-tag>
+              </template>
             </template>
-          </template>
           </el-table-column>
           <el-table-column
             align="center"
@@ -97,7 +95,7 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             label="库存充足"
             prop="status"
@@ -105,10 +103,10 @@
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-                <el-tag type="success" v-if="scope.row.status===1">充足</el-tag>
-                <el-tag type="danger" v-else>不充足</el-tag>
+              <el-tag type="success" v-if="scope.row.status === 1">充足</el-tag>
+              <el-tag type="danger" v-else>不充足</el-tag>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             align="center"
             label="创建人"
@@ -145,13 +143,13 @@
             min-width="160"
             show-overflow-tooltip
           >
-        <template slot-scope="scope">
-              <el-button
+            <template slot-scope="scope">
+              <!-- <el-button
                 type="text"
                 class="textColor"
                 @click="hanleDetail(scope.row)"
                 >详情</el-button
-              >
+              > -->
               <el-button
                 type="text"
                 class="textColor"
@@ -169,7 +167,6 @@
                 <el-button
                   slot="reference"
                   type="text"
-
                   class="textColor el-popover-left"
                   >删除</el-button
                 >
@@ -181,7 +178,7 @@
       <!-- 分页 -->
       <div class="fr">
         <el-pagination
-        @size-change="handleSizeChange"
+          @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-sizes="[10, 20, 30, 50]"
@@ -212,7 +209,11 @@
           <el-input v-model="diaLogForm.name"></el-input>
         </el-form-item>
         <el-form-item label="仓位名称">
-          <el-select v-model="diaLogForm.stockIds" @change="onChange"  multiple placeholder="请选择">
+          <el-select
+            v-model="diaLogForm.stockIds"
+            multiple
+            placeholder="请选择"
+          >
             <el-option
               v-for="item in cList"
               :key="item.id"
@@ -234,10 +235,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <elshowDialogForm @click="showDialogForm = false">取 消</elshowDialogForm = false-button>
-        <el-button type="primary" @click="hanleInfo"
-          >确 定</el-button
-        >
+        <el-button @click="showDialogForm = false">取 消</el-button>
+        <el-button type="primary" @click="hanleInfo">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -245,7 +244,13 @@
 
 <script>
 import Mixin from "@/mixin/index";
-import { getListStock,addStock,updateStock,deleteStock,getList } from "@/api/basic_data/warehouse";
+import {
+  getListStock,
+  addStock,
+  updateStock,
+  deleteStock,
+  getList,
+} from "@/api/basic_data/warehouse";
 export default {
   mixins: [Mixin],
   data() {
@@ -276,66 +281,78 @@ export default {
         },
       ],
       diaLogForm: {
-      id:null,
-      name: "",
-      remark: "",
-    	status: 1,
-    	stockCordon: 0,
-      stockIds: [],
-      updateBy: "",
-    	updateTime: ""
+        id: null,
+        name: "",
+        remark: "",
+        status: 1,
+        stockCordon: 0,
+        stockIds: [],
+        updateBy: "",
+        updateTime: "",
       },
       showDialogForm: false,
       screenForm: {
         name: "",
         storeName: "",
       },
-       screenForm2: {
+      screenForm2: {
         // 筛选表单数据
         name: "", // 名称
       },
-      type:null,
-      cList:{},
-
+      type: null,
+      cList: {},
     };
   },
   methods: {
     addFn() {
       this.showDialogForm = true;
     },
-    newData(){
-      this.showDialogForm = true
-      this.type=1
-        const params = {
+    newData() {
+      this.showDialogForm = true;
+      this.type = 1;
+      const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        name:''
-      }
-      getList(params).then(res=>{
+        name: "",
+      };
+      getList(params).then((res) => {
         this.cList = res.data.records;
         this.listTotal = res.data.total;
-      })
+      });
     },
-     //显示编辑,编辑数据初始化
+    //显示编辑,编辑数据初始化
     editFn(id, row) {
+      console.log(row);
       this.type = 2;
-      this.diaLogForm = {
-      id,
-      name: row.name,
-      remark: row.remark,
-    	status: row.status,
-    	stockCordon: row.stockCordon,
-      stockIds: row.stockIds === undefined? [] : row.stockIds,
+      const arr = []
+
+       if (row.kingDeeStocks.length>1) {
+         row.kingDeeStocks.forEach(el => {
+           arr.push(el.id)
+      });
+      }
+        this.newData()
+       this.diaLogForm = {
+        id,
+        name: row.name,
+        remark: row.remark,
+        status: row.status,
+        stockCordon: row.stockCordon,
+        stockIds: row.stockIds === undefined ? arr: row.stockIds,
       };
+
+
+
+
       this.showDialogForm = true;
     },
-    formDatas(row){
+    formDatas(row) {
       console.log(row.kingDeeStocks);
-      let str = ''
-//       row.kingDeeStocks.forEach(item => {
-//           str+= item.name
-//       });
-// return str
+      let str = "";
+      //       row.kingDeeStocks.forEach(item => {
+      //           str+= item.name
+      //       });
+      // return str
       // let a = (row && row.kingDeeStocks) || []
       // let arr = []
       // console.log(a);
@@ -346,33 +363,32 @@ export default {
       //   return arr.join(',')
     },
     hanleInfo() {
-      if (this.type===1) {
-
-          addStock(this.diaLogForm).then((res) => {
+      if (this.type === 1) {
+        addStock(this.diaLogForm).then((res) => {
           this.$successMsg("保存成功");
           this.showDialogForm = false;
           this.getList();
         });
-      }else{
+      } else {
         const params = {
-              ...this.diaLogForm
-        }
-        console.log(params,123);
-         updateStock(params).then(res=>{
-           this.$successMsg("保存成功");
+          ...this.diaLogForm,
+        };
+        console.log(params, 123);
+        updateStock(params).then((res) => {
+          this.$successMsg("保存成功");
           this.showDialogForm = false;
           this.getList();
-         })
+        });
       }
-        this.diaLogForm = {
-              name: "",
-              remark: "",
-              status: 0,
-              stockCordon: 0,
-              stockIds: [],
-              updateBy: "",
-              updateTime: ""
-        }
+      this.diaLogForm = {
+        name: "",
+        remark: "",
+        status: 0,
+        stockCordon: 0,
+        stockIds: [],
+        updateBy: "",
+        updateTime: "",
+      };
     },
     getList() {
       this.listLoading = true;
@@ -389,14 +405,13 @@ export default {
         console.log(this.dataList, 1233);
       });
     },
-     // 删除数据
+    // 删除数据
     hanleDelete(id) {
-        deleteStock({id}).then(res=>{
-            this.$successMsg("删除成功");
-                  this.getList();
-        })
+      deleteStock({ id }).then((res) => {
+        this.$successMsg("删除成功");
+        this.getList();
+      });
     },
-
   },
 };
 </script>

+ 336 - 233
src/views/sales_rebate/rebate_list.vue

@@ -1,39 +1,72 @@
 <template>
   <div class="app-container">
     <div class="screen-container">
-      <el-form ref="screenForm" :model="screenForm" size="small" label-position="left">
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        size="small"
+        label-position="left"
+      >
         <el-row :gutter="20">
-
           <el-col :xs="24" :ms="6" :lg="6">
             <el-form-item label="" prop="mainName">
-              <el-input v-model="screenForm.mainName" placeholder="返利品类" size="small"></el-input>
+              <el-input
+                v-model="screenForm.mainName"
+                placeholder="返利品类"
+                size="small"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
             <el-form-item label="" prop="saleTypeCode">
-              <el-input v-model="screenForm.saleTypeCode" placeholder="销售类型编码" size="small"></el-input>
+              <el-input
+                v-model="screenForm.saleTypeCode"
+                placeholder="销售类型编码"
+                size="small"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
             <el-form-item label="" prop="saleTypeName">
-              <el-input v-model="screenForm.saleTypeName" placeholder="销售类型名称" size="small"></el-input>
+              <el-input
+                v-model="screenForm.saleTypeName"
+                placeholder="销售类型名称"
+                size="small"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
             <el-form-item prop="status">
-              <el-select v-model="screenForm.status" placeholder="请选择" size="small">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+              <el-select
+                v-model="screenForm.status"
+                placeholder="请选择"
+                size="small"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="18" :lg="18">
             <el-form-item>
-              <el-button type="primary" size="small" @click="dialogVisible = true,type=1,getDictList()">新增</el-button>
-
-              <el-button type="primary" size="small" @click="submitScreenForm">查询</el-button>
-              <el-button type="primary" size="small" @click="resetScreenForm">重置</el-button>
+              <el-button
+                type="primary"
+                size="small"
+                @click="(dialogVisible = true), (type = 1), getDictList()"
+                >新增</el-button
+              >
 
+              <el-button type="primary" size="small" @click="submitScreenForm"
+                >查询</el-button
+              >
+              <el-button type="primary" size="small" @click="resetScreenForm"
+                >重置</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
@@ -41,28 +74,61 @@
     </div>
 
     <div class="mymain-container">
-      <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row
-        stripe>
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
         <el-table-column type="selection" width="55" align="center">
         </el-table-column>
         <template v-for="col in columns">
-          <el-table-column align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
-            show-overflow-tooltip v-if="col.prop == 'status'">
+          <el-table-column
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+            v-if="col.prop == 'status'"
+          >
             <template slot-scope="scope">
-              <el-switch v-model="scope.row.status" disabled :active-value='true' :inactive-value='false'
-                :active-text="scope.row.status ? '已启用' : '已禁用'">
+              <el-switch
+                v-model="scope.row.status"
+                disabled
+                :active-value="true"
+                :inactive-value="false"
+                :active-text="scope.row.status ? '已启用' : '已禁用'"
+              >
               </el-switch>
             </template>
           </el-table-column>
-          <el-table-column v-else align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
-            show-overflow-tooltip>
+          <el-table-column
+            v-else
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
           </el-table-column>
         </template>
 
-        <el-table-column align="center" fixed="right" label="操作" min-width="160">
+        <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="160"
+        >
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="hanleDateil(scope.row)">查看</el-button>
-            <el-button type="text" size="small" @click="hanleEdit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >查看</el-button
+            >
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >编辑</el-button
+            >
             <!-- <el-button type="text" size="small">编辑</el-button> -->
           </template>
         </el-table-column>
@@ -70,37 +136,77 @@
       <Pagination />
     </div>
     <div>
-      <el-dialog :visible.sync="dialogVisible" width="50%" @close='hanelclose'>
-        <el-form :model="dialogForm" ref="dialogForm" label-width="120px" :inline="false" size="normal">
+      <el-dialog :visible.sync="dialogVisible" width="50%" @close="hanelclose">
+        <el-form
+          :model="dialogForm"
+          ref="dialogForm"
+          label-width="120px"
+          :inline="false"
+          size="normal"
+        >
           <el-form-item label="返利使用钱包" prop="name">
-            <el-input v-model="dialogForm.name" :disabled="type==3"></el-input>
+            <el-input
+              v-model="dialogForm.name"
+              :disabled="type == 3"
+            ></el-input>
           </el-form-item>
           <el-form-item label="产品使用品类" prop="mainName">
-            <el-select v-model="dialogForm.mainName" :disabled="type==3" placeholder="请选择品类" size="small">
-              <el-option v-for="item in dictListData" :key="item.dictCode" :label="item.dictValue"
-                :value="item.dictCode">
+            <el-select
+              v-model="dialogForm.mainName"
+              :disabled="type == 3"
+              placeholder="请选择品类"
+              size="small"
+            >
+              <el-option
+                v-for="item in dictListData"
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              >
               </el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="销售类型编码" prop="saleTypeCode">
-            <el-select v-model="dialogForm.saleTypeCode" :disabled="type==3" placeholder="请选择类型编码" size="small">
-              <el-option v-for="item in typeList" :key="item.sysDictId" :label="item.dictValue" :value="item.saleCode">
+            <el-select
+              v-model="dialogForm.saleTypeCode"
+              :disabled="type == 3"
+              placeholder="请选择类型编码"
+              size="small"
+            >
+              <el-option
+                v-for="item in typeList"
+                :key="item.sysDictId"
+                :label="item.dictValue"
+                :value="item.saleCode"
+              >
               </el-option>
             </el-select>
-
           </el-form-item>
           <el-form-item label="销售类型名称" prop="saleTypeName">
-            <el-input v-model="dialogForm.saleTypeName" :disabled="type==3"></el-input>
+            <el-input
+              v-model="dialogForm.saleTypeName"
+              :disabled="type == 3"
+            ></el-input>
           </el-form-item>
           <el-form-item label="返利折扣比例" prop="rabateRate">
-            <el-input placeholder="例如:0.1=1折" :disabled="type==3" v-model="dialogForm.rabateRate"></el-input>
+            <el-input
+              placeholder="例如:0.1=1折"
+              :disabled="type == 3"
+              v-model="dialogForm.rabateRate"
+            ></el-input>
           </el-form-item>
           <el-form-item label="状态" prop="status">
-            <el-switch v-model="dialogForm.status" :disabled="type==3" :active-value='true' :inactive-value='false'
-              :active-text="dialogForm.status ? '启用' : ''"> </el-switch>
+            <el-switch
+              v-model="dialogForm.status"
+              :disabled="type == 3"
+              :active-value="true"
+              :inactive-value="false"
+              :active-text="dialogForm.status ? '启用' : ''"
+            >
+            </el-switch>
           </el-form-item>
         </el-form>
-        <template v-if="type !==3">
+        <template v-if="type !== 3">
           <span slot="footer" class="dialog-footer">
             <el-button @click="hanleCancel">取 消</el-button>
             <el-button type="primary" @click="handelInfo">确 定</el-button>
@@ -112,213 +218,210 @@
 </template>
 
 <script>
-  import Mixin from "@/mixin/index";
-  import Pagination from "@/components/Pagination";
-  import {
-    addWallet,
-    getDictList,
-    getTypeList,
-    updateWallet,
-    getWalletList,
-    getWalletDetail
-  } from "@/api/supply/sales"
+import Mixin from "@/mixin/index";
+import Pagination from "@/components/Pagination";
+import {
+  addWallet,
+  getDictList,
+  getTypeList,
+  updateWallet,
+  getWalletList,
+  getWalletDetail,
+} from "@/api/supply/sales";
 
-  export default {
-    mixins: [Mixin],
-    data() {
-      return {
-        type: 0, // 0 1
-        screenForm: {
-          mainName: '',
-          saleTypeCode: '',
-          saleTypeName: '',
-          status: true
+export default {
+  mixins: [Mixin],
+  data() {
+    return {
+      type: 0, // 0 1
+      screenForm: {
+        mainName: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        status: true,
+      },
+      dialogForm: {
+        name: "",
+        mainName: "",
+        mainId: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        rabateRate: "",
+        status: true,
+      },
+      dataList: [],
+      columns: [
+        {
+          prop: "saleTypeCode",
+          lable: "销售类型编码",
+          widht: 160,
+        },
+        {
+          prop: "saleTypeName",
+          lable: "销售类型名称",
+          widht: 160,
+        },
+        {
+          prop: "name",
+          lable: "返利使用钱包",
+          widht: 160,
+        },
+        {
+          prop: "rabateRate",
+          lable: "返利折扣比例",
+          widht: 160,
+        },
+        {
+          prop: "status",
+          lable: "状态",
+          widht: 160,
+        },
+        {
+          prop: "createBy",
+          lable: "创建人",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "创建时间",
+          widht: 160,
+        },
+        {
+          prop: "updateBy",
+          lable: "更新人",
+          widht: 160,
         },
-        dialogForm: {
-          name: "",
-          mainName: '',
-          mainId: '',
-          saleTypeCode: '',
-          saleTypeName: '',
-          rabateRate: '',
-          status: true
+        {
+          prop: "updateTime",
+          lable: "更新时间",
+          widht: 160,
         },
-        dataList: [],
-        columns: [{
-            prop: "saleTypeCode",
-            lable: "销售类型编码",
-            widht: 160
-          },
-          {
-            prop: "saleTypeName",
-            lable: "销售类型名称",
-            widht: 160
-          },
-          {
-            prop: "name",
-            lable: "返利使用钱包",
-            widht: 160
-          },
-          {
-            prop: "rabateRate",
-            lable: "返利折扣比例",
-            widht: 160
-          },
-          {
-            prop: "status",
-            lable: "状态",
-            widht: 160
-          },
-          {
-            prop: "createBy",
-            lable: "创建人",
-            widht: 160
-          },
-          {
-            prop: "createTime",
-            lable: "创建时间",
-            widht: 160
-          },
-          {
-            prop: "updateBy",
-            lable: "更新人",
-            widht: 160
-          },
-          {
-            prop: "updateTime",
-            lable: "更新时间",
-            widht: 160
-          },
-        ],
-        options: [{
-            value: true,
-            label: '已启用'
-          },
-          {
-            value: false,
-            label: '已停用'
-          }
-        ],
-        dictListData: [],
-        typeList: []
+      ],
+      options: [
+        {
+          value: true,
+          label: "已启用",
+        },
+        {
+          value: false,
+          label: "已停用",
+        },
+      ],
+      dictListData: [],
+      typeList: [],
+    };
+  },
+  methods: {
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        mainName: this.screenForm.mainName,
+        saleTypeCode: this.screenForm.saleTypeCode,
+        saleTypeName: this.screenForm.saleTypeName,
+        status: this.screenForm.status,
+      };
+      getWalletList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listLoading = false;
+      });
+    },
+    hanleEdit(item) {
+      this.dialogForm = {
+        id: item.id,
+        name: item.name,
+        mainName: item.mainName,
+        saleTypeCode: item.saleTypeCode,
+        saleTypeName: item.saleTypeName,
+        rabateRate: item.rabateRate,
+        status: item.status,
+      };
+      this.getDictList();
+      this.dialogVisible = true;
+    },
+    getDictList() {
+      getDictList({
+        sysDictEnum: "PRODUCT_TYPE",
+      }).then((res) => {
+        console.log(res);
+        this.dictListData = res.data;
+      });
+      const params = {
+        pageNum: 1,
+        pageSize: 10,
+        saleCode: "",
+        saleName: "",
+        status: "",
       };
+      getTypeList(params).then((res) => {
+        this.typeList = res.data.records;
+      });
     },
-    methods: {
-      getList() {
-        this.listLoading = true
+    hanleDateil(item) {
+      this.type = 3;
+      this.dialogVisible = true;
+      this.dialogForm = {
+        ...item,
+      };
+    },
+    hanelclose() {
+      this.type = "";
+      this.hanleReset();
+    },
+    handelInfo() {
+      if (this.type) {
+        this.hanleScreen(this.dialogForm.mainId);
         const params = {
-          pageNum: this.currentPage,
-          pageSize: this.pageSize,
-          mainName: this.screenForm.mainName,
-          saleTypeCode: this.screenForm.saleTypeCode,
-          saleTypeName: this.screenForm.saleTypeName,
-          status: this.screenForm.status
-        }
-        getWalletList(params).then(res => {
-          this.dataList = res.data.records
-          this.listLoading = false
-        })
-
-      },
-      hanleEdit(item) {
-        this.dialogForm = {
-          id: item.id,
-          name: item.name,
-          mainName: item.mainName,
-          saleTypeCode: item.saleTypeCode,
-          saleTypeName: item.saleTypeName,
-          rabateRate: item.rabateRate,
-          status: item.status
-        }
-        this.getDictList()
-        this.dialogVisible = true
-
-      },
-      getDictList() {
-        getDictList({
-          sysDictEnum: "PRODUCT_TYPE"
-        }).then(res => {
+          ...this.dialogForm,
+        };
+        addWallet(params).then((res) => {
           console.log(res);
-          this.dictListData = res.data
-        })
-        const params = {
-          pageNum: 1,
-          pageSize: 10,
-          saleCode: '',
-          saleName: '',
-          status: ''
-        }
-        getTypeList(params).then(res => {
-          this.typeList = res.data.records
-        })
-      },
-      hanleDateil(item) {
-        this.type = 3
-        this.dialogVisible = true
-        this.dialogForm = {
-          ...item
-        }
-
-      },
-      hanelclose() {
-        this.hanleReset()
-      },
-      handelInfo() {
-        if (this.type) {
-          this.hanleScreen(this.dialogForm.mainId)
-          const params = {
-            ...this.dialogForm
-          }
-          addWallet(params).then(res => {
-            console.log(res);
-            this.$successMsg("添加成功")
-            this.hanleReset()
-          })
-        } else {
-          const upParams = {
-            ...this.dialogForm
-          }
-          updateType(upParams).then(res => {
-            this.$successMsg("修改成功")
-            this.hanleReset()
-          })
-        }
-      },
-      hanleReset() {
-        this.dialogForm = {
-          name: '',
-          mainId: '',
-          mainName: '',
-          saleTypeCode: '',
-          saleTypeName: '',
-          rabateRate: '',
-          status: true
-        }
-        // this.$refs.dialogForm.resetFields()
-        this.dialogVisible = false
-        this.getList()
-
-      },
-      hanleCancel() {
-        this.hanleReset()
-        this.dialogVisible = false;
-      },
-      hanleScreen(code) {
-        this.dictListData.find(k => {
-          if (k.dictCode == code) {
-            this.dialogForm.mainId = k.dictCode
-            this.dialogForm.mainName = k.dictValue
-            return
-          }
-        })
+          this.$successMsg("添加成功");
+          this.hanleReset();
+        });
+      } else {
+        const upParams = {
+          ...this.dialogForm,
+        };
+        updateType(upParams).then((res) => {
+          this.$successMsg("修改成功");
+          this.hanleReset();
+        });
       }
-
-
     },
-    components: {
-      Pagination,
+    hanleReset() {
+      this.dialogForm = {
+        name: "",
+        mainId: "",
+        mainName: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        rabateRate: "",
+        status: true,
+      };
+      // this.$refs.dialogForm.resetFields()
+      this.dialogVisible = false;
+      this.getList();
+    },
+    hanleCancel() {
+      this.hanleReset();
+      this.dialogVisible = false;
+    },
+    hanleScreen(code) {
+      this.dictListData.find((k) => {
+        if (k.dictCode == code) {
+          this.dialogForm.mainId = k.dictCode;
+          this.dialogForm.mainName = k.dictValue;
+          return;
+        }
+      });
     },
-  };
+  },
+  components: {
+    Pagination,
+  },
+};
 </script>
 
 <style scoped></style>

+ 6 - 2
src/views/sales_rebate/salestype_list.vue

@@ -219,6 +219,7 @@
           mainName: item.mainName,
           status: item.status,
         }
+        this.type =0
         this.dialogVisible = true
 
       },
@@ -227,9 +228,10 @@
         this.dialogForm = {
           ...item
         }
+        this.type =3
       },
       handelInfo() {
-        if (this.type) {
+        if (this.type==1) {
           const params = {
             ...this.dialogForm
           }
@@ -239,7 +241,7 @@
 
             this.hanleReset()
           })
-        } else {
+        } else if(this.type == 0) {
           const upParams = {
             ...this.dialogForm
           }
@@ -248,6 +250,8 @@
 
             this.hanleReset()
           })
+        }else{
+          this.dialogVisible= false
         }
       },
       hanleReset() {

+ 5 - 0
src/views/supply/policy.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view></router-view>
+  </div>
+</template>

+ 94 - 0
src/views/supply/policy/components/Invoice.vue

@@ -0,0 +1,94 @@
+<!--
+ * @Author: howie
+ * @Date: 2022-06-21 10:26:55
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 11:08:28
+ * @FilePath: \supply-front\src\views\supply\policy\components\Invoice.vue
+ * @Description: 发货单页面
+ *
+ * Copyright (c) 2022, All Rights Reserved.
+-->
+<template>
+  <div>
+    <my-table-info/>
+  </div>
+</template>
+
+<script>
+import myTableInfo from "./common/table_info";
+export default {
+  data() {
+    return {
+      dataList: [],
+      columns: [
+        {
+          prop: "saleCode",
+          lable: "发货单",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "价税合计",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "折扣后金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "发货日期",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "仓库",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "客户名称",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "存货编码",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "无税金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "无税单价",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "数量",
+          widht: 160,
+        }
+      ],
+    };
+  },
+  components: {
+    myTableInfo,
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>
+

+ 134 - 0
src/views/supply/policy/components/chargeback.vue

@@ -0,0 +1,134 @@
+<!--
+ * @Author: howie
+ * @Date: 2022-06-21 10:26:34
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 14:45:17
+ * @FilePath: \supply-front\src\views\supply\policy\components\chargeback.vue
+ * @Description: 退货单页面
+ *
+ * Copyright (c) 2022, All Rights Reserved.
+-->
+<template>
+  <div>
+    <my-detail @handleSumit="handleSumit"/>
+  </div>
+</template>
+
+<script>
+import myDetail from "./common/common";
+export default {
+  data() {
+    return {
+      dataList: [],
+      columns: [
+        {
+          prop: "saleCode",
+          lable: "销售类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "存货编码",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单位",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单价",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "订单金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "退利类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "返利金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "隔离折扣",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "现在钱包",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "实付金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "可退数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "退订数量",
+          widht: 160,
+        },
+          {
+          prop: "saleCode",
+          lable: "备注",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "税率",
+          widht: 160,
+        },
+      ],
+    };
+  },
+  methods: {
+      handleSumit(params){
+
+    }
+  },
+  components: {
+    myDetail,
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>
+

+ 231 - 0
src/views/supply/policy/components/common/common.vue

@@ -0,0 +1,231 @@
+<template>
+  <div>
+    <div class="screen-container">
+      <slot name="header">
+        <div>
+          <el-button
+            v-for="(item, index) in btnConfig"
+            :key="index"
+            :type="item.type"
+            :size="item.size"
+            @click=""
+            >{{ item.text }}</el-button
+          >
+        </div>
+        <div>
+          <h5>提货进度</h5>
+          <el-divider></el-divider>
+          <el-row :gutter="20">
+            <el-col :span="15" :offset="0">
+              <el-progress :percentage="50"></el-progress>
+            </el-col>
+            <el-col :span="9" :offset="0" class="tr">
+              <i class="el-icon-edit"></i
+            ></el-col>
+          </el-row>
+        </div>
+      </slot>
+    </div>
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">销售计划单号:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">销售政策编号:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商名称:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">业务员:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">销售政策说明:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">回复:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">备注:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审核人:</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">关闭人:</div>
+          <div class="value"></div>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="mymain-container">
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        show-summary
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column type="selection" width="55" align="center">
+        </el-table-column>
+        <template v-for="col in columns">
+          <el-table-column
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </template>
+        <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="160"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >审批</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >退订</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >详情</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <Common />
+    </div>
+    <h5>{{ type == 1 ? "审批" : type == 2 ? "退货信息" : "" }}</h5>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">{{ type == 1 ? "审批人" : "操作人" }}</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item" v-if="type == 2">
+          <div class="label">退货日期</div>
+          <div class="value"></div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item" v-if="type == 1">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group v-model="examineStatus">
+              <el-radio label="OK">通过</el-radio>
+              <el-radio label="FAIL">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">{{ type == 1 ? "审批说明" : "退货说明" }}</div>
+          <div class="value">
+            <el-input
+              v-model="examineRemark"
+              :placeholder="type == 1 ? '审批说明' : '退货说明'"
+            ></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <div class="btn-group clearfix" v-if="isShow">
+      <div class="fl">
+        <el-button type="primary" size="small" @click="onSubmit"
+          >提交审批</el-button
+        >
+        <!-- <el-button type="primary" size="small" @click="resetScreenForm"
+              >重置</el-button
+            > -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    type: {
+      type: String,
+      default: 1, // 1,2,3 展示不同页面样式
+    },
+    isShow: {
+      type: Boolean,
+      default: true, //  审核模块展示
+    },
+    listLoading: {
+      // table 加载loading
+      type: Boolean,
+      default: false,
+    },
+    dataList: {
+      type: Array,
+      default: [], // table 数据
+    },
+    columns: {
+      type: Array,
+      default: [], // table的label和prop
+    },
+    examineStatus: {
+      type: String,
+      default: "",
+    },
+    examineRemark: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      btnConfig: [
+        {
+          text: "详情",
+          size: "small",
+          type: "primary",
+        },
+      ],
+    };
+  },
+  methods: {
+    onSubmit() {
+      this.$emit("handleSumit", {
+        examineStatus: this.examineStatus,
+        examineRemark: this.examineRemark,
+        id: this.id,
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.screen-container {
+  margin: 20px 0;
+}
+</style>

+ 87 - 0
src/views/supply/policy/components/common/dia_table.vue

@@ -0,0 +1,87 @@
+<!--
+ * @Author: howie
+ * @Date: 2022-06-21 10:34:10
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 10:48:30
+ * @FilePath: \supply-front\src\views\supply\policy\components\common\dia_table.vue
+ * @Description:弹框table
+ *
+ * Copyright (c) 2022, All Rights Reserved.
+-->
+<template>
+  <div>
+    <el-dialog
+      title="提示"
+      :visible.sync="isShow"
+      width="30%"
+      center
+      @click="handleClose"
+    >
+      <span v-if="title"></span>
+        <div>
+          <slot name="form"></slot>
+        </div>
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        show-summary
+        highlight-current-row
+        stripe
+      >
+        <template v-for="col in columns">
+          <el-table-column
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </template>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="hnadleCancel">取 消</el-button>
+        <el-button type="primary" @click="handleSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    title: {
+      type: String,
+      default: "",
+    },
+    isShow: {
+      type: Boolean,
+      default: false,
+    },
+    listLoading: {
+      // table 加载loading
+      type: Boolean,
+      default: false,
+    },
+    dataList: {
+      type: Array,
+      default: [], // table 数据
+    },
+    columns: {
+      type: Array,
+      default: [], // table的label和prop
+    },
+
+  },
+  methods: {
+    handleClose() {},
+    hnadleCancel() {},
+    handleSubmit() {},
+  },
+};
+</script>
+
+<style lang="sass" scoped></style>

+ 109 - 0
src/views/supply/policy/components/common/table_info.vue

@@ -0,0 +1,109 @@
+<!--
+ * @Descripttion: 不考虑任何扩展性功能,只实现数据动态
+ * @version: 1.0.0
+ * @Author: Howie
+ * @Date: 2022-06-20 20:21:07
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 10:32:48
+-->
+<template>
+  <div>
+    <div class="screen-container">
+      <slot name="header">
+        <el-radio-group v-model="tab" style="margin-bottom: 30px" size="small">
+          <el-radio-button
+            v-for="(item, index) in tabs"
+            :key="index"
+            :label="item.label"
+            >{{ item.text }}</el-radio-button
+          >
+        </el-radio-group>
+      </slot>
+    </div>
+    <div class="mymain-container">
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        show-summary
+        highlight-current-row
+        stripe
+      >
+        <template v-for="col in columns">
+          <el-table-column
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </template>
+        <!-- <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="160"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >审批</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >退订</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >详情</el-button
+            >
+          </template>
+        </el-table-column> -->
+      </el-table>
+      <Common />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    listLoading: {
+      // table 加载loading
+      type: Boolean,
+      default: false,
+    },
+    dataList: {
+      type: Array,
+      default: [], // table 数据
+    },
+    columns: {
+      type: Array,
+      default: [], // table的label和prop
+    },
+    tabs: {
+      type: Array,
+      default: [
+        {
+          label: "details",
+          text: "详情",
+        },
+        {
+          label: "record",
+          text: "操作记录",
+        },
+      ],
+    },
+  },
+  data() {
+    return {
+      tab: "",
+    };
+  },
+  methods: {
+    getList() {},
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 123 - 0
src/views/supply/policy/components/details.vue

@@ -0,0 +1,123 @@
+<!--
+ * @Author: howie
+ * @Date: 2022-06-21 09:56:25
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 11:00:51
+ * @FilePath: \supply-front\src\views\supply\policy\components\details.vue
+ * @Description:详情页面
+ *
+ * Copyright (c) 2022, All Rights Reserved.
+-->
+<template>
+  <div>
+    <my-detail/>
+  </div>
+</template>
+
+<script>
+import myDetail from "./common/common";
+export default {
+  data() {
+    return {
+      dataList: [],
+      columns: [
+        {
+          prop: "saleCode",
+          lable: "销售类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "存货编码",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单位",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单价",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "订单金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "退利类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "返利金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "隔离折扣",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "现在钱包",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "实付金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "原订单数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "备注",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "税率",
+          widht: 160,
+        },
+      ],
+    };
+  },
+  components: {
+    myDetail,
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 128 - 0
src/views/supply/policy/components/examine.vue

@@ -0,0 +1,128 @@
+<!--
+ * @Author: git config user.name
+ * @Date: 2022-06-21 10:26:02
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 14:39:41
+ * @FilePath: \supply-front\src\views\supply\policy\components\examine.vue
+ * @Description:审核页面
+ *
+ * Copyright (c) 2022 , All Rights Reserved.
+-->
+<template>
+  <div>
+    <my-detail @handleSumit="handleSumit" />
+  </div>
+</template>
+
+<script>
+import myDetail from "./common/common";
+export default {
+  data() {
+    return {
+      dataList: [],
+      columns: [
+        {
+          prop: "saleCode",
+          lable: "销售类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "存货编码",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单位",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "单价",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "订单金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "退利类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "返利金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "隔离折扣",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "现在钱包",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "实付金额",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "直调数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "原订单数量",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "备注",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "税率",
+          widht: 160,
+        },
+      ],
+    };
+  },
+  methods: {
+    handleSumit(params){
+
+    }
+  },
+  components: {
+    myDetail,
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 949 - 0
src/views/supply/policy/components/policy_list.vue

@@ -0,0 +1,949 @@
+<!-- <template>
+  <div class="app-container">
+    <div class="screen-container">
+      <el-radio-group
+        v-model="screenForm.examineStatus"
+        style="margin-bottom: 30px"
+        size="small"
+      >
+        <el-radio-button
+          v-for="(item, index) in tabs"
+          :key="index"
+          :label="item.label"
+          >{{ item.text }}</el-radio-button
+        >
+      </el-radio-group>
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="id">
+              <el-input
+                v-model="screenForm.id"
+                placeholder="订单号"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="policyCode">
+              <el-input
+                v-model="screenForm.policyCode"
+                placeholder="销售政策编号"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="policyRemark">
+              <el-input
+                v-model="screenForm.policyRemark"
+                placeholder="销售政策说明"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="customer">
+              <el-input
+                v-model="screenForm.customer"
+                placeholder="经销商"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="startTime">
+              <el-date-picker
+                v-model="screenForm.startTime"
+                type="datetime"
+                placeholder="订单日期"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="createBy">
+              <el-input
+                v-model="screenForm.createBy"
+                placeholder="制表人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="examineBy">
+              <el-input
+                v-model="screenForm.examineBy"
+                placeholder="审核人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6" class="tr">
+            <el-form-item>
+              <el-button type="primary" size="small" @click="submitScreenForm"
+                >查询</el-button
+              >
+              <el-button type="primary" size="small" @click="resetScreenForm"
+                >重置</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div class="btn-group">
+      <el-button type="primary" size="small" @click="handleExport"
+        >导出</el-button
+      >
+
+    </div>
+    <div class="mymain-container">
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column type="selection" width="55" align="center">
+        </el-table-column>
+        <template v-for="col in columns">
+          <el-table-column
+            v-if="col.name == 'isDirectTransfer'"
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag
+                type="success"
+                size="small"
+                v-if="scope.row.isDirectTransfer"
+                >是</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>否</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-else-if="col.name == 'examineStatus'"
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag type="success" size="small">{{
+                status[scope.row.examineStatus]
+              }}</el-tag>
+              ]
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-else
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </template>
+        <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="160"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >审批</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >退订</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >详情</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="fr">
+        <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>
+    </div>
+  </div>
+</template>
+<script>
+import Mixin from "@/mixin/index";
+import { getList } from "@/api/supply/retail";
+import { downloadFiles } from "@/utils/util";
+
+export default {
+  mixins: [Mixin],
+  data() {
+    return {
+      type: 0, // 0,1
+      screenForm: {
+        id: "",
+        policyCode: "",
+        policyRemark: "",
+        customer: "",
+        startTime: "",
+        createBy: "",
+        examineBy: "",
+        examineStatus: "",
+        type: 2,
+      },
+      dialogForm: {},
+      dataList: [
+        {
+          date: "2016-05-02",
+          name: "王小虎",
+          label: "姓名",
+          address: "上海市普陀区金沙江路 1518 弄",
+        },
+      ],
+      columns: [
+        {
+          prop: "id",
+          lable: "订单号",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "订单日期",
+          widht: 160,
+        },
+        {
+          prop: "policyCode",
+          lable: "销售政策编号",
+          widht: 160,
+        },
+        {
+          prop: "policyRemark",
+          lable: "销售政策说明",
+          widht: 160,
+        },
+        {
+          prop: "customerName",
+          lable: "经销商",
+          widht: 160,
+        },
+        {
+          prop: "materialId",
+          lable: "产品编号",
+          widht: 160,
+        },
+        {
+          prop: "materialName",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "specification",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "totalQty",
+          lable: "总数量",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "单价",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "返利类型",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "返利",
+          widht: 160,
+        },
+        {
+          name: "isDirectTransfer",
+          prop: "isDirectTransfer",
+          lable: "直调",
+          widht: 160,
+        },
+        {
+          prop: "updateTime",
+          lable: "直调数量",
+          widht: 160,
+        },
+        {
+          prop: "directTransferQty",
+          lable: "出库数量",
+          widht: 160,
+        },
+        {
+          prop: "serviceName",
+          lable: "业务员",
+          widht: 160,
+        },
+        {
+          prop: "createBy",
+          lable: "制表人",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "制表日期",
+          widht: 160,
+        },
+        {
+          prop: "examineBy",
+          lable: "审核人",
+          widht: 160,
+        },
+        {
+          prop: "examineTime",
+          lable: "审核日期",
+          widht: 160,
+        },
+        {
+          name: "examineStatus",
+          prop: "examineStatus",
+          lable: "审核状态",
+          widht: 160,
+        },
+      ],
+
+      tabs: [
+        {
+          label: "",
+          text: "全部",
+        },
+        {
+          label: "1",
+          text: "已保存",
+        },
+        {
+          label: "2",
+          text: "待审核",
+        },
+        {
+          label: "3",
+          text: "审核通过",
+        },
+        {
+          label: "4",
+          text: "审核驳回",
+        },
+      ],
+      statusList: {
+        SAVE: "保存",
+        WAIT: "待审核",
+        OK: "通过",
+        FAIL: "不通过",
+        CLOSE: "已关闭",
+      },
+    };
+  },
+  methods: {
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        ...this.screenForm,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+    handleExport() {
+      let screenData = {
+        ...this.screenForm
+      };
+      downloadFiles("/retail/export", screenData);
+    },
+  },
+};
+</script>
+<style scoped></style> -->
+<template>
+  <div class="app-container">
+    <div
+      v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
+    >
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form
+          ref="screenForm"
+          :model="screenForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="status" label-width="0">
+                <el-radio-group
+                  v-model="screenForm.status"
+                  size="medium"
+                  @change="getList()"
+                >
+                  <el-radio-button label="">全部</el-radio-button>
+                  <el-radio-button
+                    v-for="(item, index) in statusList"
+                    :key="index"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio-button
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNum">
+                <el-input
+                  v-model="screenForm.orderNum"
+                  placeholder="请输入订单号"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售政策编号" prop="policyCode">
+                <el-input
+                  v-model="screenForm.policyCode"
+                  placeholder="请输入销售政策编号"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售政策说明" prop="policyRemark">
+                <el-input
+                  v-model="screenForm.policyRemark"
+                  placeholder="请输入销售政策说明"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商" prop="jxsName">
+                <el-input
+                  v-model="screenForm.jxsName"
+                  placeholder="请输入经销商"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="制表人" prop="zbMan">
+                <el-input
+                  v-model="screenForm.zbMan"
+                  placeholder="请输入制表人"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="审核人" prop="shMan">
+                <el-input
+                  v-model="screenForm.shMan"
+                  placeholder="请输入审核人"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm"
+                  >清空</el-button
+                >
+                <el-button size="small" type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              @click="toForm()"
+              >新增</el-button
+            >
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'retail/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="订单号"
+              prop="id"
+              min-width="180"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="订单日期"
+              prop="theTime"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.theTime | dateToDayFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="销售类型"
+              prop="saleTypeName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="货品名称"
+              prop="materialName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="规格型号"
+              prop="specification"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="计量单位"
+              prop="unit"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否直调"
+              prop="isDirectTransfer"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.isDirectTransfer ? "是" : "否" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="总数量"
+              prop="totalQty"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="直调数量"
+              prop="directTransferQty"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="出库数量"
+              prop="aaa"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单价"
+              prop="price"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="金额"
+              prop="totalAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利使用比例"
+              prop="rebateRate"
+              min-width="110"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利"
+              prop="rebateAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制表人"
+              prop="createName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制表日期"
+              prop="createTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核人"
+              prop="examineName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核日期"
+              prop="examineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核状态"
+              prop="examineStatus"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.examineStatus | statusFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              width="220"
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  @click="toForm(scope.row)"
+                  v-if="scope.row.examineStatus === 'SAVE'"
+                  >编辑</el-button
+                >
+                <el-button
+                  type="text"
+                  @click="toExamine(scope.row)"
+                  v-if="scope.row.examineStatus === 'WAIT'"
+                  >审批</el-button
+                >
+                <el-button type="text" @click="toReturn(scope.row)"
+                  >退订</el-button
+                >
+                <el-button type="text" @click="toDetail(scope.row)"
+                  >详情</el-button
+                >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定提审吗?"
+                  @onConfirm="handleSubmit(scope.row.id)"
+                  v-if="scope.row.examineStatus === 'SAVE'"
+                >
+                  <el-button slot="reference" type="text">提审</el-button>
+                </el-popconfirm>
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定关闭吗?"
+                  @onConfirm="handleClose(scope.row.id)"
+                  v-if="!scope.row.closeTime"
+                >
+                  <el-button slot="reference" type="text">关闭</el-button>
+                </el-popconfirm>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <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>
+      </div>
+    </div>
+
+    <RetailDetail
+      :listItem="queryItem"
+      v-if="isShowDetail"
+      @backListFormDetail="backList"
+    />
+    <RetailForm
+      :listItem="queryItem"
+      v-if="isShowForm"
+      @backListFormDetail="backList"
+    />
+    <RetailExamine
+      :listItem="queryItem"
+      v-if="isShowExamine"
+      @backListFormDetail="backList"
+    />
+    <RetailReturn
+      :listItem="queryItem"
+      v-if="isShowReturn"
+      @backListFormDetail="backList"
+    />
+  </div>
+</template>
+
+<script>
+import { getList, closeData, submitData } from "@/api/supply/retail";
+import RetailDetail from "@/views/supply/retail/components/retail_detail";
+import RetailForm from "@/views/supply/retail/components/retail_form";
+import RetailExamine from "@/views/supply/retail/components/retail_examine";
+import RetailReturn from "@/views/supply/retail/components/retail_return";
+
+let that;
+export default {
+  components: {
+    RetailDetail,
+    RetailForm,
+    RetailExamine,
+    RetailReturn,
+  },
+  filters: {
+    statusFilter(val) {
+      let obj = that.statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: {
+        // 筛选表单数据
+        orderNum: "",
+        policyCode: "",
+        policyRemark: "",
+        jxsName: "",
+        date: "",
+        zbMan: "",
+        shMan: "",
+        status: "",
+      },
+      statusList: [
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        { label: "审核驳回", value: "FAIL" },
+      ],
+
+      queryItem: {},
+      isShowDetail: false,
+      isShowForm: false,
+      isShowExamine: false,
+      isShowReturn: false,
+    };
+  },
+
+  computed: {
+    exParams() {
+      return {
+        examineStatus: this.screenForm.status,
+        id: this.screenForm.orderNum,
+        policyCode: this.screenForm.policyCode,
+        policyRemark: this.screenForm.policyRemark,
+        customer: this.screenForm.jxsName,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        createBy: this.screenForm.zbMan,
+        examineBy: this.screenForm.shMan,
+        type: 2, // 1:普通零售单,2:政策零售单
+      };
+    },
+  },
+
+  beforeCreate() {
+    that = this;
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true;
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
+        id: this.screenForm.orderNum,
+        policyCode: this.screenForm.policyCode,
+        policyRemark: this.screenForm.policyRemark,
+        customer: this.screenForm.jxsName,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        createBy: this.screenForm.zbMan,
+        examineBy: this.screenForm.shMan,
+        type: 2, // 1:普通零售单,2:政策零售单
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowForm = true;
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+      this.isShowDetail = true;
+    },
+
+    // 进入审批
+    toExamine(item) {
+      this.queryItem = item;
+      this.isShowExamine = true;
+    },
+
+    // 进入退订
+    toReturn(item) {
+      this.queryItem = item;
+      this.isShowReturn = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowDetail = false;
+      this.isShowForm = false;
+      this.isShowExamine = false;
+      this.isShowReturn = false;
+    },
+
+    // 关闭
+    handleClose(id) {
+      closeData({ id }).then((res) => {
+        this.$successMsg();
+        this.getList();
+      });
+    },
+
+    // 提审
+    handleSubmit(id) {
+      submitData({ id }).then((res) => {
+        this.$successMsg();
+        this.getList();
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 53 - 0
src/views/supply/policy/components/record.vue

@@ -0,0 +1,53 @@
+<!--
+ * @Author: git config user.name
+ * @Date: 2022-06-21 10:25:10
+ * @LastEditors: howie
+ * @LastEditTime: 2022-06-21 11:09:29
+ * @FilePath: \supply-front\src\views\supply\policy\components\record.vue
+ * @Description:操作记录页面
+ *
+ * Copyright (c) 2022 , All Rights Reserved.
+-->
+<template>
+  <div>
+    <my-table-info />
+  </div>
+</template>
+
+<script>
+import myTableInfo from "./common/table_info";
+export default {
+  data() {
+    return {
+      dataList: [],
+      columns: [
+        {
+          prop: "saleCode",
+          lable: "操作类型",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "操作人",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "所属单位",
+          widht: 160,
+        },
+        {
+          prop: "saleCode",
+          lable: "操作时间",
+          widht: 160,
+        },
+      ],
+    };
+  },
+  components: {
+    myTableInfo,
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 308 - 0
src/views/supply/policy/components/retail_detail.vue

@@ -0,0 +1,308 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">提货进度</div>
+    </div>
+    <div class="progress-container">
+      <el-progress :text-inside="true" :stroke-width="26" :percentage="progress || 0"></el-progress>
+    </div>
+
+    <div class="main-title">
+      <div class="title">订单信息</div>
+    </div>
+
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">订单号</div>
+          <div class="value">{{detailData.id}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期</div>
+          <div class="value">{{detailData.theTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+        </el-col>
+        <el-col :span="16" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.remark}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">业务员</div>
+          <div class="value">{{detailData.serviceName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.createName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单日期</div>
+          <div class="value">{{detailData.createTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审核人</div>
+          <div class="value">{{detailData.examineName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审核日期</div>
+          <div class="value">{{detailData.examineTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">关闭人</div>
+          <div class="value">{{detailData.closeName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">关闭日期</div>
+          <div class="value">{{detailData.closeTime}}</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="格力折扣" prop="deductAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.isDirectTransfer ? '是':'否'}}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
+
+    <div v-if="isExamine">
+      <div class="main-title">
+        <div class="title">审批记录</div>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="12" class="item">
+            <div class="label">审批人</div>
+            <div class="value">{{detailData.examineName}}</div>
+          </el-col>
+          <el-col :span="12" class="item">
+            <div class="label">审批结果</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">{{detailData.examineRemark}}</div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="openDeliverDialog">直调发货</el-button>
+        <el-button @click="goBack">关 闭</el-button>
+      </div>
+    </div>
+
+    <el-dialog title="直调发货" :visible.sync="isShowDeliverDialog" width="80%">
+      <el-form ref="deliverForm" :model="deliverForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="工程订单" prop="orderNum">
+              <el-input v-model="deliverForm.orderNum" placeholder="请输入工程订单"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8" style="height: 51px;">
+            <el-form-item label="发货日期" prop="date">
+              <el-date-picker
+                v-model="deliverForm.date"
+                type="date"
+                value-format="yyyy-MM-dd"
+                style="width: 100%;"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="发货仓库" prop="warehouse">
+              <el-select v-model="deliverForm.warehouse" placeholder="请选择发货仓库">
+                <el-option
+                  v-for="item in warehouseList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="格力折扣" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="现金钱包" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.isDirectTransfer ? '是':'否'}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="原订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="税率" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDeliverDialog">取 消</el-button>
+        <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getDetail } from "@/api/supply/retail";
+
+export default {
+  name: 'RetailDetail',
+  componentName: 'RetailDetail',
+  props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      detailData: {},
+
+      isShowDeliverDialog: false,
+      deliverForm: {
+        orderNum: '',
+        date: '',
+      },
+      warehouseList: [],
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+    isExamine() {
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
+    },
+    progress() {
+      if(this.detailData.totalQty == 0) return 0;
+      return (this.detailData.takeQty * 100) / (this.detailData.totalQty * 100);
+    }
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    // 打开 直调发货
+    openDeliverDialog() {
+      this.isShowDeliverDialog = true;
+    },
+
+    // 关闭 直调发货
+    closeDeliverDialog() {
+      this.isShowDeliverDialog = false;
+    },
+
+    // 提交 直调发货
+    submitDeliverForm() {
+
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+  .progress-container {
+    display: flex;
+    .el-progress {
+      width: 500px;
+    }
+  }
+</style>

+ 213 - 0
src/views/supply/policy/components/retail_examine.vue

@@ -0,0 +1,213 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="审批"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">订单信息</div>
+    </div>
+
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">订单号</div>
+          <div class="value">{{detailData.id}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期</div>
+          <div class="value">{{detailData.theTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+        </el-col>
+        <el-col :span="16" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.remark}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">业务员</div>
+          <div class="value">{{detailData.serviceName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.createName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审核人</div>
+          <div class="value">{{detailData.examineName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">关闭人</div>
+          <div class="value">{{detailData.closeName}}</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="格力折扣" prop="deductAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.isDirectTransfer ? '是':'否'}}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
+
+    <div class="main-title">
+      <div class="title">审批信息</div>
+    </div> 
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">{{userName}}</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group v-model="mainForm.status">
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+      </el-row>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-button @click="goBack">关 闭</el-button>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getDetail, examineData } from "@/api/supply/retail";
+
+export default {
+  name: 'RetailExamine',
+  componentName: 'RetailExamine',
+  props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      detailData: {},
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+
+      formLoading: false,
+      mainForm: {
+        status: true,
+        remark: '',
+      }
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    // 提交审批
+    clickSubmitForm() {
+      this.formLoading = true;
+      examineData({
+        id: this.listItem.id,
+        examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
+        examineRemark: this.mainForm.remark,
+      }).then(res => {
+        this.$successMsg('审批成功');
+        this.goBack();
+        this.$parent.getList();
+      }).finally(res => {
+        this.formLoading = false;
+      })
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 979 - 0
src/views/supply/policy/components/retail_form.vue

@@ -0,0 +1,979 @@
+<template>
+  <div class="detail-container">
+    <el-page-header
+      @back="goBack"
+      :content="listItem ? '编辑' : '新增'"
+    ></el-page-header>
+
+    <div class="main-title">
+      <div class="title">订单信息</div>
+    </div>
+
+    <el-form
+      ref="mainForm"
+      :model="mainForm"
+      :rules="mainFormRules"
+      label-width="120px"
+      size="small"
+      label-position="right"
+    >
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="订单号" prop="id">
+            <el-input v-model="mainForm.id" placeholder="订单号"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
+          <el-form-item label="单据日期" prop="date">
+            <el-date-picker
+              v-model="mainForm.date"
+              type="date"
+              value-format="yyyy-MM-dd"
+              style="width: 100%"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="产品大类" prop="type">
+            <el-select
+              v-model="mainForm.type"
+              placeholder="选择产品大类"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in typeList"
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col
+          :xs="24"
+          :sm="12"
+          :lg="8"
+          v-if="!listItem"
+          @click.native="handleShow"
+        >
+          <el-form-item label="销售政策编号" prop="policyCode"   >
+            <el-input
+
+              v-model="mainForm.policyCode"
+              placeholder="销售政策编号"
+              readonly
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" v-else>
+          <el-form-item label="销售政策编号" prop="policyCode">
+            <el-input
+              v-model="mainForm.policyCode"
+              placeholder="销售政策编号"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售政策" prop="id">
+            <el-select
+              v-model="mainForm.ztype"
+              placeholder="选择销售政策"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in ztypeList"
+                :key="item.id"
+                :label="item.saleName"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售政策说明" prop="policyRemark">
+            <el-input
+              v-model="mainForm.policyRemark"
+              placeholder="销售政策说明"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="业务员" prop="serviceName">
+            <el-input
+              v-model="mainForm.serviceName"
+              placeholder="订单号"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="16" :lg="16">
+          <el-form-item label="备注" prop="remark">
+            <el-input
+              v-model="mainForm.remark"
+              placeholder="请输入备注"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+      <div v-if="!listItem">
+        <el-select
+          v-model="warehouseValue"
+          placeholder="请选择发货仓库"
+          size="small"
+          style="margin-right: 10px"
+        >
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="(item, index) in warehouseList"
+            :key="index"
+          ></el-option>
+        </el-select>
+        <el-button
+          type="primary"
+          size="small"
+          icon="el-icon-search"
+          @click="checkStock"
+          >检查库存</el-button
+        >
+        <el-divider direction="vertical"></el-divider>
+      </div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table
+        :data="goodsList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+        max-height="400"
+      >
+        <el-table-column
+          align="center"
+          label="序号"
+          type="index"
+          width="50"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="存货编码"
+          prop="materialCode"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="规格型号"
+          prop="specification"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="数量"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.qty" size="small"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="订单金额"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{ scope.row.price * scope.row.qty }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="返利钱包"
+          prop="customerWalletId2"
+          min-width="160"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.customerWalletId2"
+              placeholder="选择返利钱包"
+              size="small"
+              @change="changeWallet(scope.$index)"
+            >
+              <el-option label="不使用" value=""></el-option>
+              <el-option
+                v-for="item in flWalletList"
+                :key="item.customerWalletId"
+                :label="item.name"
+                :value="item.customerWalletId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="返利金额"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{
+              (scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) /
+              100
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="格力折扣"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{ scope.row.qty * scope.row.discAmount }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="现金钱包"
+          prop="customerWalletId"
+          min-width="160"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.customerWalletId"
+              placeholder="选择现金钱包"
+              size="small"
+            >
+              <el-option label="不使用" value=""></el-option>
+              <el-option
+                v-for="item in xjWalletList"
+                :key="item.customerWalletId"
+                :label="item.name"
+                :value="item.customerWalletId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="实付金额"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{
+              (scope.row.price * scope.row.qty * 100 -
+                ((scope.row.price *
+                  scope.row.qty *
+                  (scope.row.rebateRate * 100)) /
+                  100) *
+                  100 -
+                ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) /
+              100
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+        >
+          <template slot-scope="scope">
+            <el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+        >
+          <template slot-scope="scope">
+            <el-input
+              v-model="scope.row.directTransferQty"
+              size="small"
+            ></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="备注"
+          prop="remark"
+          min-width="160"
+        >
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.remark" size="small"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="总仓库"
+          prop="status1"
+          min-width="100"
+          show-overflow-tooltip
+          v-if="!listItem"
+        >
+          <template slot-scope="scope">
+            <el-tag :type="scope.row.status1 | statusTagFilter">{{
+              scope.row.status1 | statusFilter
+            }}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="仓库状态"
+          prop="status2"
+          min-width="100"
+          show-overflow-tooltip
+          v-if="!listItem"
+        >
+          <template slot-scope="scope">
+            <el-tag :type="scope.row.status2 | statusTagFilter">{{
+              scope.row.status2 | statusFilter
+            }}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="操作" width="100" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteItem(scope.$index)"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm">保 存</el-button>
+        <el-popconfirm
+          title="确定关闭吗?"
+          @onConfirm="goBack"
+          style="margin-left: 10px"
+        >
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+    <el-dialog title="添加产品" :visible.sync="isShowDialog" width="80%">
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="type">
+              <el-select
+                v-model="screenForm.type"
+                placeholder="选择品类"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in typeList"
+                  :key="item.dictCode"
+                  :label="item.dictValue"
+                  :value="item.dictCode"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="salesType">
+              <el-select
+                v-model="screenForm.salesType"
+                placeholder="选择销售类型"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in salesTypeList"
+                  :key="item.id"
+                  :label="item.saleName"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proNum">
+              <el-input
+                v-model="screenForm.proNum"
+                placeholder="请输入产品编码"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proName">
+              <el-input
+                v-model="screenForm.proName"
+                placeholder="请输入产品名称"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proModel">
+              <el-input
+                v-model="screenForm.proModel"
+                placeholder="请输入产品型号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="price1" style="display: flex">
+              <el-input
+                v-model="screenForm.price1"
+                placeholder="请输入价格"
+                style="width: 46%"
+              ></el-input>
+              <span> - </span>
+              <el-input
+                v-model="screenForm.price2"
+                placeholder="请输入价格"
+                style="width: 46%"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="12" :lg="12" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">取 消</el-button>
+        <el-button type="primary" @click="submitAddGoods">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getDetail,
+  addData,
+  editData,
+  getSalesTypeList,
+  getGoodsList,
+  getWalletList,
+  getWarehouseList,
+  checkStock,
+  typeList,
+} from "@/api/supply/retail";
+import { getDictList } from "@/api/common";
+import { findElem } from "@/utils/util";
+
+export default {
+  name: "RetailForm",
+  componentName: "RetailForm",
+  props: ["listItem"],
+  filters: {
+    statusFilter(val) {
+      if (val === "") return "未检查";
+      const MAP = {
+        0: "库存不足",
+        1: "库存充足",
+      };
+      return MAP[val];
+    },
+    statusTagFilter(val) {
+      if (val === "") return "info";
+      const MAP = {
+        0: "danger",
+        1: "success",
+      };
+      return MAP[val];
+    },
+  },
+  data() {
+    return {
+      mainForm: {
+        id: "",
+        date: "",
+        type: "",
+        ztype: "",
+        remark: "",
+        policyCode: "",
+        policyRemark: "",
+      },
+      mainFormRules: {
+        date: [
+          { required: true, message: "请选择单据日期", trigger: "change" },
+        ],
+        type: [{ required: true, message: "请选择品类", trigger: "change" }],
+      },
+      goodsList: [],
+
+      warehouseList: [],
+      warehouseValue: "",
+      isShowDialog: false,
+      screenForm: {
+        type: "",
+        salesType: "",
+        proNum: "",
+        proName: "",
+        proModel: "",
+        price1: "",
+        price2: "",
+      },
+      currentPage: 1,
+      listTotal: 0,
+      salesTypeList: [],
+      typeList: [],
+      ztypeList: [],
+      leftGoodsList: [],
+      rightGoodsList: [],
+
+      leftSelection: [],
+      rightSelection: [],
+
+      xjWalletList: [],
+      flWalletList: [],
+    };
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar;
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened,
+      };
+    },
+  },
+
+  created() {
+    this.getDictList();
+    this.getWalletList();
+    this.getWarehouseList();
+    this.getTypeList();
+    if (this.listItem) {
+      this.getDetail();
+    }
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit("backListFormDetail");
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({ id: this.listItem.id }).then((res) => {
+        let data = res.data;
+        this.mainForm.date = data.theTime;
+        this.mainForm.type = data.mainId;
+        this.mainForm.remark = data.remark;
+        data.retailOrderItemList.forEach((item) => {
+          item.status1 = "";
+          item.status2 = "";
+        });
+        this.goodsList = data.retailOrderItemList;
+      });
+    },
+    getTypeList() {
+      const params = {
+        pageNum: 1,
+        pageSize: -1,
+        saleCode: "",
+        saleName: "",
+        status: "",
+      };
+      typeList(params).then((res) => {
+        this.ztypeList = res.data.records;
+      });
+    },
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      });
+    },
+    handleShow(){
+      this.isShowDialog = true
+      console.log(11111);
+    },
+    // 获取钱包列表
+    getWalletList() {
+      getWalletList({
+        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
+        type: "COMMONLY",
+      }).then((res) => {
+        this.xjWalletList = res.data;
+      });
+      getWalletList({
+        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
+        type: "REBATE",
+      }).then((res) => {
+        this.flWalletList = res.data;
+      });
+    },
+
+    // 获取销售类型列表
+    getSalesTypeList() {
+      getSalesTypeList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then((res) => {
+        this.salesTypeList = res.data.records;
+      });
+    },
+
+    getDictList() {
+      getDictList({ sysDictEnum: "PRODUCT_TYPE" }).then((res) => {
+        this.typeList = res.data;
+      });
+    },
+
+    // 获取商品列表
+    getGoodsList() {
+      getGoodsList({
+        pageNum: this.currentPage,
+        pageSize: 10,
+        mainId: this.screenForm.type,
+        saleId: this.screenForm.salesType,
+        materialCode: this.screenForm.proNum,
+        materialName: this.screenForm.proName,
+        specification: this.screenForm.proModel,
+        price1: this.screenForm.price1,
+        price2: this.screenForm.price2,
+      }).then((res) => {
+        let oldGoodsList = this.goodsList;
+        let newGoodsList = res.data.records;
+        for (let i = 0; i < oldGoodsList.length; i++) {
+          let oldItem = oldGoodsList[i];
+          for (let j = 0; j < newGoodsList.length; j++) {
+            let newItem = newGoodsList[j];
+            if (newItem.materialId === oldItem.materialId) {
+              newGoodsList[j].selected = true;
+              break;
+            }
+          }
+        }
+        res.data.records.forEach((item) => {
+          item.materialName = item.name;
+          item.materialCode = item.number;
+          item.saleTypeName = item.saleName;
+          item.unit = item.baseUnit;
+          item.price = item.batchPrice;
+          item.tax = item.taxRate;
+          item.isDirectTransfer = false;
+          item.directTransferQty = "";
+          item.status1 = "";
+          item.status2 = "";
+          item.rebateAmount = "";
+          item.rebateRate = "";
+          item.productPriceId = item.id;
+        });
+        this.leftGoodsList = res.data.records;
+        this.listTotal = res.data.total;
+      });
+    },
+
+    // 查询重复值并禁选
+    checkboxSelect(row, rowIndex) {
+      if (row.selected) {
+        return false; // 禁用
+      } else {
+        return true; // 不禁用
+      }
+    },
+
+    // 点击 选择商品
+    openDialog() {
+      this.getSalesTypeList();
+      this.getGoodsList();
+      this.isShowDialog = true;
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getGoodsList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getGoodsList();
+    },
+
+    // 更改列表当前页
+    handleTableCurrentChange(val) {
+      this.currentPage = val;
+      this.getGoodsList();
+    },
+
+    // 关闭 弹窗
+    closeDialog() {
+      this.isShowDialog = false;
+    },
+
+    // 左侧列表选择
+    leftSelectionChange(val) {
+      this.leftSelection = val;
+    },
+
+    // 右侧列表选择
+    rightSelectionChange(val) {
+      this.rightSelection = val;
+    },
+
+    // 数组去重
+    delRepeat(arr1, arr2) {
+      let allArr = arr1.concat(arr2); // 两个数组对象合并
+      let newArr = []; // 存放去重后数据的新数组
+      for (let i = 0; i < allArr.length; i++) {
+        // 循环allArr数组对象的内容
+        let flag = true; // 建立标记,判断数据是否重复,true为不重复
+        for (let j = 0; j < newArr.length; j++) {
+          // 循环新数组的内容
+          if (allArr[i].materialId == newArr[j].materialId) {
+            // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+            flag = false;
+          }
+        }
+        if (flag) {
+          // 判断是否重复
+          newArr.push(allArr[i]); // 不重复的放入新数组。  新数组的内容会继续进行上边的循环。
+        }
+      }
+      return newArr;
+    },
+
+    // 全部添加
+    addAllGoods() {
+      this.rightGoodsList = this.delRepeat(
+        this.leftGoodsList,
+        this.rightGoodsList
+      );
+    },
+
+    // 添加
+    addGoods() {
+      this.rightGoodsList = this.delRepeat(
+        this.leftSelection,
+        this.rightGoodsList
+      );
+    },
+
+    // 删除
+    deleteGoods() {
+      let rightGoodsList = this.rightGoodsList;
+      let rightSelection = this.rightSelection;
+      for (let i = 0; i < rightGoodsList.length; i++) {
+        for (let j = 0; j < rightSelection.length; j++) {
+          if (rightSelection[j].materialId == rightGoodsList[i].materialId) {
+            this.rightGoodsList.splice(i, 1);
+          }
+        }
+      }
+    },
+
+    // 全部删除
+    deleteAllGoods() {
+      this.rightGoodsList = [];
+    },
+
+    // 确定 添加产品
+    submitAddGoods() {
+      this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
+      this.isShowDialog = false;
+      this.leftGoodsList = [];
+      this.rightGoodsList = [];
+    },
+
+    // 删除产品
+    deleteItem(index) {
+      this.goodsList.splice(index, 1);
+    },
+
+    // 修改返利钱包
+    changeWallet(index) {
+      if (this.goodsList[index].customerWalletId2) {
+        let obj = this.flWalletList.find(
+          (o) => o.customerWalletId == this.goodsList[index].customerWalletId2
+        );
+        this.goodsList[index].rebateRate = obj.rebateRate;
+      } else {
+        this.goodsList[index].rebateRate = "";
+      }
+    },
+
+    // 检查库存
+    checkStock() {
+      if (!this.warehouseValue) {
+        return this.$errorMsg("请选择仓库");
+      }
+      if (!this.goodsList) {
+        return this.$errorMsg("请添加货品");
+      }
+      let ids = [];
+      this.goodsList.forEach((item) => {
+        ids.push(item.materialId);
+      });
+      checkStock({
+        correspondId: this.warehouseValue,
+        materialId: ids.join(","),
+      }).then((res) => {
+        if (res.data) {
+          this.goodsList.forEach((item, index) => {
+            item.status1 = res.data[index].allStockStatus;
+            item.status2 = res.data[index].stockStatus;
+          });
+        }
+      });
+    },
+
+    // 保存
+    clickSubmitForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          for (let i = 0; i < this.goodsList.length; i++) {
+            if (!this.goodsList[i].customerWalletId) {
+              this.$errorMsg("请选择现金钱包");
+              return;
+            }
+          }
+
+          let mainName =
+            this.typeList[
+              findElem(this.typeList, "dictCode", this.mainForm.type)
+            ].dictValue;
+          let params = {
+            theTime: this.mainForm.date + " 00:00:00",
+            mainId: this.mainForm.type,
+            mainName,
+            remark: this.mainForm.remark,
+            type: 1, // 1:普通零售单,2:政策零售单
+            retailOrderItemList: this.goodsList,
+          };
+          if (this.listItem) {
+            params.id = this.listItem.id;
+            editData(params).then((res) => {
+              this.$successMsg("编辑成功");
+              this.goBack();
+              this.$parent.getList();
+            });
+          } else {
+            addData(params).then((res) => {
+              this.$successMsg("添加成功");
+              this.goBack();
+              this.$parent.getList();
+            });
+          }
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
+  }
+}
+.tables {
+  display: flex;
+  margin-top: 10px;
+  .table {
+    width: 45%;
+  }
+  .buttons {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    padding: 0 10px;
+    button {
+      margin: 0;
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 223 - 0
src/views/supply/policy/components/retail_return.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="退订"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">订单信息</div>
+    </div>
+
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">订单号</div>
+          <div class="value">{{detailData.id}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期</div>
+          <div class="value">{{detailData.theTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+        </el-col>
+        <el-col :span="16" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.remark}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">业务员</div>
+          <div class="value">{{detailData.serviceName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.createName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审核人</div>
+          <div class="value">{{detailData.examineName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">关闭人</div>
+          <div class="value">{{detailData.closeName}}</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="格力折扣" prop="deductAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.isDirectTransfer ? '是':'否'}}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
+
+    <div class="main-title">
+      <div class="title">退订信息</div>
+    </div> 
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">操作人</div>
+          <div class="value">{{userName}}</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">退订日期</div>
+          <div class="value">{{nowDate}}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">退订说明</div>
+          <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+      </el-row>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-button @click="goBack">关 闭</el-button>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getDetail, returnData } from "@/api/supply/retail";
+
+export default {
+  name: 'RetailReturn',
+  componentName: 'RetailReturn',
+  props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      detailData: {},
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+
+      formLoading: false,
+      mainForm: {
+        status: true,
+        remark: '',
+      }
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+    nowDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+          month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+          strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    }
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    // 提交审批
+    clickSubmitForm() {
+      this.formLoading = true;
+      returnData({
+        id: this.listItem.id,
+        examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
+        examineRemark: this.mainForm.remark,
+      }).then(res => {
+        this.$successMsg('退订成功');
+        this.goBack();
+        this.$parent.getList();
+      }).finally(res => {
+        this.formLoading = false;
+      })
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 981 - 6
src/views/supply/policy/policy_list.vue

@@ -1,15 +1,990 @@
+<!-- <template>
+  <div class="app-container">
+    <div class="screen-container">
+      <el-radio-group
+        v-model="screenForm.examineStatus"
+        style="margin-bottom: 30px"
+        size="small"
+      >
+        <el-radio-button
+          v-for="(item, index) in tabs"
+          :key="index"
+          :label="item.label"
+          >{{ item.text }}</el-radio-button
+        >
+      </el-radio-group>
+      <el-form
+        ref="screenForm"
+        :model="screenForm"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="id">
+              <el-input
+                v-model="screenForm.id"
+                placeholder="订单号"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="policyCode">
+              <el-input
+                v-model="screenForm.policyCode"
+                placeholder="销售政策编号"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="policyRemark">
+              <el-input
+                v-model="screenForm.policyRemark"
+                placeholder="销售政策说明"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="customer">
+              <el-input
+                v-model="screenForm.customer"
+                placeholder="经销商"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="startTime">
+              <el-date-picker
+                v-model="screenForm.startTime"
+                type="datetime"
+                placeholder="订单日期"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="createBy">
+              <el-input
+                v-model="screenForm.createBy"
+                placeholder="制表人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6">
+            <el-form-item prop="examineBy">
+              <el-input
+                v-model="screenForm.examineBy"
+                placeholder="审核人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :ms="6" :lg="6" class="tr">
+            <el-form-item>
+              <el-button type="primary" size="small" @click="submitScreenForm"
+                >查询</el-button
+              >
+              <el-button type="primary" size="small" @click="resetScreenForm"
+                >重置</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div class="btn-group">
+      <el-button type="primary" size="small" @click="handleExport"
+        >导出</el-button
+      >
+
+    </div>
+    <div class="mymain-container">
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column type="selection" width="55" align="center">
+        </el-table-column>
+        <template v-for="col in columns">
+          <el-table-column
+            v-if="col.name == 'isDirectTransfer'"
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag
+                type="success"
+                size="small"
+                v-if="scope.row.isDirectTransfer"
+                >是</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>否</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-else-if="col.name == 'examineStatus'"
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-tag type="success" size="small">{{
+                status[scope.row.examineStatus]
+              }}</el-tag>
+              ]
+            </template>
+          </el-table-column>
+          <el-table-column
+            v-else
+            align="center"
+            :label="col.lable"
+            :prop="col.prop"
+            :min-width="col.widht"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </template>
+        <el-table-column
+          align="center"
+          fixed="right"
+          label="操作"
+          min-width="160"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >审批</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >退订</el-button
+            >
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >详情</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="fr">
+        <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>
+    </div>
+  </div>
+</template>
+<script>
+import Mixin from "@/mixin/index";
+import { getList } from "@/api/supply/retail";
+import { downloadFiles } from "@/utils/util";
+
+export default {
+  mixins: [Mixin],
+  data() {
+    return {
+      type: 0, // 0,1
+      screenForm: {
+        id: "",
+        policyCode: "",
+        policyRemark: "",
+        customer: "",
+        startTime: "",
+        createBy: "",
+        examineBy: "",
+        examineStatus: "",
+        type: 2,
+      },
+      dialogForm: {},
+      dataList: [
+        {
+          date: "2016-05-02",
+          name: "王小虎",
+          label: "姓名",
+          address: "上海市普陀区金沙江路 1518 弄",
+        },
+      ],
+      columns: [
+        {
+          prop: "id",
+          lable: "订单号",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "订单日期",
+          widht: 160,
+        },
+        {
+          prop: "policyCode",
+          lable: "销售政策编号",
+          widht: 160,
+        },
+        {
+          prop: "policyRemark",
+          lable: "销售政策说明",
+          widht: 160,
+        },
+        {
+          prop: "customerName",
+          lable: "经销商",
+          widht: 160,
+        },
+        {
+          prop: "materialId",
+          lable: "产品编号",
+          widht: 160,
+        },
+        {
+          prop: "materialName",
+          lable: "产品名称",
+          widht: 160,
+        },
+        {
+          prop: "specification",
+          lable: "规格型号",
+          widht: 160,
+        },
+        {
+          prop: "totalQty",
+          lable: "总数量",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "单价",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "返利类型",
+          widht: 160,
+        },
+        {
+          prop: "price",
+          lable: "返利",
+          widht: 160,
+        },
+        {
+          name: "isDirectTransfer",
+          prop: "isDirectTransfer",
+          lable: "直调",
+          widht: 160,
+        },
+        {
+          prop: "updateTime",
+          lable: "直调数量",
+          widht: 160,
+        },
+        {
+          prop: "directTransferQty",
+          lable: "出库数量",
+          widht: 160,
+        },
+        {
+          prop: "serviceName",
+          lable: "业务员",
+          widht: 160,
+        },
+        {
+          prop: "createBy",
+          lable: "制表人",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "制表日期",
+          widht: 160,
+        },
+        {
+          prop: "examineBy",
+          lable: "审核人",
+          widht: 160,
+        },
+        {
+          prop: "examineTime",
+          lable: "审核日期",
+          widht: 160,
+        },
+        {
+          name: "examineStatus",
+          prop: "examineStatus",
+          lable: "审核状态",
+          widht: 160,
+        },
+      ],
+
+      tabs: [
+        {
+          label: "",
+          text: "全部",
+        },
+        {
+          label: "1",
+          text: "已保存",
+        },
+        {
+          label: "2",
+          text: "待审核",
+        },
+        {
+          label: "3",
+          text: "审核通过",
+        },
+        {
+          label: "4",
+          text: "审核驳回",
+        },
+      ],
+      statusList: {
+        SAVE: "保存",
+        WAIT: "待审核",
+        OK: "通过",
+        FAIL: "不通过",
+        CLOSE: "已关闭",
+      },
+    };
+  },
+  methods: {
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        ...this.screenForm,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+    handleExport() {
+      let screenData = {
+        ...this.screenForm
+      };
+      downloadFiles("/retail/export", screenData);
+    },
+  },
+};
+</script>
+<style scoped></style> -->
 <template>
-  <div>
+  <div class="app-container">
+    <div
+      v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
+    >
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form
+          ref="screenForm"
+          :model="screenForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="status" label-width="0">
+                <el-radio-group
+                  v-model="screenForm.status"
+                  size="medium"
+                  @change="getList()"
+                >
+                  <el-radio-button label="">全部</el-radio-button>
+                  <el-radio-button
+                    v-for="(item, index) in statusList"
+                    :key="index"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio-button
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNum">
+                <el-input
+                  v-model="screenForm.orderNum"
+                  placeholder="请输入订单号"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售政策编号" prop="policyCode">
+                <el-input
+                  v-model="screenForm.policyCode"
+                  placeholder="请输入销售政策编号"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售政策说明" prop="policyRemark">
+                <el-input
+                  v-model="screenForm.policyRemark"
+                  placeholder="请输入销售政策说明"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商" prop="jxsName">
+                <el-input
+                  v-model="screenForm.jxsName"
+                  placeholder="请输入经销商"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="制表人" prop="zbMan">
+                <el-input
+                  v-model="screenForm.zbMan"
+                  placeholder="请输入制表人"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="审核人" prop="shMan">
+                <el-input
+                  v-model="screenForm.shMan"
+                  placeholder="请输入审核人"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm"
+                  >清空</el-button
+                >
+                <el-button size="small" type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              @click="toForm()"
+              >新增</el-button
+            >
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'retail/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="提货进度"
+              prop="thjd"
+              min-width="180"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-progress :percentage="scope.row.thjd || 0"></el-progress>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="订单号"
+              prop="id"
+              min-width="180"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="订单日期"
+              prop="theTime"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.theTime | dateToDayFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="销售政策编号"
+              prop="policyCode"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="销售政策说明"
+              prop="policyRemark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商"
+              prop="customerName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="产品编码"
+              prop="materialCode"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="产品名称"
+              prop="materialName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="规格型号"
+              prop="specification"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="计量单位"
+              prop="unit"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否直调"
+              prop="isDirectTransfer"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.isDirectTransfer ? "是" : "否" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="总数量"
+              prop="totalQty"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
 
+            <el-table-column
+              align="center"
+              label="单价"
+              prop="price"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="金额"
+              prop="totalAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利使用比例"
+              prop="rebateRate"
+              min-width="110"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利"
+              prop="rebateAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="直调数量"
+              prop="directTransferQty"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="出库数量"
+              prop="aaa"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="业务员"
+              prop="serviceName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制表人"
+              prop="createName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制表日期"
+              prop="createTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核人"
+              prop="examineName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核日期"
+              prop="examineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核状态"
+              prop="examineStatus"
+              min-width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.examineStatus | statusFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              width="220"
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <!-- <el-button
+                  type="text"
+                  @click="toForm(scope.row)"
+                  v-if="scope.row.examineStatus === 'SAVE'"
+                  >申请</el-button
+                > -->
+                <el-button type="text" @click="toForm(scope.row)"
+                  >编辑</el-button
+                >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定撤回?"
+                  @onConfirm="handleCancel(scope.row.id)"
+                >
+                  <el-button slot="reference" type="text">撤回</el-button>
+                </el-popconfirm>
+                <el-button     style="margin-left: 10px" type="text" @click="toDetail(scope.row)"
+                  >详情</el-button
+                >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定删除?"
+                  @onConfirm="handleDelete(scope.row.id)"
+                >
+                  <el-button slot="reference" type="text">删除</el-button>
+                </el-popconfirm>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <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>
+      </div>
+    </div>
+    <RetailDetail
+      :listItem="queryItem"
+      v-if="isShowDetail"
+      @backListFormDetail="backList"
+    />
+    <RetailForm
+      :listItem="queryItem"
+      v-if="isShowForm"
+      @backListFormDetail="backList"
+    />
+    <RetailExamine
+      :listItem="queryItem"
+      v-if="isShowExamine"
+      @backListFormDetail="backList"
+    />
+    <RetailReturn
+      :listItem="queryItem"
+      v-if="isShowReturn"
+      @backListFormDetail="backList"
+    />
   </div>
 </template>
 
 <script>
-  export default {
+import {
+  getList,
+  closeData,
+  submitData,
+  submitCancel,
+} from "@/api/supply/retail";
+import RetailDetail from "./components/retail_detail";
+import RetailForm from "./components/retail_form";
+import RetailExamine from "./components/retail_examine";
+import RetailReturn from "./components/retail_return";
 
-  }
-</script>
+let that;
+export default {
+  components: {
+    RetailDetail,
+    RetailForm,
+    RetailExamine,
+    RetailReturn,
+  },
+  filters: {
+    statusFilter(val) {
+      let obj = that.statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: {
+        // 筛选表单数据
+        orderNum: "",
+        policyCode: "",
+        policyRemark: "",
+        jxsName: "",
+        date: "",
+        zbMan: "",
+        shMan: "",
+        status: "",
+      },
+      statusList: [
+
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        { label: "审核驳回", value: "FAIL" },
+      ],
+      queryItem: {},
+      isShowDetail: false,
+      isShowForm: false,
+      isShowExamine: false,
+      isShowReturn: false,
+    };
+  },
+  computed: {
+    exParams() {
+      return {
+        examineStatus: this.screenForm.status,
+        id: this.screenForm.orderNum,
+        policyCode: this.screenForm.policyCode,
+        policyRemark: this.screenForm.policyRemark,
+        customer: this.screenForm.jxsName,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        createBy: this.screenForm.zbMan,
+        examineBy: this.screenForm.shMan,
+        type: 2, // 1:普通零售单,2:政策零售单
+      };
+    },
+  },
+
+  beforeCreate() {
+    that = this;
+  },
+
+  created() {
+    this.getList();
+  },
 
-<style lang="scss" scoped>
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true;
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
+        id: this.screenForm.orderNum,
+        policyCode: this.screenForm.policyCode,
+        policyRemark: this.screenForm.policyRemark,
+        customer: this.screenForm.jxsName,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        createBy: this.screenForm.zbMan,
+        examineBy: this.screenForm.shMan,
+        type: 1, // 1:普通零售单,2:政策零售单
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      console.log(item,99999);
+      this.isShowForm = true;
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+      this.isShowDetail = true;
+    },
+
+    // 进入审批
+    toExamine(item) {
+      this.queryItem = item;
+      this.isShowExamine = true;
+    },
+
+    // 进入退订
+    toReturn(item) {
+      this.queryItem = item;
+      this.isShowReturn = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowDetail = false;
+      this.isShowForm = false;
+      this.isShowExamine = false;
+      this.isShowReturn = false;
+    },
+
+    // 关闭
+    handleClose(id) {
+      closeData({ id }).then((res) => {
+        this.$successMsg();
+        this.getList();
+      });
+    },
+
+    // 提审
+    handleSubmit(id) {
+      submitData({ id }).then((res) => {
+        this.$successMsg();
+        this.getList();
+      });
+    },
+    //撤回
+    handleCancel(id) {
+      submitCancel({ id }).then((res) => {
+        this.$successMsg();
+        this.getList();
+      });
+    },
+  },
+};
+</script>
 
-</style>
+<style lang="scss" scoped></style>