Переглянути джерело

解决 retail_list.vue 冲突

howie 3 роки тому
батько
коміт
d1f80ac934

+ 78 - 71
src/api/basic_data/dealer.js

@@ -1,141 +1,148 @@
-import request from '@/utils/request'
-
+import request from "@/utils/request";
 
 //获取经销商列表
 export function getDealerList(params) {
   return request({
-    url: '/customer/list',
-    method: 'get',
-    params
-  })
+    url: "/customer/list",
+    method: "get",
+    params,
+  });
 }
 //经销商详情
 export function getDealerInfo(params) {
   return request({
-    url: '/customer/detail',
-    method: 'get',
-    params
-  })
+    url: "/customer/detail",
+    method: "get",
+    params,
+  });
 }
 
 //经销商客户存货分类列表
 export function getDealerStockList(params) {
   return request({
-    url: '/customer/pt/list',
-    method: 'get',
-    params
-  })
+    url: "/customer/pt/list",
+    method: "get",
+    params,
+  });
 }
 //新增经销商客户存货分类
 export function getDealerStockAdd(data) {
   return request({
-    url: '/customer/pt/add',
-    method: 'post',
-    data
-  })
+    url: "/customer/pt/add",
+    method: "post",
+    data,
+  });
 }
 //删除经销商客户存货分类
 export function deleDealerStockList(params) {
   return request({
-    url: '/customer/pt/delete',
-    method: 'post',
-    params
-  })
+    url: "/customer/pt/delete",
+    method: "post",
+    params,
+  });
 }
 //经销商工程机配置列表
 export function getDealerDepositList(params) {
   return request({
-    url: '/customer/deposit/list',
-    method: 'get',
-    params
-  })
+    url: "/customer/deposit/list",
+    method: "get",
+    params,
+  });
 }
 //新增经销商工程机配置
 export function getDealerDepositAdd(data) {
   return request({
-    url: '/customer/deposit/add',
-    method: 'post',
-    data
-  })
+    url: "/customer/deposit/add",
+    method: "post",
+    data,
+  });
 }
 //删除经销商工程机配置
 export function deleDealerDeposit(params) {
   return request({
-    url: '/customer/deposit/delete',
-    method: 'post',
-    params
-  })
+    url: "/customer/deposit/delete",
+    method: "post",
+    params,
+  });
 }
 //修改经销商工程机配置
 export function editDealerDeposit(data) {
   return request({
-    url: '/customer/deposit/update',
-    method: 'post',
-    data
-  })
+    url: "/customer/deposit/update",
+    method: "post",
+    data,
+  });
 }
 //经销商工程机配置详情
 export function infoDealerDeposit(params) {
   return request({
-    url: '/customer/deposit/detail',
-    method: 'get',
-    params
-  })
+    url: "/customer/deposit/detail",
+    method: "get",
+    params,
+  });
 }
 //经销商申请列表
 export function getDealerApplyList(params) {
   return request({
-    url: '/customer/apply/list',
-    method: 'get',
-    params
-  })
+    url: "/customer/apply/list",
+    method: "get",
+    params,
+  });
 }
 
 //字典
 export function getDictionaries(params) {
   return request({
-    url: '/common/dict/list',
-    method: 'get',
-    params
-  })
+    url: "/common/dict/list",
+    method: "get",
+    params,
+  });
 }
 //产品品类列表
 export function getProductCategoryList(params) {
   return request({
-    url: '/product-category/list',
-    method: 'get',
-    params
-  })
+    url: "/product-category/list",
+    method: "get",
+    params,
+  });
 }
 //根据父级查询部门
 export function getAdminWebsitByparent(params) {
   return request({
-    url: '/admin/websit/byparent',
-    method: 'get',
-    params
-  })
+    url: "/admin/websit/byparent",
+    method: "get",
+    params,
+  });
 }
 //帐号列表
 export function getAdminUserList(params) {
   return request({
-    url: '/admin/user/list',
-    method: 'get',
-    params
-  })
+    url: "/admin/user/list",
+    method: "get",
+    params,
+  });
 }
 //经销商客户存货分类-详情
 export function getCustomerPtDetail(params) {
   return request({
-    url: '/customer/pt/detail',
-    method: 'get',
-    params
-  })
+    url: "/customer/pt/detail",
+    method: "get",
+    params,
+  });
 }
 //修改经销商客户存货分类
 export function getCustomerPtUpdate(data) {
   return request({
-    url: '/customer/pt/update',
-    method: 'post',
-    data
-  })
-}
+    url: "/customer/pt/update",
+    method: "post",
+    data,
+  });
+}
+//经销商钱包列表
+export function getWalletCustomerList(params) {
+  return request({
+    url: "/wallet/customer/list",
+    method: "get",
+    params,
+  });
+}

+ 77 - 0
src/components/Common/edit-date-time-dialog.vue

@@ -0,0 +1,77 @@
+<template>
+  <div>
+    <el-dialog
+      title="修改订单日期"
+      :visible.sync="isShow"
+      :show-close="false"
+      width="400px"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="dateForm"
+        :model="dateForm"
+        :rules="dateFormRules"
+        label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="选择日期" prop="date">
+          <el-date-picker
+            v-model="dateForm.date"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            default-time="00:00:00"
+            style="width: 100%"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelDateForm">取 消</el-button>
+        <el-button type="primary" @click="submitDateForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "EditDateTimeDialog",
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false,
+    },
+    dateForm: {
+      type: Object,
+      default: {
+        date: "",
+      },
+    },
+  },
+  data() {
+    return {
+      dateFormRules: {
+        date: [
+          { required: true, message: "请选择订单日期", trigger: "change" },
+        ],
+      },
+    };
+  },
+  methods: {
+    cancelDateForm() {
+      this.$emit("update:isShow", false);
+    },
+
+    submitDateForm() {
+      this.$refs.dateForm.validate((valid) => {
+        if (valid) {
+          this.$parent.submitDateForm();
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style></style>

+ 20 - 12
src/layout/components/Navbar.vue

@@ -55,12 +55,12 @@
         <el-button type="primary" @click="submitForm">确 定</el-button>
       </div>
     </el-dialog>
-    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">
-      <input type="hidden" :value="userInfo.enginUserName" name="username" />
-      <input type="hidden" :value="userInfo.enginPassword" name="password" />
-      <input type="hidden" value="zfire" name="vcode" >
-      <input type="submit" ref="engineSubmit">
-    </form>
+<!--    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">-->
+<!--      <input type="hidden" :value="userInfo.enginUserName" name="username" />-->
+<!--      <input type="hidden" :value="userInfo.enginPassword" name="password" />-->
+<!--      <input type="hidden" value="zfire" name="vcode" >-->
+<!--      <input type="submit" ref="engineSubmit">-->
+<!--    </form>-->
   </div>
 </template>
 
@@ -157,7 +157,11 @@ export default {
       if (userInfoCopy && userInfoCopy.bindEngin) {
         checkEngineAccount().then(res => {
           if (res.code === 200) {
-            this.$refs.engineSubmit.click()
+            // this.$refs.engineSubmit.click()
+            const {href} = this.$router.resolve({
+              name: 'open_engin'
+            })
+            window.open(href, '_blank')
           } else {
             this.$errorMsg("账号密码错误,请重新绑定")
             this.dialogFormVisible = true
@@ -175,14 +179,18 @@ export default {
             enginPassword: this.engineForm.password
           }
           bindEngineAccount(params).then(res => {
-            console.log('-----------', res)
             if (res.code === 200) {
               this.$successMsg("绑定成功,正在打开工程机系统")
+              this.dialogFormVisible = false
               this.$store.dispatch('user/getInfo').then(() => {
-                this.userInfo.bindEngin = true
-                this.userInfo.enginUserName = this.engineForm.account
-                this.userInfo.enginPassword = this.engineForm.password
-                this.$refs.engineSubmit.click()
+                this.userInfo = JSON.parse(localStorage.getItem("supply_user"))
+                const {href} = this.$router.resolve({
+                  name: 'open_engin'
+                })
+                window.open(href, '_blank')
+                // this.userInfo.enginUserName = this.engineForm.account
+                // this.userInfo.enginPassword = this.engineForm.password
+                // this.$refs.engineSubmit.click()
               })
             } else {
               this.$errorMsg(res.message)

+ 7 - 2
src/router/index.js

@@ -36,7 +36,12 @@ export const constantRoutes = [
     component: () => import('@/views/login/index'),
     hidden: true
   },
-
+  {
+    path: '/external/open_engin',
+    name: 'open_engin',
+    component: () => import('@/views/external/open_engin'),
+    hidden: true
+  },
   {
     path: '/404',
     component: () => import('@/views/404'),
@@ -148,7 +153,7 @@ export const constantRoutes = [
   //     }
   //   ]
   // },
-  
+
   // {
   //   path: '/member',
   //   component: Layout,

+ 5 - 1
src/views/basic_data/dealer/components/dealer_list-detail.vue

@@ -244,7 +244,11 @@
       </div>
       <div class="diy-table-1">
         <el-row :gutter="0" class="xyed">
-          <div v-for="(v, i) in infoList.customerWallets" :key="i">
+          <div
+            v-for="(v, i) in infoList.customerWallets"
+            :key="i"
+            v-show="v.type == 'COMMONLY'"
+          >
             <el-col :span="12" class="item">
               <div class="label">信用额度</div>
               <div class="value">{{ v.freeCreditAmount }}</div>

+ 71 - 49
src/views/basic_data/dealer/dealer_stock.vue

@@ -92,8 +92,8 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="产品大类(钱包)"
-            prop="mainName"
+            label="钱包名称"
+            prop="customerWalletName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -196,6 +196,7 @@
             class="selectStyle"
             v-model="addForm.customerId"
             placeholder="请选择"
+            @change="changeFn"
           >
             <el-option
               v-for="item in dealerList"
@@ -212,19 +213,18 @@
             {{ scope.row }}
           </template> -->
         </el-form-item>
-        <el-form-item label="产品大类" prop="mainId">
+        <el-form-item label="钱包" prop="customerWalletId">
           <el-select
             class="selectStyle"
-            v-model="addForm.mainId"
+            v-model="addForm.customerWalletId"
             placeholder="请选择"
             filterable
-            @change="changeSelectFn"
           >
             <el-option
-              v-for="item in categoryList"
-              :key="item.productCategoryId"
-              :label="item.productCategoryName"
-              :value="item.productCategoryId"
+              v-for="item in walletList"
+              :key="item.customerWalletId"
+              :label="item.customerWalletName"
+              :value="item.customerWalletId"
             >
             </el-option>
           </el-select>
@@ -235,6 +235,7 @@
             v-model="addForm.oneParentId"
             placeholder="请选择"
             filterable
+            @change="changeOneFn"
           >
             <el-option
               v-for="item in oneList"
@@ -251,6 +252,7 @@
             class="selectStyle"
             v-model="addForm.twoParentId"
             placeholder="请选择"
+            @change="changeTwoFn"
           >
             <el-option
               v-for="item in twoList"
@@ -267,6 +269,7 @@
             v-model="addForm.threeParentId"
             placeholder="请选择"
             filterable
+            @change="changeThreeFn"
           >
             <el-option
               v-for="item in threeList"
@@ -313,6 +316,7 @@ import {
   getAdminUserList,
   getCustomerPtDetail,
   getCustomerPtUpdate,
+  getWalletCustomerList,
 } from "@/api/basic_data/dealer";
 import { getDealerList } from "@/api/basic_data/dealer";
 
@@ -329,18 +333,15 @@ export default {
         twoParentId: "",
         threeParentId: "",
         serviceId: "",
-        mainId: "",
+        customerWalletId: "",
       },
       mainId: null,
       rules: {
         customerId: [
           { required: true, message: "请选择经销商名称", trigger: "blur" },
         ],
-        mainId: [
-          { required: true, message: "请选择存货分类", trigger: "blur" },
-        ],
-        customerId: [
-          { required: true, message: "请选择经销商", trigger: "blur" },
+        customerWalletId: [
+          { required: true, message: "请选择经销商钱包", trigger: "blur" },
         ],
         oneParentId: [
           { required: true, message: "请选择一级区域", trigger: "blur" },
@@ -366,8 +367,8 @@ export default {
       dataList: [], // 列表数据
       listLoading: false, // 列表加载loading
       dealerList: [],
-      selectList: [],
-      categoryList: [], //产品大类列表
+      // selectList: [],
+      walletList: [], //产品大类列表
       oneList: [], //一级区域数据
       twoList: [], //二级区域数据
       threeList: [], //三级区域数据
@@ -377,27 +378,32 @@ export default {
     };
   },
   async created() {
+    this.getAdminWebsit(1);
     this.getList({ pageNum: 1, pageSize: 10 });
     this.getDealerDataList({ pageNum: -1, pageSize: 10 });
-    this.getSelectList({ sysDictEnum: "PRODUCT_TYPE" });
-    this.getCategoryList();
-    this.getAdminWebsit(0);
+    // this.getSelectList({ sysDictEnum: "PRODUCT_TYPE" });
   },
   computed: {},
   watch: {
     "addForm.customerId": async function (newValue) {
       if (newValue) {
+        // this.addForm.customerWalletId = "";
         const res = this.dealerList.filter((i) => i.id == newValue);
 
         this.addForm.customerName = res[0].name;
         this.addForm.customerNumber = res[0].number;
+        let res2 = await getWalletCustomerList({
+          customerId: newValue,
+          type: "COMMONLY",
+        });
+        this.walletList = res2.data;
       }
     },
     "addForm.oneParentId": async function (newValue) {
       if (newValue) {
         let res = await getAdminWebsitByparent({
           parentId: newValue,
-          mainId: this.mainId,
+          // mainId: this.mainId,
         });
         this.twoList = res.data;
       }
@@ -406,7 +412,7 @@ export default {
       if (newValue) {
         let res = await getAdminWebsitByparent({
           parentId: newValue,
-          mainId: this.mainId,
+          // mainId: this.mainId,
         });
         this.threeList = res.data;
       }
@@ -424,21 +430,35 @@ export default {
     },
   },
   methods: {
-    //改变产品大类
-    changeSelectFn(value) {
-      const res = this.categoryList.filter((v) => v.productCategoryId == value);
-      console.log(res);
-      this.mainId = res[0].productCategoryNumber;
-    },
+    // //改变产品大类
+    // changeSelectFn(value) {
+    //   // const res = this.categoryList.filter((v) => v.productCategoryId == value);
+    //   // console.log(res);
+    //   // this.mainId = res[0].productCategoryNumber;
+    // },
     //编辑
-
+    async changeFn(v) {
+      this.addForm.customerWalletId = "";
+    },
+    async changeOneFn(v) {
+      this.addForm.twoParentId = "";
+      this.addForm.threeParentId = "";
+      this.addForm.serviceId = "";
+    },
+    async changeTwoFn(v) {
+      this.addForm.threeParentId = "";
+      this.addForm.serviceId = "";
+    },
+    async changeThreeFn(v) {
+      this.addForm.serviceId = "";
+    },
     async editFn(id) {
       this.title = "经销商业务关系管理 ";
       this.rowID = id;
       let res = await getCustomerPtDetail({ id });
       console.log(res);
       this.addForm.customerId = res.data.customerId;
-      this.addForm.mainId = res.data.mainId;
+      this.addForm.customerWalletId = res.data.customerWalletId;
       this.addForm.oneParentId = res.data.adminWebsitId1;
       this.addForm.twoParentId = res.data.adminWebsitId2;
       this.addForm.threeParentId = res.data.adminWebsitId3;
@@ -454,16 +474,16 @@ export default {
     async getAdminWebsit(data) {
       let res = await getAdminWebsitByparent({
         parentId: data,
-        mainId: this.mainId,
+        // mainId: this.mainId,
       });
       this.oneList = res.data;
     },
-    //获取产品品类数据
-    async getCategoryList() {
-      let res = await getProductCategoryList();
-      console.log(res);
-      this.categoryList = res.data;
-    },
+    // //获取产品品类数据
+    // async getCategoryList() {
+    //   let res = await getProductCategoryList();
+    //   console.log(res);
+    //   this.categoryList = res.data;
+    // },
     // 筛选部分数据或者单个
     hanleSelect(selection) {
       // this.ids = selection.map((k) => {
@@ -472,12 +492,12 @@ export default {
       console.log(selection);
       this.ids = selection.map((v) => v.id);
     },
-    //存货分类
-    async getSelectList(data) {
-      const res = await getDictionaries(data);
-      console.log(res);
-      this.selectList = res.data;
-    },
+    // //存货分类
+    // async getSelectList(data) {
+    //   const res = await getDictionaries(data);
+    //   console.log(res);
+    //   this.selectList = res.data;
+    // },
     //删除
     async deleFn(id) {
       this.ids.push(id);
@@ -494,20 +514,22 @@ export default {
     async addDataListFn() {
       await this.$refs.addForm.validate();
 
-      let data2 = this.categoryList.filter((v) => {
-        return v.productCategoryId == this.addForm.mainId;
+      let data2 = this.walletList.filter((v) => {
+        return v.customerWalletId == this.addForm.customerWalletId;
       });
       let data3 = this.userList.filter((v) => {
         return v.adminUserId == this.addForm.serviceId;
       });
       console.log(data3);
+      console.log(data2, 22222);
 
       let value = {
         customerId: this.addForm.customerId,
         customerName: this.addForm.customerName,
         customerNumber: this.addForm.customerNumber,
-        mainId: this.addForm.mainId,
-        mainName: data2[0].productCategoryName,
+        customerWalletId: this.addForm.customerWalletId,
+        customerWalletName: data2[0].customerWalletName,
+
         serviceId: this.addForm.serviceId,
         serviceName: data3[0].nickName,
       };
@@ -522,7 +544,7 @@ export default {
       }
       this.addForm.customerId = "";
       this.addForm.customerName = "";
-      this.addForm.mainId = "";
+      this.addForm.customerWalletId = "";
       this.addForm.oneParentId = "";
       this.addForm.twoParentId = "";
       this.addForm.threeParentId = "";
@@ -538,7 +560,7 @@ export default {
       await this.$refs.addForm.clearValidate();
       this.addForm.customerId = "";
       this.addForm.customerNumber = "";
-      this.addForm.mainId = "";
+      this.addForm.customerWalletId = "";
       this.addForm.oneParentId = "";
       this.addForm.twoParentId = "";
       this.addForm.threeParentId = "";

+ 32 - 0
src/views/external/open_engin.vue

@@ -0,0 +1,32 @@
+<template>
+  <div>
+    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">
+      <input type="hidden" :value="userInfo.enginUserName" name="username" />
+      <input type="hidden" :value="userInfo.enginPassword" name="password" />
+      <input type="hidden" value="zfire" name="vcode" >
+      <input type="submit" ref="engineSubmit">
+    </form>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "OpenEngin",
+  data() {
+    return {
+      userInfo: ''
+    }
+  },
+  created() {
+    this.userInfo = JSON.parse(localStorage.getItem("supply_user"))
+    // this.$successMsg("打开工程机系统")
+    this.$nextTick(() => {
+      this.$refs.engineSubmit.click()
+    })
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 1
src/views/finance/change_list.vue

@@ -99,7 +99,19 @@
               prop="applyTime"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <!-- <template slot-scope="scope">
+                <div>
+                  <span>{{ scope.row.applyTime }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  ></el-button>
+                </div>
+              </template> -->
+            </el-table-column>
             <el-table-column
               align="center"
               label="发起方经销商编号"

+ 13 - 12
src/views/finance/rebate_form.vue

@@ -19,12 +19,13 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="返利日期" prop="theTime">
+            <el-form-item label="返利日期" prop="">
               <el-date-picker
+                disabled
                 class="selectStyle"
                 v-model="searchForm.theTime"
                 type="datetime"
-                placeholder="选择日期时间"
+                placeholder="系统自动生成"
                 default-time="23:59:59"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
@@ -344,21 +345,21 @@ export default {
       listLoading: false, // 列表加载loading
       customerData: [],
       searchForm: {
-        theTime: "",
+        // theTime: "",
 
         remark: "",
         createBy: "",
       },
       delIndex: null,
-      rules: {
-        theTime: [
-          {
-            required: true,
-            message: "请选择返利日期",
-            trigger: "blur",
-          },
-        ],
-      },
+      // rules: {
+      //   theTime: [
+      //     {
+      //       required: true,
+      //       message: "请选择返利日期",
+      //       trigger: "blur",
+      //     },
+      //   ],
+      // },
     };
   },
 

+ 48 - 2
src/views/finance/rebate_list.vue

@@ -142,9 +142,21 @@
               align="center"
               label="返利日期"
               prop="theTime"
-              min-width="160"
+              min-width="180"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <div>
+                  <span>{{ scope.row.theTime }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  ></el-button>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column
               v-if="isCustomer"
               align="center"
@@ -510,6 +522,7 @@
         </div>
       </div>
     </div>
+
     <RebateListApply :detailId="detailId" v-else-if="showPage == 2" />
     <RebateListExamine
       @updateList="updateList"
@@ -536,6 +549,10 @@
       :detailId="detailId"
       v-else-if="showPage == 7"
     />
+    <EditDateTimeDialog
+      :isShow.sync="isShowEditDateDialog"
+      :dateForm.sync="dateForm"
+    />
   </div>
 </template>
 
@@ -543,6 +560,7 @@
 import {
   getRebateOrderList,
   getRebateOrderApply,
+  getRebateOrderUpdate,
 } from "@/api/finance/rebate_list";
 import RebateListApply from "./components/rebate_list-apply.vue";
 import RebateListExamine from "./components/rebate_list-examine.vue";
@@ -550,6 +568,7 @@ import RebateListReview from "./components/rebate_list-review.vue";
 import RebateListDetail from "./components/rebate_list-detail";
 import RebateListConfirm from "./components/rebate_list-confirm";
 import RebateListEdit from "./components/rebate_list-edit.vue";
+import EditDateTimeDialog from "@/components/Common/edit-date-time-dialog.vue";
 
 export default {
   components: {
@@ -559,6 +578,7 @@ export default {
     RebateListReview,
     RebateListConfirm,
     RebateListEdit,
+    EditDateTimeDialog,
   },
   data() {
     return {
@@ -579,6 +599,11 @@ export default {
       isCustomer: null,
       secondId: null,
       isShow: null,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: "",
+      },
+      editId: null,
     };
   },
   created() {
@@ -594,6 +619,27 @@ export default {
     }
   },
   methods: {
+    // 提交 修改订单日期
+    submitDateForm() {
+      getRebateOrderUpdate({
+        id: this.editId,
+        theTime: this.dateForm.date,
+      }).then((res) => {
+        this.isShowEditDateDialog = false;
+        this.getDataList({
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
+        });
+        this.$successMsg("修改成功");
+      });
+    },
+    // 打开 修改订单日期
+    editDate(item) {
+      console.log(item);
+      this.editId = item.rebateOrderId;
+      this.dateForm.date = item.theTime;
+      this.isShowEditDateDialog = true;
+    },
     //清除
     cancelFn() {
       this.$refs.searchForm.resetFields();

+ 1 - 1
src/views/finance/standbook_list.vue

@@ -12,7 +12,7 @@
     </el-radio-group>
     <br /><br /> -->
     <el-radio-group v-model="bill" @change="checkFn" size="">
-      <el-radio-button label="COMMONLY">款台账</el-radio-button>
+      <el-radio-button label="COMMONLY">款台账</el-radio-button>
       <el-radio-button label="REBATE">返利台账</el-radio-button>
     </el-radio-group>
     <h1></h1>

+ 1 - 1
src/views/supply/apply/components/apply_detail.vue

@@ -84,7 +84,7 @@
       <el-table :data="detailData.orders" 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="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" 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>

+ 1 - 1
src/views/supply/apply/components/apply_examine.vue

@@ -76,7 +76,7 @@
       <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="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" 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>

+ 21 - 5
src/views/supply/pickup/components/pickup_print.vue

@@ -9,7 +9,7 @@
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">出库日期:</div>
-            <div class="value">{{detailData.createBy}}</div>
+            <div class="value">{{getDate()}}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">仓库:</div>
@@ -17,7 +17,7 @@
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">信息密钥:</div>
-            <div class="value">{{detailData.customerNumber}}</div>
+            <div class="value">{{detailData.informationKey}}</div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">经销商:</div>
@@ -45,9 +45,9 @@
             <el-row :gutter="20">
               <el-col :span="3">{{ item.invoiceId || '' }}</el-col>
               <el-col :span="2">{{ item.saleTypeName || '' }}</el-col>
-              <el-col :span="3">{{ item.aaa || '' }}</el-col>
+              <el-col :span="3">{{ item.fileNo || '' }}</el-col>
               <el-col :span="6">{{ item.specification || '' }}</el-col>
-              <el-col :span="2">{{ item.qty || 0 }}</el-col>
+              <el-col :span="2">{{ item.refundableQty || 0 }}</el-col>
               <el-col :span="2">{{ item.unit || '' }}</el-col>
               <el-col :span="2">{{ item.price || 0 }}</el-col>
               <el-col :span="2">{{ item.payAmount || 0 }}</el-col>
@@ -58,7 +58,7 @@
               <el-col :span="2">发货日期</el-col>
               <el-col :span="4">{{ item.theTime || '' }}</el-col>
               <el-col :span="2">工程编号</el-col>
-              <el-col :span="3">{{ item.aaa || '' }}</el-col>
+              <el-col :span="3">{{ item.refEnginRecordNo || '' }}</el-col>
               <el-col :span="2">备注</el-col>
               <el-col :span="8">{{ item.remark || '' }}</el-col>
             </el-row>
@@ -142,6 +142,22 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    getDate() {
+      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;
+    },
+
     // 获取详情
     getDetail() {
       getDetail({id: this.listItem.id}).then(res => {

+ 1 - 1
src/views/supply/retail/components/retail_detail.vue

@@ -227,7 +227,7 @@
           <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="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调出仓库" prop="warehouse1" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调出仓位" prop="position1" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调入仓库" prop="warehouse2" min-width="100" show-overflow-tooltip></el-table-column>

+ 1 - 1
src/views/supply/retail/components/retail_examine.vue

@@ -56,7 +56,7 @@
         <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="refundableQty" 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="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 22 - 20
src/views/supply/retail/components/retail_form.vue

@@ -25,13 +25,15 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" :disabled="goodsList.length > 0">
               <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> -->
+      </el-row>
+      <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
             <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
@@ -162,13 +164,13 @@
     <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-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="type">
               <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" clearable :disabled="goodsList.length > 0 || rightGoodsList.length > 0">
                 <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> -->
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="salesType">
               <el-select v-model="screenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
@@ -198,7 +200,7 @@
               <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-col :xs="12" :sm="12" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -285,7 +287,7 @@ export default {
       mainForm: {
         orderNum: '',
         date: '',
-        type: '',
+        // type: '',
         jxsNum: '',
         jxsName: '',
         serviceName: '',
@@ -295,9 +297,9 @@ export default {
         // date: [
         //   { required: true, message: '请选择单据日期', trigger: 'change' }
         // ],
-        type: [
-          { required: true, message: '请选择品类', trigger: 'change' }
-        ],
+        // type: [
+        //   { required: true, message: '请选择品类', trigger: 'change' }
+        // ],
       },
       goodsList: [],
 
@@ -366,7 +368,7 @@ export default {
         let data = res.data;
         this.mainForm.orderNum = data.id;
         this.mainForm.date = data.theTime.slice(0, 10);
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
         this.mainForm.remark = data.remark;
@@ -399,9 +401,9 @@ export default {
     },
 
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -412,7 +414,7 @@ export default {
       getGoodsList({
         pageNum: this.currentPage,
         pageSize: 10,
-        mainId: this.mainForm.type,
+        // mainId: this.mainForm.type,
         saleId: this.screenForm.salesType,
         materialCode: this.screenForm.proNum,
         materialName: this.screenForm.proName,
@@ -472,9 +474,9 @@ export default {
 
     // 提交筛选表单
     submitScreenForm() {
-      if(!this.mainForm.type) {
-        return this.$errorMsg('请选择产品大类');
-      }
+      // if(!this.mainForm.type) {
+      //   return this.$errorMsg('请选择产品大类');
+      // }
       this.currentPage = 1;
       this.getGoodsList();
     },
@@ -623,11 +625,11 @@ export default {
             delete item.wallets;
           })
 
-          let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
+          // 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,
+            // mainId: this.mainForm.type,
+            // mainName,
             remark: this.mainForm.remark,
             type: 1, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList

+ 1 - 1
src/views/supply/retail/components/retail_return.vue

@@ -56,7 +56,7 @@
         <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="refundableQty" 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="customerWalletName2" 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>

+ 352 - 98
src/views/supply/retail/retail_list.vue

@@ -1,36 +1,65 @@
 <template>
   <div class="app-container">
-    <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
+    <div
+      v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
+    >
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-form
+          ref="screenForm"
+          :model="screenForm"
+          label-width="70px"
+          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-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-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-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="goodsName">
-                <el-input v-model="screenForm.goodsName" placeholder="请输入货品名称"></el-input>
+                <el-input
+                  v-model="screenForm.goodsName"
+                  placeholder="请输入货品名称"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="规格型号" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+                <el-input
+                  v-model="screenForm.model"
+                  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-input
+                  v-model="screenForm.jxsName"
+                  placeholder="请输入经销商"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -39,28 +68,39 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
-                  end-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-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-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-button size="small" @click="resetScreenForm"
+                  >清空</el-button
+                >
+                <el-button size="small" type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -70,75 +110,274 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              @click="toForm()"
+              v-if="$checkBtnRole('add', $route.meta.roles)"
+              >新增</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
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
             <!-- <el-table-column align="center" label="提货进度" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <el-progress :text-inside="true" :stroke-width="26" :percentage="((scope.row.hasSendQty * 100) / (scope.row.totalQty * 100)) || 0"></el-progress>
               </template>
             </el-table-column> -->
-            <el-table-column align="center" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="center"
+              label="审核状态"
+              prop="examineStatus"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.examineStatus | statusFilter}}
+                {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="开票状态" prop="isInvoicing" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="center"
+              label="开票状态"
+              prop="isInvoicing"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.isInvoicing ? '已开票':'未开票'}}
+                {{ scope.row.isInvoicing ? "已开票" : "未开票" }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="订单号" prop="id" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="theTime" min-width="120" show-overflow-tooltip>
+            <el-table-column
+              align="center"
+              label="订单号"
+              prop="id"
+              min-width="200"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="订单日期"
+              prop="theTime"
+              min-width="120"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <div>
-                  <span>{{scope.row.theTime | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" ></el-button>
+                  <span>{{ scope.row.theTime | dateToDayFilter }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  ></el-button>
                 </div>
               </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>
+            <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 ? '是':'否'}}
+                {{ scope.row.isDirectTransfer ? "是" : "否" }}
               </template>
             </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="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="出库数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="可退数量" prop="refundableQty" 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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="120" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="center"
+              label="总数量"
+              prop="qty"
+              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="hasSendQty"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="可退数量"
+              prop="refundableQty"
+              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="payAmount"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利类型"
+              prop="customerWalletName2"
+              min-width="120"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利金额"
+              prop="rebateAmount"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <div>{{scope.row.rebateAmount}}</div>
-                <div>(实际:{{scope.row.payRebateAmount}})</div>
+                <div>{{ scope.row.rebateAmount }}</div>
+                <div>(实际:{{ scope.row.payRebateAmount }})</div>
               </template>
             </el-table-column>
-            <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" 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="操作" width="180" fixed="right">
+            <el-table-column
+              align="center"
+              label="格力折扣"
+              prop="totalDiscAmount"
+              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="操作"
+              width="180"
+              fixed="right"
+            >
               <template slot-scope="scope">
-                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
-                <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
-                <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'">退订</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="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                <el-button
+                  type="text"
+                  @click="toForm(scope.row)"
+                  v-if="
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    scope.row.examineStatus === 'SAVE'
+                  "
+                  >编辑</el-button
+                >
+                <el-button
+                  type="text"
+                  @click="toExamine(scope.row)"
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
+                  "
+                  >审批</el-button
+                >
+                <el-button
+                  type="text"
+                  @click="toReturn(scope.row)"
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'OK'
+                  "
+                  >退订</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="
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    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="$checkBtnRole('examine', $route.meta.roles) && !scope.row.closeTime" >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定关闭吗?"
+                  @onConfirm="handleClose(scope.row.id)"
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    !scope.row.closeTime
+                  "
+                >
                   <el-button slot="reference" type="text">关闭</el-button>
                 </el-popconfirm>
               </template>
@@ -155,7 +394,8 @@
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
+            :total="listTotal"
+          >
           </el-pagination>
         </div>
       </div>
@@ -163,11 +403,26 @@
 
     <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
 
-    <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" />
-
+    <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>
 
@@ -179,7 +434,7 @@ import RetailExamine from "@/views/supply/retail/components/retail_examine";
 import RetailReturn from "@/views/supply/retail/components/retail_return";
 import EditDateDialog from "@/components/Common/edit-date-dialog";
 
-let that
+let that;
 export default {
   components: {
     RetailDetail,
@@ -190,9 +445,9 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find(o => o.value == val);
-      return obj ? obj.label : ''
-    }
+      let obj = that.statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
   data() {
     return {
@@ -201,21 +456,22 @@ export default {
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        orderNum: '',
-        goodsName: '',
-        model: '',
-        jxsName: '',
-        date: '',
-        zbMan: '',
-        shMan: '',
-        status: '',
+      screenForm: {
+        // 筛选表单数据
+        orderNum: "",
+        goodsName: "",
+        model: "",
+        jxsName: "",
+        date: "",
+        zbMan: "",
+        shMan: "",
+        status: "",
       },
       statusList: [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
-        { label: '审核驳回', value: 'FAIL' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        { label: "审核驳回", value: "FAIL" },
       ],
 
       queryItem: {},
@@ -227,9 +483,9 @@ export default {
       editId: null,
       isShowEditDateDialog: false,
       dateForm: {
-        date: '',
+        date: "",
       },
-    }
+    };
   },
 
   computed: {
@@ -240,12 +496,12 @@ export default {
         materialName: this.screenForm.goodsName,
         specification: this.screenForm.model,
         customer: this.screenForm.jxsName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        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:政策零售单
-      }
+      };
     },
   },
 
@@ -270,8 +526,8 @@ export default {
         materialName: this.screenForm.goodsName,
         specification: this.screenForm.model,
         customer: this.screenForm.jxsName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        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:政策零售单
@@ -280,7 +536,7 @@ export default {
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
-      })
+      });
     },
 
     // 提交筛选表单
@@ -329,8 +585,8 @@ export default {
 
     // 进入退订
     toReturn(item) {
-      if(item.refundableQty < 1) {
-        return this.$errorMsg('可退数量为0');
+      if (item.refundableQty < 1) {
+        return this.$errorMsg("可退数量为0");
       }
       this.queryItem = item;
       this.isShowReturn = true;
@@ -346,18 +602,18 @@ export default {
 
     // 关闭
     handleClose(id) {
-      closeData({id}).then(res => {
+      closeData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 申请
     handleSubmit(id) {
-      submitData({id}).then(res => {
+      submitData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 打开 修改订单日期
@@ -371,17 +627,15 @@ export default {
     submitDateForm() {
       editData({
         id: this.editId,
-        theTime: this.dateForm.date + ' 00:00:00',
-      }).then(res => {
+        theTime: this.dateForm.date + " 00:00:00",
+      }).then((res) => {
         this.isShowEditDateDialog = false;
         this.getList();
-        this.$successMsg('修改成功');
-      })
+        this.$successMsg("修改成功");
+      });
     },
-  }
-}
+  },
+};
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>