Przeglądaj źródła

【修改】bug

howie 2 lat temu
rodzic
commit
7f8af90be3
44 zmienionych plików z 5268 dodań i 9742 usunięć
  1. 53 53
      src/api/supply/purchase.js
  2. 33 33
      src/router/index.js
  3. 19 22
      src/store/getters.js
  4. 29 42
      src/store/modules/user.js
  5. 85 252
      src/views/basic_data/material/price_list.vue
  6. 139 247
      src/views/basic_data/stock/Issue_list.vue
  7. 136 241
      src/views/basic_data/stock/material_list.vue
  8. 69 89
      src/views/basic_data/stock/product_list.vue
  9. 140 246
      src/views/basic_data/stock/warehousing_list.vue
  10. 2 2
      src/views/deposit_home/components/deposit-apply-surrender.vue
  11. 125 90
      src/views/finance/change_apply.vue
  12. 182 101
      src/views/finance/rebate_form.vue
  13. 25 78
      src/views/login/index.vue
  14. 3 3
      src/views/sales_policy/components/AddCondition.vue
  15. 1 1
      src/views/sales_policy/components/editPolicy.vue
  16. 84 172
      src/views/setting/other.vue
  17. 164 116
      src/views/setting/role.vue
  18. 114 155
      src/views/setting/sub_account.vue
  19. 183 413
      src/views/supply/apply/apply_list.vue
  20. 185 417
      src/views/supply/apply/engin_list.vue
  21. 202 478
      src/views/supply/apply/new_apply.vue
  22. 204 491
      src/views/supply/apply/new_engin.vue
  23. 122 313
      src/views/supply/deliver/commerce_list.vue
  24. 98 278
      src/views/supply/deliver/home_list.vue
  25. 365 483
      src/views/supply/deliver/sum_list.vue
  26. 134 256
      src/views/supply/engin/commerce_list.vue
  27. 189 531
      src/views/supply/engin/components/commerce_detail.vue
  28. 80 218
      src/views/supply/engin/components/commerce_examine.vue
  29. 230 557
      src/views/supply/engin/components/commerce_form.vue
  30. 79 221
      src/views/supply/engin/components/commerce_return.vue
  31. 42 70
      src/views/supply/engin/components/engin_detail.vue
  32. 246 470
      src/views/supply/engin/components/engin_examine.vue
  33. 101 35
      src/views/supply/engin/components/engin_form.vue
  34. 174 345
      src/views/supply/engin/components/home_detail.vue
  35. 102 565
      src/views/supply/engin/components/home_form.vue
  36. 63 172
      src/views/supply/engin/components/home_return.vue
  37. 254 169
      src/views/supply/engin/engin_list.vue
  38. 124 90
      src/views/supply/pickup/sum_list.vue
  39. 187 414
      src/views/supply/policy/components/retail_detail.vue
  40. 342 469
      src/views/supply/policy/components/retail_form.vue
  41. 1 1
      src/views/supply/price/difference_price_list.vue
  42. 1 1
      src/views/supply/price/price_list.vue
  43. 5 15
      src/views/supply/reserve/reserve_list.vue
  44. 152 327
      src/views/supply/retail/components/retail_detail.vue

+ 53 - 53
src/api/supply/purchase.js

@@ -1,117 +1,117 @@
-import request from "@/utils/request";
+import request from '@/utils/request'
 
 // 获取采购单列表
 export function getPurchaseList(params) {
   return request({
-    url: "/purchaseOrder/list",
-    method: "get",
-    params,
-  });
+    url: '/purchaseOrder/list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取采购单列表
 export function getPurchaseDetail(params) {
   return request({
-    url: "/purchaseOrder/detail",
-    method: "get",
-    params,
-  });
+    url: '/purchaseOrder/detail',
+    method: 'get',
+    params
+  })
 }
 
 // 获取采购入库单列表
 export function getEnterList(params) {
   return request({
-    url: "/purchaseStockIn/list",
-    method: "get",
-    params,
-  });
+    url: '/purchaseStockIn/list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取采购入库单列表
 export function getEnterDetail(params) {
   return request({
-    url: "/purchaseStockIn/detail",
-    method: "get",
-    params,
-  });
+    url: '/purchaseStockIn/detail',
+    method: 'get',
+    params
+  })
 }
 
 // 获取采购计划单列表
 export function getPlanList(params) {
   return request({
-    url: "/plan/list",
-    method: "get",
-    params,
-  });
+    url: '/plan/list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取经销商采购计划单汇总列表
 export function getSumList(params) {
   return request({
-    url: "/plan/listCustomer",
-    method: "get",
-    params,
-  });
+    url: '/plan/listCustomer',
+    method: 'get',
+    params
+  })
 }
 
 // 提交经销商采购计划单
 export function submitPlan(params) {
   return request({
-    url: "/plan/submitPlan",
-    method: "post",
-    data: params,
-  });
+    url: '/plan/submitPlan',
+    method: 'post',
+    data: params
+  })
 }
 
 // 采购退料列表
 export function getPurchaseOutList(params) {
   return request({
-    url: "/stock/orderOutIn/listPurchaseOrderOut",
-    method: "get",
-    params,
-  });
+    url: '/stock/orderOutIn/listPurchaseOrderOut',
+    method: 'get',
+    params
+  })
 }
 
 // 其他入库列表
 export function getOtherStockInList(params) {
   return request({
-    url: "/stock/orderOutIn/listOtherStockIn",
-    method: "get",
-    params,
-  });
+    url: '/stock/orderOutIn/listOtherStockIn',
+    method: 'get',
+    params
+  })
 }
 
 // 其他出库列表
 export function getOtherStockOutList(params) {
   return request({
-    url: "/stock/orderOutIn/listOtherStockOut",
-    method: "get",
-    params,
-  });
+    url: '/stock/orderOutIn/listOtherStockOut',
+    method: 'get',
+    params
+  })
 }
 
 // 反审其他出库单
 export function setApprovalOtherStockOut(params) {
   return request({
-    url: "/stock/orderOutIn/trialApprovalOtherStockOut",
-    method: "post",
-    params,
-  });
+    url: '/stock/orderOutIn/trialApprovalOtherStockOut',
+    method: 'post',
+    params
+  })
 }
 // 反审其他入库单
 export function setApprovalPurchaseOrderIn(params) {
   return request({
-    url: "/stock/orderOutIn/trialApprovalOtherStockIn",
-    method: "post",
-    params,
-  });
+    url: '/stock/orderOutIn/trialApprovalOtherStockIn',
+    method: 'post',
+    params
+  })
 }
 
 // 反审采购退料单
 export function setApprovalPurchaseOrderOut(params) {
   return request({
-    url: "/stock/orderOutIn/trialApprovalPurchaseOrderOut",
-    method: "post",
-    params,
-  });
+    url: '/stock/orderOutIn/trialApprovalPurchaseOrderOut',
+    method: 'post',
+    params
+  })
 }

+ 33 - 33
src/router/index.js

@@ -1,10 +1,10 @@
-import Vue from "vue";
-import Router from "vue-router";
+import Vue from 'vue'
+import Router from 'vue-router'
 
-Vue.use(Router);
+Vue.use(Router)
 
 /* Layout */
-import Layout from "@/layout";
+import Layout from '@/layout'
 
 /**
  * Note: sub-menu only appear when route children.length >= 1
@@ -32,40 +32,40 @@ import Layout from "@/layout";
  */
 export const constantRoutes = [
   {
-    path: "/login",
-    component: () => import("@/views/login/index"),
-    hidden: true,
+    path: '/login',
+    component: () => import('@/views/login/index'),
+    hidden: true
   },
   {
-    path: "/external/open_engin",
-    name: "open_engin",
-    component: () => import("@/views/external/open_engin"),
-    hidden: true,
+    path: '/external/open_engin',
+    name: 'open_engin',
+    component: () => import('@/views/external/open_engin'),
+    hidden: true
   },
   {
-    path: "/404",
-    component: () => import("@/views/404"),
-    hidden: true,
+    path: '/404',
+    component: () => import('@/views/404'),
+    hidden: true
   },
 
   {
-    path: "/return_goods",
+    path: '/return_goods',
     component: Layout,
     children: [
       {
-        path: "new_apply",
-        name: "new_apply",
-        component: () => import("@/views/supply/apply/new_apply"),
-        meta: { title: "零售退货申请", icon: "" },
+        path: 'new_apply',
+        name: 'new_apply',
+        component: () => import('@/views/supply/apply/new_apply'),
+        meta: { title: '零售退货申请', icon: '' }
       },
       {
-        path: "new_engin",
-        name: "new_apply",
-        component: () => import("@/views/supply/apply/new_engin"),
-        meta: { title: "工程退货申请", icon: "" },
-      },
-    ],
-  },
+        path: 'new_engin',
+        name: 'new_apply',
+        component: () => import('@/views/supply/apply/new_engin'),
+        meta: { title: '工程退货申请', icon: '' }
+      }
+    ]
+  }
 
   // {
   //   path: '/goods',
@@ -275,21 +275,21 @@ export const constantRoutes = [
 
   // 404 page must be placed at the end !!!
   // { path: '*', redirect: '/404', hidden: true }
-];
+]
 
 const createRouter = () =>
   new Router({
     // mode: 'history', // require service support
     scrollBehavior: () => ({ y: 0 }),
-    routes: constantRoutes,
-  });
+    routes: constantRoutes
+  })
 
-const router = createRouter();
+const router = createRouter()
 
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {
-  const newRouter = createRouter();
-  router.matcher = newRouter.matcher; // reset router
+  const newRouter = createRouter()
+  router.matcher = newRouter.matcher // reset router
 }
 
-export default router;
+export default router

+ 19 - 22
src/store/getters.js

@@ -1,23 +1,20 @@
 const getters = {
-  sidebar: (state) => state.app.sidebar,
-  device: (state) => state.app.device,
-  visitedViews: (state) => state.tagsView.visitedViews,
-  cachedViews: (state) => state.tagsView.cachedViews,
-  token: (state) => state.user.token,
-  userid: (state) => state.user.userid,
-  phone: (state) => state.user.phone,
-  name: (state) => state.user.name,
-  isNotice: (state) => state.user.isNotice,
-  menus: (state) => state.user.menus,
-  websitNumber: (state) => state.user.websitNumber,
-  customerId: (state) => state.user.customerId,
-  customerName: (state) => state.user.customerName,
-  customerNumber: (state) => state.user.customerNumber,
-  showMessages: (state) => state.user.showMessages,
-  code: (state) => state.sales.code,
-  isCustomer: (state) =>
-    state.user.customerId &&
-    state.user.customerName &&
-    state.user.customerNumber,
-};
-export default getters;
+  sidebar: state => state.app.sidebar,
+  device: state => state.app.device,
+  visitedViews: state => state.tagsView.visitedViews,
+  cachedViews: state => state.tagsView.cachedViews,
+  token: state => state.user.token,
+  userid: state => state.user.userid,
+  phone: state => state.user.phone,
+  name: state => state.user.name,
+  isNotice: state => state.user.isNotice,
+  menus: state => state.user.menus,
+  websitNumber: state => state.user.websitNumber,
+  customerId: state => state.user.customerId,
+  customerName: state => state.user.customerName,
+  customerNumber: state => state.user.customerNumber,
+  showMessages: state => state.user.showMessages,
+  code: state => state.sales.code,
+  isCustomer: state => state.user.customerId && state.user.customerName && state.user.customerNumber
+}
+export default getters

+ 29 - 42
src/store/modules/user.js

@@ -1,27 +1,20 @@
-import { login, logout, getInfo, getRouter } from "@/api/user";
-import {
-  getToken,
-  setToken,
-  removeToken,
-  getUserid,
-  setUserid,
-  removeUserid,
-} from "@/utils/auth";
-import { resetRouter } from "@/router";
+import { login, logout, getInfo, getRouter } from '@/api/user'
+import { getToken, setToken, removeToken, getUserid, setUserid, removeUserid } from '@/utils/auth'
+import { resetRouter } from '@/router'
 
 const getDefaultState = () => {
   return {
     token: getToken(), // token
     userid: getUserid(), // 用户id
-    name: "", // 用户名称
-    phone: "", // 用户手机
-    menus: "", // 菜单
-    customerId: "", //经销商ID
-    customerName: "", //经销商名称
-    customerNumber: "", //经销商编码
+    name: '', // 用户名称
+    phone: '', // 用户手机
+    menus: '', // 菜单
+    customerId: '', //经销商ID
+    customerName: '', //经销商名称
+    customerNumber: '', //经销商编码
     showMessages: null, //
     isNotice: false,
-    websitNumber: "",
+    websitNumber: '',
     isCollapse: true
   }
 }
@@ -29,11 +22,11 @@ const getDefaultState = () => {
 const state = getDefaultState()
 
 const mutations = {
-  RESET_STATE: (state) => {
-    Object.assign(state, getDefaultState());
+  RESET_STATE: state => {
+    Object.assign(state, getDefaultState())
   },
   SET_STATUS(state, status) {
-    state.isNotice = status;
+    state.isNotice = status
   },
   SET_USERID: (state, userid) => {
     state.userid = userid
@@ -63,14 +56,14 @@ const mutations = {
     state.isCollapse = !bool.isCollapse
   },
   SET_WEBSIT_NUMBER: (state, websitNumber) => {
-    state.websitNumber = websitNumber;
+    state.websitNumber = websitNumber
   },
   showMessage: (state, value) => {
     if (value == 'yes') {
       state.showMessages = true
     } else {
-      state.showMessages = false;
-      state.isNotice = true;
+      state.showMessages = false
+      state.isNotice = true
     }
   }
 }
@@ -106,26 +99,20 @@ const actions = {
   getInfo({ commit, state }) {
     return new Promise((resolve, reject) => {
       getInfo(state.userid)
-        .then((response) => {
-          const { data } = response;
-          console.log(1111111, response);
+        .then(response => {
+          const { data } = response
+          console.log(1111111, response)
 
           if (!data) {
             return reject('Verification failed, please Login again.')
           }
-          console.log(data);
-          let websitNumber;
-          const {
-            nickName,
-            userName,
-            customerId,
-            customerName,
-            customerNumber,
-          } = data;
+          console.log(data)
+          let websitNumber
+          const { nickName, userName, customerId, customerName, customerNumber } = data
 
           if (data.adminWebsit) {
-            websitNumber = data.adminWebsit.websitNumber;
-            commit("SET_WEBSIT_NUMBER", websitNumber);
+            websitNumber = data.adminWebsit.websitNumber
+            commit('SET_WEBSIT_NUMBER', websitNumber)
           }
           // 模拟请求数据
           // const menus = [
@@ -152,11 +139,11 @@ const actions = {
           // },
           // ]
           // menus.push({ path: '*', redirect: '/404', hidden: true })
-          commit("SET_CUSTOMERID", customerId);
-          commit("SET_CUSTOMERNAME", customerName);
-          commit("SET_CUSTOMERNUMBER", customerNumber);
-          commit("SET_NAME", nickName);
-          commit("SET_PHONE", userName);
+          commit('SET_CUSTOMERID', customerId)
+          commit('SET_CUSTOMERNAME', customerName)
+          commit('SET_CUSTOMERNUMBER', customerNumber)
+          commit('SET_NAME', nickName)
+          commit('SET_PHONE', userName)
 
           // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex
 

+ 85 - 252
src/views/basic_data/material/price_list.vue

@@ -5,41 +5,24 @@
       <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
         <template #right_btn>
           <el-button size="mini" @click="resetScreenForm">清空</el-button>
-          <el-button size="mini" type="primary" @click="submitScreenForm"
-            >搜索</el-button
-          >
+          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
         </template>
         <template #search>
-          <el-form
-            ref="screenForm"
-            :model="screenForm"
-            label-width="70px"
-            size="mini"
-            label-position="left"
-          >
+          <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
             <el-row :gutter="20">
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="物料编码" prop="materialNumber">
-                  <el-input
-                    v-model="screenForm.materialNumber"
-                    placeholder="请输入物料编码"
-                  />
+                  <el-input v-model="screenForm.materialNumber" placeholder="请输入物料编码" />
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="产品名称" prop="materialName">
-                  <el-input
-                    v-model="screenForm.materialName"
-                    placeholder="请输入产品名称"
-                  />
+                  <el-input v-model="screenForm.materialName" placeholder="请输入产品名称" />
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="产品编码" prop="materialOldNumber">
-                  <el-input
-                    v-model="screenForm.materialOldNumber"
-                    placeholder="请输入产品编码"
-                  />
+                  <el-input v-model="screenForm.materialOldNumber" placeholder="请输入产品编码" />
                 </el-form-item>
               </el-col>
               <!--          <el-col :xs="24" :sm="12" :lg="6">-->
@@ -66,52 +49,28 @@
               <!--          </el-col>-->
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="销售类型" prop="saleTypeId">
-                  <el-select
-                    v-model="screenForm.saleTypeId"
-                    filterable
-                    placeholder="选择销售类型"
-                    style="width: 100%"
-                  >
+                  <el-select v-model="screenForm.saleTypeId" filterable placeholder="选择销售类型" style="width: 100%">
                     <el-option label="全部" value="" />
-                    <el-option
-                      v-for="item in ztypeList"
-                      :key="item.id"
-                      :label="item.saleName"
-                      :value="item.id"
-                    />
+                    <el-option v-for="item in ztypeList" :key="item.id" :label="item.saleName" :value="item.id" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="产品类别" prop="k3CategoryNumber">
-                  <el-select
-                    v-model="screenForm.k3CategoryNumber"
-                    style="width: 100%;"
-                    placeholder="请选择产品类别"
-                  >
+                  <el-select v-model="screenForm.k3CategoryNumber" style="width: 100%" placeholder="请选择产品类别">
                     <el-option label="全部" value="" />
-                    <el-option
-                      v-for="item in dictList"
-                      :label="item.name"
-                      :value="item.number"
-                    />
+                    <el-option v-for="item in dictList" :label="item.name" :value="item.number" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="规格型号" prop="specification">
-                  <el-input
-                    v-model="screenForm.specification"
-                    placeholder="请输入规格型号"
-                  />
+                  <el-input v-model="screenForm.specification" placeholder="请输入规格型号" />
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="备注" prop="specification">
-                  <el-input
-                    v-model="screenForm.remark"
-                    placeholder="请输入备注"
-                  />
+                  <el-input v-model="screenForm.remark" placeholder="请输入备注" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -131,22 +90,11 @@
           title="内容确定删除吗?"
           @onConfirm="handleDelete"
         >
-          <el-button
-            type="primary"
-            size="mini"
-            icon="el-icon-delete"
-            slot="reference"
-            class="el-popover-left"
+          <el-button type="primary" size="mini" icon="el-icon-delete" slot="reference" class="el-popover-left"
             >删除</el-button
           >
         </el-popconfirm>
-        <el-button
-          type="primary"
-          style="margin-left: 10px"
-          size="mini"
-          @click="handleRevokeAll"
-          >批量作废</el-button
-        >
+        <el-button type="primary" style="margin-left: 10px" size="mini" @click="handleRevokeAll">批量作废</el-button>
         <!--        <el-button type="primary" size="mini">导出</el-button>-->
         <!-- <el-button type="primary" size="mini">打印</el-button> -->
       </div>
@@ -165,11 +113,7 @@
           @select-all="hanleSelectAll"
           @select="hanleSelectAll"
         >
-          <el-table-column
-            type="selection"
-            align="left"
-            width="50"
-          ></el-table-column>
+          <el-table-column type="selection" align="left" width="50"></el-table-column>
           <!--          <el-table-column type="selection" align="left" />-->
           <!-- <el-table-column
             align="left"
@@ -178,91 +122,38 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column> -->
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialNumber" />
               <span>{{ scope.row.materialNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品编码"
-            prop="materialOldNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialOldNumber" />
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品名称"
-            prop="materialName"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品名称" prop="materialName" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="规格型号"
-            prop="specification"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.specification" />
               <span>{{ scope.row.specification }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="销售类型"
-            prop="saleTypeName"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="unit"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="数量下限"
-            prop="qty"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="返利类型(钱包)"
-            prop="wallets"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="单位" prop="unit" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="数量下限" prop="qty" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="返利类型(钱包)" prop="wallets" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <template v-for="(item, index) in scope.row.wallets">
                 <template v-if="item.type === 'REBATE'">
-                  <el-tag
-                    :key="index"
-                    type="success"
-                    style="margin: 0 10px"
-                    size="mini"
-                  >
+                  <el-tag :key="index" type="success" style="margin: 0 10px" size="mini">
                     {{ item.walletName }}
                   </el-tag>
                 </template>
@@ -279,82 +170,31 @@
             <template slot-scope="scope">
               <template v-for="(item, index) in scope.row.wallets">
                 <template v-if="item.type === 'COMMONLY'">
-                  <el-tag
-                    :key="index"
-                    type="success"
-                    style="margin: 0 10px"
-                    size="mini"
-                  >
+                  <el-tag :key="index" type="success" style="margin: 0 10px" size="mini">
                     {{ item.walletName }}
                   </el-tag>
                 </template>
               </template>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="生效日期"
-            prop="startDate"
-            min-width="160"
-            show-overflow-tooltip
-          />
+          <el-table-column align="left" label="生效日期" prop="startDate" min-width="160" show-overflow-tooltip />
 
-          <el-table-column
-            align="left"
-            label="失效日期"
-            prop="endDate"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="是否销价"
-            prop="isPromote"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="失效日期" prop="endDate" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="是否销价" prop="isPromote" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-tag size="mini" v-if="scope.row.isPromote" type="success"
-                >是</el-tag
-              >
+              <el-tag size="mini" v-if="scope.row.isPromote" type="success">是</el-tag>
               <el-tag size="mini" v-else type="danger">否</el-tag>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="是否作废"
-            prop="isRevoke"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="是否作废" prop="isRevoke" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-tag size="mini" v-if="scope.row.isRevoke" type="success"
-                >是</el-tag
-              >
+              <el-tag size="mini" v-if="scope.row.isRevoke" type="success">是</el-tag>
               <el-tag size="mini" v-else type="danger">否</el-tag>
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="批发价1"
-            prop="batchPrice"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="right"
-            label="格力折扣"
-            prop="discAmount"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="备注"
-            prop="remark"
-            min-width="160"
-            show-overflow-tooltip
-          />
+          <el-table-column align="right" label="批发价1" prop="batchPrice" min-width="160" show-overflow-tooltip />
+          <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
           <el-table-column fixed="left" width="150" label="操作" align="center">
             <template slot-scope="scope">
               <el-popconfirm
@@ -363,9 +203,7 @@
                 title="作废吗?"
                 @onConfirm="handleRevoke(scope.row.id)"
               >
-                <el-button slot="reference" type="text" size="mini"
-                  >作废</el-button
-                >
+                <el-button slot="reference" type="text" size="mini">作废</el-button>
               </el-popconfirm>
 
               <el-button
@@ -396,14 +234,9 @@
 </template>
 
 <script>
-import Mixin from "@/mixin/index";
-import {
-  getProductDelete,
-  getProductPriceList,
-  getTypeList,
-  handlePriceRevoke,
-} from "@/api/basic_data/material";
-import { getCategoryList } from "@/api/common";
+import Mixin from '@/mixin/index'
+import { getProductDelete, getProductPriceList, getTypeList, handlePriceRevoke } from '@/api/basic_data/material'
+import { getCategoryList } from '@/api/common'
 
 export default {
   mixins: [Mixin],
@@ -414,42 +247,42 @@ export default {
       listTotal: 0, // 列表总数
       dataList: [],
       screenForm: {
-        k3CategoryNumber: "",
-        endDate: "",
-        materialName: "",
-        materialNumber: "",
-        materialOldNumber: "",
-        saleTypeId: "",
-        specification: "",
-        startDate: "",
-        remark: "",
+        k3CategoryNumber: '',
+        endDate: '',
+        materialName: '',
+        materialNumber: '',
+        materialOldNumber: '',
+        saleTypeId: '',
+        specification: '',
+        startDate: '',
+        remark: ''
       },
       ztypeList: [],
       dictList: {},
-      isCollapse: true,
-    };
+      isCollapse: true
+    }
   },
   mounted() {
-    getCategoryList({ pageNum: 1, pageSize: -1 }).then((res) => {
-      this.dictList = res.data.records;
-      console.log(this.dictList, 777777);
-    });
+    getCategoryList({ pageNum: 1, pageSize: -1 }).then(res => {
+      this.dictList = res.data.records
+      console.log(this.dictList, 777777)
+    })
   },
   methods: {
     addFn() {
-      this.showDialogForm = true;
+      this.showDialogForm = true
     },
 
     handleDelete(id) {
-      this.hanleDeleteAllPromise(id).then((ids) => {
-        getProductDelete(ids).then((res) => {
-          this.$successMsg("删除成功");
-          this.getList();
-        });
-      });
+      this.hanleDeleteAllPromise(id).then(ids => {
+        getProductDelete(ids).then(res => {
+          this.$successMsg('删除成功')
+          this.getList()
+        })
+      })
     },
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
@@ -461,44 +294,44 @@ export default {
         saleTypeId: this.screenForm.saleTypeId,
         specification: this.screenForm.specification,
         startDate: this.screenForm.startDate,
-        remark: this.screenForm.remark,
-      };
-      getProductPriceList(params).then((res) => {
-        this.dataList = res.data.records;
-        console.log(res.data.records);
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
-      getTypeList({ ...params, pageNum: 1, pageSize: -1 }).then((res) => {
-        this.ztypeList = res.data.records;
+        remark: this.screenForm.remark
+      }
+      getProductPriceList(params).then(res => {
+        this.dataList = res.data.records
+        console.log(res.data.records)
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
+      getTypeList({ ...params, pageNum: 1, pageSize: -1 }).then(res => {
+        this.ztypeList = res.data.records
         // console.log(this.ztypeList, "type1111");
-      });
+      })
     },
     handleRevoke(id) {
-      handlePriceRevoke({ ids: id }).then((res) => {
-        this.$successMsg("操作成功");
-        this.getList();
-      });
+      handlePriceRevoke({ ids: id }).then(res => {
+        this.$successMsg('操作成功')
+        this.getList()
+      })
     },
     handleRevokeAll() {
       if (this.ids.length) {
-        handlePriceRevoke({ ids: this.ids.join("") }).then((res) => {
-          this.$successMsg("操作成功");
-          this.getList();
-        });
+        handlePriceRevoke({ ids: this.ids.join('') }).then(res => {
+          this.$successMsg('操作成功')
+          this.getList()
+        })
       } else {
-        this.$errorMsg("请选择");
+        this.$errorMsg('请选择')
       }
     },
     tableRowClassName({ row, rowIndex }) {
       // || row.examineStatus=='FAIL'
       if (this.ids.includes(row.id)) {
-        return "warning-row";
+        return 'warning-row'
       }
-      return "";
-    },
-  },
-};
+      return ''
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 139 - 247
src/views/basic_data/stock/Issue_list.vue

@@ -5,92 +5,72 @@
     <div class="screen-container">
       <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
         <template #right_btn>
-
           <el-button size="mini" @click="resetScreenForm">清空</el-button>
-              <el-button size="mini" type="primary" @click="submitScreenForm"
-                >搜索</el-button
-              >
-
+          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
         </template>
         <template #search>
-          <el-form
-        ref="screenForm"
-        :model="screenForm"
-        label-width="70px"
-        size="mini"
-        label-position="left"
-      >
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据编号" prop="billNo">
-              <el-input
-                v-model="screenForm.billNo"
-                placeholder="请输入单据编号"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品名称" prop="materialName">
-              <el-input
-                v-model="screenForm.materialName"
-                placeholder="请输入产品名称"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="物料编码" prop="materialNumber">
-              <el-input
-                v-model="screenForm.materialNumber"
-                placeholder="请输入物料编码"
-              />
-            </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-form-item>
-          </el-col>
-          <!--          <el-col :xs="24" :sm="12" :lg="6">-->
-          <!--            <el-form-item label="货主" prop="company">-->
-          <!--              <el-input-->
-          <!--                v-model="screenForm.company"-->
-          <!--                placeholder="请输入供货单位"-->
-          <!--              />-->
-          <!--            </el-form-item>-->
-          <!--          </el-col>-->
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="correspondId">
-              <el-select
-                v-model="screenForm.correspondId"
-                multiple
-                style="width: 100%"
-                placeholder="请选择仓库"
-                size="mini"
-                filterable
-                clearable
-              >
-                <el-option
-                  v-for="(item, index) in warehouseList"
-                  :key="index"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-      </el-form> </template>
+          <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="单据编号" prop="billNo">
+                  <el-input v-model="screenForm.billNo" placeholder="请输入单据编号" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="产品名称" prop="materialName">
+                  <el-input v-model="screenForm.materialName" placeholder="请输入产品名称" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="物料编码" prop="materialNumber">
+                  <el-input v-model="screenForm.materialNumber" placeholder="请输入物料编码" />
+                </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-form-item>
+              </el-col>
+              <!--          <el-col :xs="24" :sm="12" :lg="6">-->
+              <!--            <el-form-item label="货主" prop="company">-->
+              <!--              <el-input-->
+              <!--                v-model="screenForm.company"-->
+              <!--                placeholder="请输入供货单位"-->
+              <!--              />-->
+              <!--            </el-form-item>-->
+              <!--          </el-col>-->
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="仓库" prop="correspondId">
+                  <el-select
+                    v-model="screenForm.correspondId"
+                    multiple
+                    style="width: 100%"
+                    placeholder="请选择仓库"
+                    size="mini"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in warehouseList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </template>
       </Collapse>
-
     </div>
     <div class="mymain-container">
       <div class="btn-group clearfix">
@@ -113,154 +93,69 @@
           show-summary
           :summary-method="$getSummaries"
         >
-          <el-table-column
-            label="序号"
-            align="left"
-            width="50"
-            type="index"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column label="序号" align="left" width="50" type="index" show-overflow-tooltip></el-table-column>
 
-          <el-table-column
-            align="left"
-            label="单据编号"
-            prop="billNo"
-            min-width="130"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单据编号" prop="billNo" min-width="130" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.billNo" />
               <span>{{ scope.row.billNo }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="库存方向"
-            prop="stockId"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="库存方向" prop="stockId" min-width="100" show-overflow-tooltip>
             <template v-slot="scope">
-              {{ "普通" }}
+              {{ '普通' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="退料日期"
-            prop="fdate"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="退料日期" prop="fdate" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.fdate | dateToDayFilter }}
             </template>
           </el-table-column>
 
-          <el-table-column
-            align="left"
-            label="单据状态"
-            prop="fdDocumentStatus"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单据状态" prop="fdDocumentStatus" min-width="120" show-overflow-tooltip>
             <template v-slot="scope">
-              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
+              {{ scope.row.fdDocumentStatus === 'C' ? '已审核' : '' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="入库类型"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="入库类型" min-width="100" show-overflow-tooltip>
             <template v-slot="scope">
-              {{ "其他入库" }}
+              {{ '其他入库' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品编码"
-            prop="materialOldNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialOldNumber" />
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialNumber" />
               <span>{{ scope.row.materialNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品名称"
-            prop="materialName"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品名称" prop="materialName" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="规格型号"
-            prop="specification"
-            min-width="300"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="300" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.specification" />
               <span>{{ scope.row.specification }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="实收数量"
-            prop="qty"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="实收数量" prop="qty" min-width="100" show-overflow-tooltip>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="收货仓库"
-            prop="stockName"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="收货仓库" prop="stockName" min-width="100" show-overflow-tooltip>
           </el-table-column>
 
-          <el-table-column
-            align="center"
-            label="操作"
-            width="100"
-            fixed="right"
-          >
+          <el-table-column align="center" label="操作" width="100" fixed="right">
             <template slot-scope="scope">
-              <el-popconfirm
-                title="弃审吗?"
-                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
-              >
+              <el-popconfirm title="弃审吗?" @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)">
                 <el-button slot="reference" type="text">弃审</el-button>
               </el-popconfirm>
             </template>
@@ -285,14 +180,11 @@
 </template>
 
 <script>
-import {
-  getOtherStockInList,
-  setApprovalPurchaseOrderIn,
-} from "@/api/supply/purchase";
-import { getWarehouseList } from "@/api/supply/apply";
+import { getOtherStockInList, setApprovalPurchaseOrderIn } from '@/api/supply/purchase'
+import { getWarehouseList } from '@/api/supply/apply'
 
 export default {
-  name: "MaterialList",
+  name: 'MaterialList',
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -301,41 +193,41 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: {
-        billNo: "",
+        billNo: '',
         correspondId: [],
-        endTime: "",
-        materialName: "",
-        date: "",
-        materialNumber: "",
-        materialOldNumber: "",
-        specification: "",
-        startTime: "",
+        endTime: '',
+        materialName: '',
+        date: '',
+        materialNumber: '',
+        materialOldNumber: '',
+        specification: '',
+        startTime: ''
       },
       isCollapse: true,
-      warehouseList: [],
-    };
+      warehouseList: []
+    }
   },
   computed: {
     exParams() {
       return {
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-      };
+        startTime: this.screenForm.date ? this.screenForm.date[0] : ''
+      }
     },
     isShowDetail() {
       // eslint-disable-next-line no-prototype-builtins
-      return this.queryItem.hasOwnProperty("id");
-    },
+      return this.queryItem.hasOwnProperty('id')
+    }
   },
   created() {
-    this.getWarehouseList();
-    this.getList();
+    this.getWarehouseList()
+    this.getList()
   },
   methods: {
     // 查询按钮权限
@@ -344,86 +236,86 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0;
-      return true;
+      return true
     },
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
     },
     handleUnapprove(id, billNo) {
-      setApprovalPurchaseOrderIn({ id, billNo }).then((res) => {
-        this.$successMsg("弃审成功");
-        this.getList();
-      });
+      setApprovalPurchaseOrderIn({ id, billNo }).then(res => {
+        this.$successMsg('弃审成功')
+        this.getList()
+      })
     },
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-      };
-      getOtherStockInList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["auxUnitQty"];
-          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        startTime: this.screenForm.date ? this.screenForm.date[0] : ''
+      }
+      getOtherStockInList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['auxUnitQty']
+          item.sums2 = ['taxPrice', 'amount', 'entryTaxAmount', 'allAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
+      this.queryItem = item
     },
 
     backList() {
-      this.queryItem = {};
-    },
-  },
-};
+      this.queryItem = {}
+    }
+  }
+}
 </script>
 
 <style scoped></style>

+ 136 - 241
src/views/basic_data/stock/material_list.vue

@@ -6,90 +6,68 @@
       <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
         <template #right_btn>
           <el-button size="mini" @click="resetScreenForm">清空</el-button>
-              <el-button size="mini" type="primary" @click="submitScreenForm"
-                >搜索</el-button
-              >
+          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
         </template>
         <template #search>
-          <el-form
-        ref="screenForm"
-        :model="screenForm"
-        label-width="70px"
-        size="mini"
-        label-position="left"
-      >
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据编号" prop="billNo">
-              <el-input
-                v-model="screenForm.billNo"
-                placeholder="请输入单据编号"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品名称" prop="materialName">
-              <el-input
-                v-model="screenForm.materialName"
-                placeholder="请输入产品名称"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="物料编码" prop="materialNumber">
-              <el-input
-                v-model="screenForm.materialNumber"
-                placeholder="请输入物料编码"
-              />
-            </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-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="供应商" prop="supplierName">
-              <el-input
-                v-model="screenForm.supplierName"
-                placeholder="请输入供货单位"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="correspondId">
-              <el-select
-                v-model="screenForm.correspondId"
-                multiple
-                style="width: 100%"
-                placeholder="请选择仓库"
-                size="mini"
-                filterable
-                clearable
-              >
-                <el-option
-                  v-for="(item, index) in warehouseList"
-                  :key="index"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-      </el-form>
-     </template>
+          <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="单据编号" prop="billNo">
+                  <el-input v-model="screenForm.billNo" placeholder="请输入单据编号" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="产品名称" prop="materialName">
+                  <el-input v-model="screenForm.materialName" placeholder="请输入产品名称" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="物料编码" prop="materialNumber">
+                  <el-input v-model="screenForm.materialNumber" placeholder="请输入物料编码" />
+                </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-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="供应商" prop="supplierName">
+                  <el-input v-model="screenForm.supplierName" placeholder="请输入供货单位" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="仓库" prop="correspondId">
+                  <el-select
+                    v-model="screenForm.correspondId"
+                    multiple
+                    style="width: 100%"
+                    placeholder="请选择仓库"
+                    size="mini"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in warehouseList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </template>
       </Collapse>
-
     </div>
     <div class="mymain-container">
       <!--      <div class="btn-group clearfix">-->
@@ -110,122 +88,50 @@
           highlight-current-row
           stripe
         >
-          <el-table-column
-            label="序号"
-            align="left"
-            width="50"
-            type="index"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column label="序号" align="left" width="50" type="index" show-overflow-tooltip></el-table-column>
 
-          <el-table-column
-            align="left"
-            label="单据编号"
-            prop="billNo"
-            min-width="130"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单据编号" prop="billNo" min-width="130" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.billNo" />
               <span>{{ scope.row.billNo }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="退料日期"
-            prop="fdate"
-            min-width="150"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="退料日期" prop="fdate" min-width="150" show-overflow-tooltip>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="供货商"
-            prop="supplierName"
-            min-width="200"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="单据状态"
-            prop="fdDocumentStatus"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="供货商" prop="supplierName" min-width="200" show-overflow-tooltip />
+          <el-table-column align="left" label="单据状态" prop="fdDocumentStatus" min-width="120" show-overflow-tooltip>
             <template v-slot="scope">
-              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
+              {{ scope.row.fdDocumentStatus === 'C' ? '已审核' : '' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品编码"
-            prop="materialOldNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialOldNumber" />
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialNumber" />
               <span>{{ scope.row.materialNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品名称"
-            prop="materialName"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品名称" prop="materialName" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="规格型号"
-            prop="materialName"
-            min-width="300"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="规格型号" prop="materialName" min-width="300" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="库存单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="库存单位" prop="unit" min-width="100" show-overflow-tooltip>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="实退数量"
-            prop="qty"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="right"
-            label="仓库"
-            prop="stockName"
-            min-width="100"
-            show-overflow-tooltip
-          />
+          <el-table-column align="right" label="实退数量" prop="qty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="right" label="仓库" prop="stockName" min-width="100" show-overflow-tooltip />
           <!--          <el-table-column-->
           <!--            align="right"-->
           <!--            label="开票状态"-->
@@ -237,17 +143,9 @@
           <!--              {{ scope.row.taxPrice | numToFixed }}-->
           <!--            </template>-->
           <!--          </el-table-column>-->
-          <el-table-column
-            align="center"
-            label="操作"
-            width="100"
-            fixed="right"
-          >
+          <el-table-column align="center" label="操作" width="100" fixed="right">
             <template slot-scope="scope">
-              <el-popconfirm
-                title="弃审吗?"
-                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
-              >
+              <el-popconfirm title="弃审吗?" @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)">
                 <el-button slot="reference" type="text">弃审</el-button>
               </el-popconfirm>
             </template>
@@ -272,14 +170,11 @@
 </template>
 
 <script>
-import {
-  getPurchaseOutList,
-  setApprovalPurchaseOrderOut,
-} from "@/api/supply/purchase";
-import { getWarehouseList } from "@/api/supply/apply";
+import { getPurchaseOutList, setApprovalPurchaseOrderOut } from '@/api/supply/purchase'
+import { getWarehouseList } from '@/api/supply/apply'
 
 export default {
-  name: "MaterialList",
+  name: 'MaterialList',
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -288,43 +183,43 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: {
-        billNo: "",
+        billNo: '',
         correspondId: [],
-        endTime: "",
-        date: "",
-        materialName: "",
-        materialNumber: "",
-        materialOldNumber: "",
-        specification: "",
-        startTime: "",
-        supplierName: "",
+        endTime: '',
+        date: '',
+        materialName: '',
+        materialNumber: '',
+        materialOldNumber: '',
+        specification: '',
+        startTime: '',
+        supplierName: ''
       },
       isCollapse: true,
-      warehouseList: [],
-    };
+      warehouseList: []
+    }
   },
   computed: {
     exParams() {
       return {
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-        supplierName: this.screenForm.supplierName,
-      };
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        supplierName: this.screenForm.supplierName
+      }
     },
     isShowDetail() {
       // eslint-disable-next-line no-prototype-builtins
-      return this.queryItem.hasOwnProperty("id");
-    },
+      return this.queryItem.hasOwnProperty('id')
+    }
   },
   created() {
-    this.getWarehouseList();
-    this.getList();
+    this.getWarehouseList()
+    this.getList()
   },
   methods: {
     // 查询按钮权限
@@ -333,87 +228,87 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0;
-      return true;
+      return true
     },
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
     },
     handleUnapprove(id, billNo) {
-      setApprovalPurchaseOrderOut({ id, billNo }).then((res) => {
-        this.$successMsg("弃审成功");
-        this.getList();
-      });
+      setApprovalPurchaseOrderOut({ id, billNo }).then(res => {
+        this.$successMsg('弃审成功')
+        this.getList()
+      })
     },
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-        supplierName: this.screenForm.supplierName,
-      };
-      getPurchaseOutList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["auxUnitQty"];
-          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        supplierName: this.screenForm.supplierName
+      }
+      getPurchaseOutList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['auxUnitQty']
+          item.sums2 = ['taxPrice', 'amount', 'entryTaxAmount', 'allAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
+      this.queryItem = item
     },
 
     backList() {
-      this.queryItem = {};
-    },
-  },
-};
+      this.queryItem = {}
+    }
+  }
+}
 </script>
 
 <style scoped></style>

+ 69 - 89
src/views/basic_data/stock/product_list.vue

@@ -8,81 +8,79 @@
           <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
         </template>
         <template #search>
-      <el-form
-        ref="screenForm"
-        :model="screenForm"
-        label-width="90px"
-        size="mini"
-        label-position="left"
-      >
-        <el-row :gutter="20">
+          <el-form ref="screenForm" :model="screenForm" label-width="90px" size="mini" label-position="left">
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="物料代码" prop="materialNumber">
+                  <el-input v-model="screenForm.materialNumber" placeholder="请输入物料代码" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="产品编码" prop="materialOldNumber">
+                  <el-input v-model="screenForm.materialOldNumber" placeholder="请输入产品编码" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="产品名称" prop="materialName">
+                  <el-input v-model="screenForm.materialName" placeholder="请输入产品名称" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="规格型号" prop="specification">
+                  <el-input v-model="screenForm.specification" placeholder="请输入产品名称" />
+                </el-form-item>
+              </el-col>
 
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="物料代码" prop="materialNumber">
-              <el-input
-                v-model="screenForm.materialNumber"
-                placeholder="请输入物料代码"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品编码" prop="materialOldNumber">
-              <el-input
-                v-model="screenForm.materialOldNumber"
-                placeholder="请输入产品编码"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品名称" prop="materialName">
-              <el-input
-                v-model="screenForm.materialName"
-                placeholder="请输入产品名称"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="规格型号" prop="specification">
-              <el-input
-                v-model="screenForm.specification"
-                placeholder="请输入产品名称"
-              />
-            </el-form-item>
-          </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="仓库" prop="correspondId">
+                  <el-select
+                    v-model="screenForm.correspondId"
+                    multiple
+                    style="width: 100%"
+                    placeholder="请选择仓库"
+                    size="mini"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in warehouseList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="存货类别" prop="categoryId">
+                  <el-select
+                    v-model="screenForm.categoryId"
+                    style="width: 100%"
+                    placeholder="选择存货类别"
+                    filterable
+                    clearable
+                    multiple
+                  >
+                    <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.id" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
 
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="correspondId">
-              <el-select v-model="screenForm.correspondId" multiple style="width: 100%" placeholder="请选择仓库" size="mini" filterable clearable>
-                <el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name" :value="item.id" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="存货类别" prop="categoryId">
-              <el-select v-model="screenForm.categoryId" style="width: 100%" placeholder="选择存货类别" filterable clearable multiple>
-                <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.id" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-
-          <el-col :xs="24" :sm="12" :lg="12" class="tr">
-            <el-form-item>
-              <el-button @click="resetScreenForm">清空</el-button>
-              <el-button type="primary" @click="submitScreenForm">搜索</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      </template>
+              <el-col :xs="24" :sm="12" :lg="12" class="tr">
+                <el-form-item>
+                  <el-button @click="resetScreenForm">清空</el-button>
+                  <el-button type="primary" @click="submitScreenForm">搜索</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </template>
       </Collapse>
     </div>
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div>
-          <ExportButton
-            :ex-url="'/stock/manager/exportStockToDay'"
-            :ex-params="exParams"
-          />
+          <ExportButton :ex-url="'/stock/manager/exportStockToDay'" :ex-params="exParams" />
         </div>
       </div>
       <div class="table">
@@ -95,27 +93,9 @@
           highlight-current-row
           stripe
         >
-          <el-table-column
-            align="left"
-            label="仓库"
-            prop="correspondName"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="存货类别"
-            prop="categoryName"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="物料代码"
-            prop="materialNumber"
-            min-width="150"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="存货类别" prop="categoryName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="物料代码" prop="materialNumber" min-width="150" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialNumber" />
               <span>{{ scope.row.materialNumber }}</span>

+ 140 - 246
src/views/basic_data/stock/warehousing_list.vue

@@ -6,88 +6,71 @@
       <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
         <template #right_btn>
           <el-button size="mini" @click="resetScreenForm">清空</el-button>
-              <el-button size="mini" type="primary" @click="submitScreenForm"
-                >搜索</el-button
-              >
+          <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
+        </template>
+        <template #search>
+          <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="单据编号" prop="billNo">
+                  <el-input v-model="screenForm.billNo" placeholder="请输入单据编号" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="产品名称" prop="materialName">
+                  <el-input v-model="screenForm.materialName" placeholder="请输入产品名称" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="物料编码" prop="materialNumber">
+                  <el-input v-model="screenForm.materialNumber" placeholder="请输入物料编码" />
+                </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-form-item>
+              </el-col>
+              <!--          <el-col :xs="24" :sm="12" :lg="6">-->
+              <!--            <el-form-item label="货主" prop="company">-->
+              <!--              <el-input-->
+              <!--                v-model="screenForm.company"-->
+              <!--                placeholder="请输入供货单位"-->
+              <!--              />-->
+              <!--            </el-form-item>-->
+              <!--          </el-col>-->
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="仓库" prop="correspondId">
+                  <el-select
+                    v-model="screenForm.correspondId"
+                    multiple
+                    style="width: 100%"
+                    placeholder="请选择仓库"
+                    size="mini"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in warehouseList"
+                      :key="index"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
         </template>
-        <template #search>  <el-form
-        ref="screenForm"
-        :model="screenForm"
-        label-width="70px"
-        size="mini"
-        label-position="left"
-      >
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据编号" prop="billNo">
-              <el-input
-                v-model="screenForm.billNo"
-                placeholder="请输入单据编号"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品名称" prop="materialName">
-              <el-input
-                v-model="screenForm.materialName"
-                placeholder="请输入产品名称"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="物料编码" prop="materialNumber">
-              <el-input
-                v-model="screenForm.materialNumber"
-                placeholder="请输入物料编码"
-              />
-            </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-form-item>
-          </el-col>
-          <!--          <el-col :xs="24" :sm="12" :lg="6">-->
-          <!--            <el-form-item label="货主" prop="company">-->
-          <!--              <el-input-->
-          <!--                v-model="screenForm.company"-->
-          <!--                placeholder="请输入供货单位"-->
-          <!--              />-->
-          <!--            </el-form-item>-->
-          <!--          </el-col>-->
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="correspondId">
-              <el-select
-                v-model="screenForm.correspondId"
-                multiple
-                style="width: 100%"
-                placeholder="请选择仓库"
-                size="mini"
-                filterable
-                clearable
-              >
-                <el-option
-                  v-for="(item, index) in warehouseList"
-                  :key="index"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-      </el-form> </template>
       </Collapse>
-
     </div>
     <div class="mymain-container">
       <div class="btn-group clearfix">
@@ -110,131 +93,53 @@
           show-summary
           :summary-method="$getSummaries"
         >
-          <el-table-column
-            label="序号"
-            align="left"
-            width="50"
-            type="index"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column label="序号" align="left" width="50" type="index" show-overflow-tooltip></el-table-column>
 
-          <el-table-column
-            align="left"
-            label="库存方向"
-            prop="billNo"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="库存方向" prop="billNo" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{ "普通" }}
+              {{ '普通' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="单据状态"
-            prop="fdDocumentStatus"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单据状态" prop="fdDocumentStatus" min-width="120" show-overflow-tooltip>
             <template v-slot="scope">
-              {{ scope.row.fdDocumentStatus === "C" ? "已审核" : "" }}
+              {{ scope.row.fdDocumentStatus === 'C' ? '已审核' : '' }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="业务类型"
-            prop="fdate"
-            min-width="120"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="业务类型" prop="fdate" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{ "物料领用" }}
+              {{ '物料领用' }}
             </template>
           </el-table-column>
 
-          <el-table-column
-            align="left"
-            label="单据编号"
-            prop="billNo"
-            min-width="200"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="日期"
-            prop="fdate"
-            min-width="150"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="产品编码"
-            prop="materialOldNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单据编号" prop="billNo" min-width="200" show-overflow-tooltip />
+          <el-table-column align="left" label="日期" prop="fdate" min-width="150" show-overflow-tooltip />
+          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialOldNumber" />
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialNumber" />
               <span>{{ scope.row.materialNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品名称"
-            prop="materialOldNumber"
-            min-width="200"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品名称" prop="materialOldNumber" min-width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="规格型号"
-            prop="specification"
-            min-width="300"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="300" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.specification" />
               <span>{{ scope.row.specification }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="实发数量"
-            prop="qty"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="发货仓库"
-            prop="stockName"
-            min-width="100"
-            show-overflow-tooltip
-          />
+          <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="实发数量" prop="qty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="发货仓库" prop="stockName" min-width="100" show-overflow-tooltip />
           <!--          <el-table-column-->
           <!--            align="left"-->
           <!--            label="货主"-->
@@ -242,17 +147,9 @@
           <!--            min-width="100"-->
           <!--            show-overflow-tooltip-->
           <!--          />-->
-          <el-table-column
-            align="center"
-            label="操作"
-            width="100"
-            fixed="right"
-          >
+          <el-table-column align="center" label="操作" width="100" fixed="right">
             <template slot-scope="scope">
-              <el-popconfirm
-                title="弃审吗?"
-                @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)"
-              >
+              <el-popconfirm title="弃审吗?" @onConfirm="handleUnapprove(scope.row.id, scope.row.billNo)">
                 <el-button slot="reference" type="text">弃审</el-button>
               </el-popconfirm>
             </template>
@@ -277,14 +174,11 @@
 </template>
 
 <script>
-import {
-  getOtherStockOutList,
-  setApprovalOtherStockOut,
-} from "@/api/supply/purchase";
-import { getWarehouseList } from "@/api/supply/apply";
+import { getOtherStockOutList, setApprovalOtherStockOut } from '@/api/supply/purchase'
+import { getWarehouseList } from '@/api/supply/apply'
 
 export default {
-  name: "MaterialList",
+  name: 'MaterialList',
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -293,41 +187,41 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: {
-        billNo: "",
+        billNo: '',
         correspondId: [],
-        endTime: "",
-        date: "",
-        materialName: "",
-        materialNumber: "",
-        materialOldNumber: "",
-        specification: "",
-        startTime: "",
+        endTime: '',
+        date: '',
+        materialName: '',
+        materialNumber: '',
+        materialOldNumber: '',
+        specification: '',
+        startTime: ''
       },
       isCollapse: true,
-      warehouseList: [],
-    };
+      warehouseList: []
+    }
   },
   computed: {
     exParams() {
       return {
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-      };
+        startTime: this.screenForm.date ? this.screenForm.date[0] : ''
+      }
     },
     isShowDetail() {
       // eslint-disable-next-line no-prototype-builtins
-      return this.queryItem.hasOwnProperty("id");
-    },
+      return this.queryItem.hasOwnProperty('id')
+    }
   },
   created() {
-    this.getWarehouseList();
-    this.getList();
+    this.getWarehouseList()
+    this.getList()
   },
   methods: {
     // 查询按钮权限
@@ -336,86 +230,86 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0;
-      return true;
+      return true
     },
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
     },
     handleUnapprove(id, billNo) {
-      setApprovalOtherStockOut({ id, billNo }).then((res) => {
-        this.$successMsg("弃审成功");
-        this.getList();
-      });
+      setApprovalOtherStockOut({ id, billNo }).then(res => {
+        this.$successMsg('弃审成功')
+        this.getList()
+      })
     },
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         billNo: this.screenForm.billNo,
-        correspondId: this.screenForm.correspondId.join(","),
-        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        correspondId: this.screenForm.correspondId.join(','),
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         materialName: this.screenForm.materialName,
         materialNumber: this.screenForm.materialNumber,
         materialOldNumber: this.screenForm.materialOldNumber,
         specification: this.screenForm.specification,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
-      };
-      getOtherStockOutList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["auxUnitQty"];
-          item.sums2 = ["taxPrice", "amount", "entryTaxAmount", "allAmount"];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        startTime: this.screenForm.date ? this.screenForm.date[0] : ''
+      }
+      getOtherStockOutList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['auxUnitQty']
+          item.sums2 = ['taxPrice', 'amount', 'entryTaxAmount', 'allAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
+      this.queryItem = item
     },
 
     backList() {
-      this.queryItem = {};
-    },
-  },
-};
+      this.queryItem = {}
+    }
+  }
+}
 </script>
 
 <style scoped></style>

+ 2 - 2
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -231,7 +231,7 @@
                 class="inpt"
                 size="mini"
                 clearable
-                @blur="setDataQty($event,scope.row)"
+                @blur="setDataQty($event, scope.row)"
               />
             </template>
           </el-table-column>
@@ -545,7 +545,7 @@ export default {
       applyDeposit({
         ...this.details,
         dataList: [...arr, ...this.details.dataList]
-      }).then((res) => {
+      }).then(res => {
         this.$successMsg('申请成功')
         this.$parent.showPage = 1
         this.$parent.deduction = ''

+ 125 - 90
src/views/finance/change_apply.vue

@@ -13,7 +13,13 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="单据日期" prop="theTime">
-              <el-date-picker disabled class="dateStyle" placeholder="系统自动生成" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
+              <el-date-picker
+                disabled
+                class="dateStyle"
+                placeholder="系统自动生成"
+                type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -43,28 +49,53 @@
     <!-- 列表 -->
     <div class="mymain-container">
       <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 label="序号" type="index" align="left" width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <div v-if="scope.$index == 0">{{ searchForm.customerNumber }}</div>
               <div v-if="scope.$index == 1">{{ scope.row.customerNumber }}</div>
-
             </template>
           </el-table-column>
           <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
             <template slot-scope="scope">
               <div v-if="scope.$index == 0">{{ searchForm.customerName }}</div>
-              <el-select size="mini" class='dateStyle' @change="changeCustomerFn1($event, scope.$index, scope.row)" v-if="scope.$index == 1" filterable v-model="scope.row.customerId" placeholder="请选择">
-                <el-option v-for="item in customerData" :key="item.id" :label="item.name" :value="item.id">
-                </el-option>
+              <el-select
+                size="mini"
+                class="dateStyle"
+                @change="changeCustomerFn1($event, scope.$index, scope.row)"
+                v-if="scope.$index == 1"
+                filterable
+                v-model="scope.row.customerId"
+                placeholder="请选择"
+              >
+                <el-option v-for="item in customerData" :key="item.id" :label="item.name" :value="item.id"> </el-option>
               </el-select>
             </template>
           </el-table-column>
           <el-table-column align="left" label="返利类型" prop="name" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-select size="mini" filterable v-model="scope.row.name" placeholder="请选择" @click.native="changeCustomerFn(scope.row, scope.$index)">
-                <el-option v-for="item in scope.row.typeList" :key="item.customerWalletId" :label="item.name" :value="item.customerWalletId">
+              <el-select
+                size="mini"
+                filterable
+                v-model="scope.row.name"
+                placeholder="请选择"
+                @click.native="changeCustomerFn(scope.row, scope.$index)"
+              >
+                <el-option
+                  v-for="item in scope.row.typeList"
+                  :key="item.customerWalletId"
+                  :label="item.name"
+                  :value="item.customerWalletId"
+                >
                 </el-option>
               </el-select>
             </template>
@@ -77,8 +108,13 @@
           <el-table-column align="left" label="折让金额" prop="" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <div v-if="scope.$index == 0"></div>
-              <el-input v-if="scope.$index == 1" size="mini" type="number" @mousewheel.native.prevent v-model="scope.row.allowanceAmount"></el-input>
-
+              <el-input
+                v-if="scope.$index == 1"
+                size="mini"
+                type="number"
+                @mousewheel.native.prevent
+                v-model="scope.row.allowanceAmount"
+              ></el-input>
             </template>
           </el-table-column>
           <el-table-column align="left" label="备注" prop="" min-width="160" show-overflow-tooltip>
@@ -101,14 +137,14 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
+import { mapGetters } from 'vuex'
 import {
   getUserInfo,
   getWalletCustomerList,
   getTransferAdd,
   getTransferSubmit,
-  getCustomerGroupList,
-} from "@/api/finance/change_apply";
+  getCustomerGroupList
+} from '@/api/finance/change_apply'
 
 export default {
   data() {
@@ -116,29 +152,29 @@ export default {
       listLoading: false, // 列表加载loading
       dataList: [
         {
-          customerNumber: "",
-          customerId: "",
-          name: "",
-          money: "",
-          bz: "",
+          customerNumber: '',
+          customerId: '',
+          name: '',
+          money: '',
+          bz: ''
         },
         {
-          customerNumber: "",
-          customerId: "",
-          name: "",
-          money: "",
-          bz: "",
-          allowanceAmount: "",
-        },
+          customerNumber: '',
+          customerId: '',
+          name: '',
+          money: '',
+          bz: '',
+          allowanceAmount: ''
+        }
       ],
       searchForm: {
-        customerId: "",
-        customerName: "",
-        nickName: "",
-        customerNumber: "",
+        customerId: '',
+        customerName: '',
+        nickName: '',
+        customerNumber: ''
       },
       customerData: [], //经销商数据
-      typeList: [], //返利类型数据
+      typeList: [] //返利类型数据
       // rules: {
       //   theTime: [
       //     {
@@ -148,14 +184,14 @@ export default {
       //     },
       //   ],
       // },
-    };
+    }
   },
   computed: {
-    ...mapGetters(["userid"]),
+    ...mapGetters(['userid'])
   },
   created() {
-    this.getUserInfoFn();
-    this.getCustomerData();
+    this.getUserInfoFn()
+    this.getCustomerData()
   },
   methods: {
     //选择经销商名称事件
@@ -165,13 +201,13 @@ export default {
 
       const res = await getWalletCustomerList({
         customerId: v,
-        type: "REBATE",
-      });
+        type: 'REBATE'
+      })
       // console.log(res, 7878);
-      const res2 = this.customerData.filter((i) => i.id == v);
+      const res2 = this.customerData.filter(i => i.id == v)
       // console.log(res2, 8888);
 
-      this.$set(this.dataList[1], "customerNumber", res2[0].number);
+      this.$set(this.dataList[1], 'customerNumber', res2[0].number)
       // this.$set(this.dataList[index], "customerName", res2[0].name);
 
       // this.$set(this.dataList[index], "walletList", res.data);
@@ -192,29 +228,29 @@ export default {
 
     resetFn() {
       // this.searchForm.theTime = null;
-      this.dataList.forEach((v) => {
-        v.money = "";
-        v.bz = "";
-        v.name = "";
-      });
-      this.dataList[1].customerId = "";
-      this.dataList[1].customerNumber = "";
-      this.dataList[1].allowanceAmount = "";
+      this.dataList.forEach(v => {
+        v.money = ''
+        v.bz = ''
+        v.name = ''
+      })
+      this.dataList[1].customerId = ''
+      this.dataList[1].customerNumber = ''
+      this.dataList[1].allowanceAmount = ''
     },
 
     // //返利类型数据
     async changeCustomerFn(v, index) {
-      if (v.customerId == "") {
-        return;
+      if (v.customerId == '') {
+        return
       }
 
-      v.name = "";
+      v.name = ''
       let res = await getWalletCustomerList({
         customerId: v.customerId,
-        type: "REBATE",
-      });
+        type: 'REBATE'
+      })
 
-      this.$set(this.dataList[index], "typeList", res.data);
+      this.$set(this.dataList[index], 'typeList', res.data)
 
       // if (index == 1) {
       //   let aa = res.data.filter(
@@ -237,9 +273,9 @@ export default {
 
     //查询同个集团的经销商数据
     async getCustomerData() {
-      const res = await getCustomerGroupList();
+      const res = await getCustomerGroupList()
       // console.log(res, 123214);
-      this.customerData = res.data;
+      this.customerData = res.data
     },
 
     //保存
@@ -250,41 +286,40 @@ export default {
       // let receiverRemark;
       // let amount;
 
-      await this.$refs.searchForm.validate();
+      await this.$refs.searchForm.validate()
 
-      let aaa = this.dataList.find((v) => {
-        if (v.money == "") {
-          this.$message.error("请输入返利金额");
-          return v;
+      let aaa = this.dataList.find(v => {
+        if (v.money == '') {
+          this.$message.error('请输入返利金额')
+          return v
         }
-        if (v.customerId == "") {
-          this.$message.error("请选择经销商");
-          return v;
+        if (v.customerId == '') {
+          this.$message.error('请选择经销商')
+          return v
         }
-        if (v.name == "") {
-          this.$message.error("请选择返利类型");
-          return v;
+        if (v.name == '') {
+          this.$message.error('请选择返利类型')
+          return v
         }
-      });
+      })
 
       if (aaa != undefined) {
-        return;
+        return
       }
       if (this.dataList[0].money > 0) {
-        this.$message.error("转出金额必须为负数");
-        return;
+        this.$message.error('转出金额必须为负数')
+        return
       }
       if (this.dataList[1].money < 0 && this.dataList[1].allowanceAmount < 0) {
-        this.$message.error("转入金额必须为正数");
-        return;
+        this.$message.error('转入金额必须为正数')
+        return
       }
       if (
         Number(-this.dataList[0].money) !=
-        Number(this.dataList[1].money) +
-          Number(this.dataList[1].allowanceAmount)
+        Number(this.dataList[1].money) + Number(this.dataList[1].allowanceAmount)
       ) {
-        this.$message.error("转入转出金额不等,请重新输入");
-        return;
+        this.$message.error('转入转出金额不等,请重新输入')
+        return
       }
 
       // if (this.dataList[0].money > 0) {
@@ -308,21 +343,21 @@ export default {
         receiverWalletRebateId: this.dataList[1].name,
         allowanceAmount: this.dataList[1].allowanceAmount,
         initiatorRemark: this.dataList[0].bz,
-        receiverRemark: this.dataList[1].bz,
-      };
+        receiverRemark: this.dataList[1].bz
+      }
 
-      await getTransferAdd(params);
-      this.resetFn();
-      this.$router.push("/finance/rebate/change_list");
-      this.$message.success("申请成功");
+      await getTransferAdd(params)
+      this.resetFn()
+      this.$router.push('/finance/rebate/change_list')
+      this.$message.success('申请成功')
     },
     async getUserInfoFn() {
-      const res = await getUserInfo({ adminUserId: this.userid });
-      this.searchForm.customerNumber = res.data.customerNumber;
-      this.dataList[0].customerId = res.data.customerId;
-      this.searchForm.customerName = res.data.customerName;
-      this.searchForm.customerNumber = res.data.customerNumber;
-      this.searchForm.nickName = res.data.nickName;
+      const res = await getUserInfo({ adminUserId: this.userid })
+      this.searchForm.customerNumber = res.data.customerNumber
+      this.dataList[0].customerId = res.data.customerId
+      this.searchForm.customerName = res.data.customerName
+      this.searchForm.customerNumber = res.data.customerNumber
+      this.searchForm.nickName = res.data.nickName
       // const res2 = await getWalletCustomerList({
       //   customerId: res.data.customerId,
       //   type: "REBATE",
@@ -334,9 +369,9 @@ export default {
       // });
       // this.dataList = res2.data;
       // console.log(this.dataList);
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 182 - 101
src/views/finance/rebate_form.vue

@@ -13,7 +13,15 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
-              <el-date-picker v-model="searchForm.theTime" disabled class="selectStyle" type="datetime" placeholder="系统自动生成" default-time="23:59:59" value-format="yyyy-MM-dd HH:mm:ss" />
+              <el-date-picker
+                v-model="searchForm.theTime"
+                disabled
+                class="selectStyle"
+                type="datetime"
+                placeholder="系统自动生成"
+                default-time="23:59:59"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -45,8 +53,20 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-popconfirm v-if="$checkBtnRole('del', $route.meta.roles)" title="这是一段内容确定删除吗?" @onConfirm="delSeletFn">
-          <el-button slot="reference" :disabled="selectList.length < 1" type="danger" size="mini" class="textColor delStyle" icon="el-icon-minus">批量删除</el-button>
+        <el-popconfirm
+          v-if="$checkBtnRole('del', $route.meta.roles)"
+          title="这是一段内容确定删除吗?"
+          @onConfirm="delSeletFn"
+        >
+          <el-button
+            slot="reference"
+            :disabled="selectList.length < 1"
+            type="danger"
+            size="mini"
+            class="textColor delStyle"
+            icon="el-icon-minus"
+            >批量删除</el-button
+          >
         </el-popconfirm>
       </div>
       <div class="fr">
@@ -56,7 +76,13 @@
           >批量导入</el-button
         > -->
 
-        <el-upload class="import-btn" action="" :http-request="handleImport" :file-list="importFileList" :show-file-list="false">
+        <el-upload
+          class="import-btn"
+          action=""
+          :http-request="handleImport"
+          :file-list="importFileList"
+          :show-file-list="false"
+        >
           <el-button type="primary" size="mini">批量导入</el-button>
         </el-upload>
       </div>
@@ -64,7 +90,20 @@
     <!-- 列表 -->
     <div class="mymain-container">
       <div class="table">
-        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe :row-class-name="rouClassNameFn" show-summary :summary-method="getSummaries" @row-click="onRowClick" @selection-change="selectionChange">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          :row-class-name="rouClassNameFn"
+          show-summary
+          :summary-method="getSummaries"
+          @row-click="onRowClick"
+          @selection-change="selectionChange"
+        >
           <el-table-column align="center" type="selection" width="51" show-overflow-tooltip />
           <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
@@ -73,29 +112,67 @@
           </el-table-column>
           <el-table-column align="left" label="经销商名称" prop="customerName" min-width="300" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-select v-model="scope.row.customerId" style="width: 100%" size="mini" placeholder="请选择" filterable @change="changeCustomerFn($event, scope.$index, scope.row)">
+              <el-select
+                v-model="scope.row.customerId"
+                style="width: 100%"
+                size="mini"
+                placeholder="请选择"
+                filterable
+                @change="changeCustomerFn($event, scope.$index, scope.row)"
+              >
                 <el-option v-for="item in customerData" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </template>
           </el-table-column>
           <el-table-column align="left" label="返利类型" prop="customerWalletId" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-select v-model="scope.row.customerWalletId" style="width: 100%" size="mini" placeholder="请选择" filterable>
-                <el-option v-for="item in scope.row.walletList" :key="item.customerWalletId" :label="item.name" :value="item.customerWalletId" />
+              <el-select
+                v-model="scope.row.customerWalletId"
+                style="width: 100%"
+                size="mini"
+                placeholder="请选择"
+                filterable
+              >
+                <el-option
+                  v-for="item in scope.row.walletList"
+                  :key="item.customerWalletId"
+                  :label="item.name"
+                  :value="item.customerWalletId"
+                />
               </el-select>
             </template>
           </el-table-column>
           <el-table-column align="right" label="返利总金额" prop="amount" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-input v-model="scope.row.amount" size="mini" style="width: 100%" class="mountclass" type="number" @mousewheel.native.prevent />
+              <el-input
+                v-model="scope.row.amount"
+                size="mini"
+                style="width: 100%"
+                class="mountclass"
+                type="number"
+                @mousewheel.native.prevent
+              />
             </template>
           </el-table-column>
           <el-table-column align="right" label="暂扣返利" prop="withholdAmount" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-input v-model="scope.row.withholdAmount" style="width: 100%" size="mini" class="mountclass" type="number" @mousewheel.native.prevent />
+              <el-input
+                v-model="scope.row.withholdAmount"
+                style="width: 100%"
+                size="mini"
+                class="mountclass"
+                type="number"
+                @mousewheel.native.prevent
+              />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="政策文件流水号" prop="policyFileNo" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="政策文件流水号"
+            prop="policyFileNo"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
               <el-input v-model="scope.row.policyFileNo" style="width: 100%" size="mini" />
             </template>
@@ -130,7 +207,13 @@
               <el-input v-model="scope.row.customerAttr" style="width: 100%" size="mini" />
             </template>
           </el-table-column>
-          <el-table-column align="left" label="建立实际归属客户" prop="rewardActualCustomers" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="建立实际归属客户"
+            prop="rewardActualCustomers"
+            min-width="160"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
               <el-input v-model="scope.row.rewardActualCustomers" style="width: 100%" size="mini" />
             </template>
@@ -148,7 +231,7 @@
         </el-table>
       </div>
     </div>
-    <br>
+    <br />
 
     <!-- 按钮 -->
     <div class="btn-group clearfix">
@@ -168,8 +251,8 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import { downloadFiles, handleImport } from "@/utils/util";
+import { mapGetters } from 'vuex'
+import { downloadFiles, handleImport } from '@/utils/util'
 
 import {
   getCustomerList,
@@ -177,8 +260,8 @@ import {
   getRebateOrderAdd,
   getRebateOrderApply,
   getRebateOrderList,
-  getRebateOrderDownLoad,
-} from "@/api/finance/rebate_form";
+  getRebateOrderDownLoad
+} from '@/api/finance/rebate_form'
 export default {
   data() {
     return {
@@ -191,10 +274,10 @@ export default {
       searchForm: {
         // theTime: "",
 
-        remark: "",
-        createBy: "",
+        remark: '',
+        createBy: ''
       },
-      delIndex: null,
+      delIndex: null
       // rules: {
       //   theTime: [
       //     {
@@ -204,83 +287,83 @@ export default {
       //     },
       //   ],
       // },
-    };
+    }
   },
 
   computed: {
-    ...mapGetters(["name"]),
+    ...mapGetters(['name'])
   },
   created() {
-    this.getCustomerData();
-    this.searchForm.createBy = this.name;
+    this.getCustomerData()
+    this.searchForm.createBy = this.name
   },
   methods: {
     // 合计
     getSummaries(param) {
-      const { columns, data } = param;
-      const sums = [];
+      const { columns, data } = param
+      const sums = []
       columns.forEach((column, index) => {
         if (index === 0) {
-          sums[index] = "合计";
+          sums[index] = '合计'
         }
         if (index === 4) {
-          const map2 = data.map((v) => {
-            return v.amount * 1;
-          });
+          const map2 = data.map(v => {
+            return v.amount * 1
+          })
           sums[index] = map2
             .reduce((prev, curr) => {
-              const value = Number(curr);
+              const value = Number(curr)
               if (!isNaN(value)) {
-                return (prev + curr) * 1;
+                return (prev + curr) * 1
               } else {
-                return prev * 1;
+                return prev * 1
               }
             }, 0)
-            .toFixed(2);
+            .toFixed(2)
         }
         if (index === 5) {
-          const map2 = data.map((v) => {
-            return v.withholdAmount * 1;
-          });
+          const map2 = data.map(v => {
+            return v.withholdAmount * 1
+          })
           sums[index] = map2
             .reduce((prev, curr) => {
-              const value = Number(curr);
+              const value = Number(curr)
               if (!isNaN(value)) {
-                return (prev + curr) * 1;
+                return (prev + curr) * 1
               } else {
-                return prev * 1;
+                return prev * 1
               }
             }, 0)
-            .toFixed(2);
+            .toFixed(2)
         }
-      });
+      })
 
-      return sums;
+      return sums
     },
     // 删除
     delSeletFn() {
       this.selectList.sort(function (a, b) {
-        return b - a;
-      });
+        return b - a
+      })
 
       for (let index = 0; index < this.selectList.length; index++) {
         // console.log(index);
-        this.dataList.splice(this.selectList[index], 1);
+        this.dataList.splice(this.selectList[index], 1)
       }
     },
     // 选择项改变
     selectionChange(v) {
-      this.selectList = v.map((v) => v.index);
+      this.selectList = v.map(v => v.index)
     },
 
     // 导入
     async handleImport(param) {
-      this.listLoading = true;
-      const file = param.file;
-      const formData = new FormData();
-      formData.append("file", file);
-      const result = await handleImport("rebate/order/import", formData);
-      this.importFileList = [];
+      this.listLoading = true
+      const file = param.file
+      const formData = new FormData()
+      formData.append('file', file)
+      const result = await handleImport('rebate/order/import', formData)
+      this.importFileList = []
       if (result.code == 200) {
         // let Arr = result.data.items;
         // let list = [];
@@ -315,16 +398,16 @@ export default {
         // let aa = [...this.dataList, ...list];
 
         // this.dataList = aa;
-        this.$message.success("导入成功");
-        this.$router.push("/finance/rebate/rebate_list");
+        this.$message.success('导入成功')
+        this.$router.push('/finance/rebate/rebate_list')
       } else {
-        this.$message.error(result.message);
+        this.$message.error(result.message)
       }
-      this.listLoading = false;
+      this.listLoading = false
     },
     // 下载模板
     async downLoadFn() {
-      downloadFiles("rebate/order/download");
+      downloadFiles('rebate/order/download')
     },
     // 重置
     cancelFn() {
@@ -334,19 +417,19 @@ export default {
       //   remark: '',
       //   createBy: ''
       // }
-      this.searchForm.remark = "";
-      this.dataList = [];
+      this.searchForm.remark = ''
+      this.dataList = []
     },
     rouClassNameFn({ row, rowIndex }) {
       // 把每一行的索引放进row
-      row.index = rowIndex;
+      row.index = rowIndex
     },
     onRowClick(row, event, column) {
-      this.delIndex = row.index;
+      this.delIndex = row.index
     },
     // 删除行
     delRowFn() {
-      this.dataList.splice(this.delIndex, 1);
+      this.dataList.splice(this.delIndex, 1)
     },
     // //提交审批
     // async submitFn() {
@@ -359,62 +442,60 @@ export default {
     // },
     // 新增
     async addFn() {
-      let arr;
-      await this.$refs.searchForm.validate();
-      this.dataList.forEach((v) => {
-        arr = v.walletList.filter(
-          (i) => i.customerWalletId == v.customerWalletId
-        );
-        v.walletName = arr[0].name;
-      });
-      await getRebateOrderAdd({ ...this.searchForm, items: this.dataList });
-      this.$message.success("保存成功");
-      this.cancelFn();
-      this.$router.push("/finance/rebate/rebate_list");
+      let arr
+      await this.$refs.searchForm.validate()
+      this.dataList.forEach(v => {
+        arr = v.walletList.filter(i => i.customerWalletId == v.customerWalletId)
+        v.walletName = arr[0].name
+      })
+      await getRebateOrderAdd({ ...this.searchForm, items: this.dataList })
+      this.$message.success('保存成功')
+      this.cancelFn()
+      this.$router.push('/finance/rebate/rebate_list')
     },
     // 选择经销商名称事件
     async changeCustomerFn(v, index, value) {
-      value.customerWalletId = "";
+      value.customerWalletId = ''
 
       const res = await getWalletCustomerList({
         customerId: v,
-        type: "REBATE",
-      });
-      const res2 = this.customerData.filter((i) => i.id == v);
+        type: 'REBATE'
+      })
+      const res2 = this.customerData.filter(i => i.id == v)
 
-      this.$set(this.dataList[index], "customerNumber", res2[0].number);
-      this.$set(this.dataList[index], "customerName", res2[0].name);
+      this.$set(this.dataList[index], 'customerNumber', res2[0].number)
+      this.$set(this.dataList[index], 'customerName', res2[0].name)
 
-      this.$set(this.dataList[index], "walletList", res.data);
+      this.$set(this.dataList[index], 'walletList', res.data)
     },
     // 获取经销商数据
     async getCustomerData() {
-      const res = await getCustomerList({ pageSize: -1, pageNum: 1 });
-      this.customerData = res.data.records;
+      const res = await getCustomerList({ pageSize: -1, pageNum: 1 })
+      this.customerData = res.data.records
     },
 
     // 添加行
     addRowFn() {
       this.dataList.push({
-        customerNumber: "",
-        customerName: "",
-        customerWalletId: "",
+        customerNumber: '',
+        customerName: '',
+        customerWalletId: '',
         amount: null,
         withholdAmount: null,
-        policyFileNo: "",
-        policyDocNo: "",
-        policyYear: "",
-        policyMonth: "",
-        policyOrg: "",
-        customerArea: "",
-        customerAttr: "",
-        rewardActualCustomers: "",
-        remark1: "",
-        remark2: "",
-      });
-    },
-  },
-};
+        policyFileNo: '',
+        policyDocNo: '',
+        policyYear: '',
+        policyMonth: '',
+        policyOrg: '',
+        customerArea: '',
+        customerAttr: '',
+        rewardActualCustomers: '',
+        remark1: '',
+        remark2: ''
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 25 - 78
src/views/login/index.vue

@@ -16,17 +16,9 @@
               <div class="empty-height">
                 <img class="logo" src="@/assets/login/logo.png" alt="" />
               </div>
-              <el-carousel
-                :interval="5000"
-                arrow="always"
-                height="440px"
-                class="carousel"
-              >
+              <el-carousel :interval="5000" arrow="always" height="440px" class="carousel">
                 <el-carousel-item v-for="item in banner" :key="item.id">
-                  <el-image
-                    :z-index="1"
-                    :src="imageURL + item.imgCarouselUrl"
-                  ></el-image>
+                  <el-image :z-index="1" :src="imageURL + item.imgCarouselUrl"></el-image>
                 </el-carousel-item>
               </el-carousel>
             </div>
@@ -34,18 +26,10 @@
               <div class="empty-height" />
               <div class="form-container">
                 <div class="flex title">
-                  <div
-                    class="title-item"
-                    :class="acitve == 'pas' ? 'acitve' : ''"
-                    @click="hanleTabs('pas', 'account')"
-                  >
+                  <div class="title-item" :class="acitve == 'pas' ? 'acitve' : ''" @click="hanleTabs('pas', 'account')">
                     密码登录
                   </div>
-                  <div
-                    class="title-item"
-                    :class="acitve == 'wei' ? 'acitve' : ''"
-                    @click="hanleTabs('wei', 'mobile')"
-                  >
+                  <div class="title-item" :class="acitve == 'wei' ? 'acitve' : ''" @click="hanleTabs('wei', 'mobile')">
                     手机号登录
                   </div>
                 </div>
@@ -91,11 +75,7 @@
                         @keyup.enter.native="handleLogin"
                       />
                       <span class="show-pwd" @click="showPwd">
-                        <svg-icon
-                          :icon-class="
-                            passwordType === 'password' ? 'eye' : 'eye-open'
-                          "
-                        />
+                        <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
                       </span>
                     </el-form-item>
 
@@ -120,10 +100,7 @@
                         />
                       </el-form-item>
                       <div class="code" @click.stop="getCode">
-                        <img
-                          :src="'data:image/jpeg;base64,' + codeImage"
-                          alt=""
-                        />
+                        <img :src="'data:image/jpeg;base64,' + codeImage" alt="" />
                       </div>
                     </div>
 
@@ -142,18 +119,11 @@
                           fit="contain "
                         ></el-image>
                       </div>
-                      <el-checkbox v-model="isRemenberPw"
-                        >记住账号密码</el-checkbox
-                      >
+                      <el-checkbox v-model="isRemenberPw">记住账号密码</el-checkbox>
                     </div>
 
                     <div class="button-container">
-                      <el-button
-                        :loading="loading"
-                        type="primary"
-                        @click.native.prevent="handleLogin"
-                        >登录</el-button
-                      >
+                      <el-button :loading="loading" type="primary" @click.native.prevent="handleLogin">登录</el-button>
                     </div>
                   </div>
                   <!-- 手机号登录 -->
@@ -197,10 +167,7 @@
                         />
                       </el-form-item>
                       <div class="code" @click.stop="getCode">
-                        <img
-                          :src="'data:image/jpeg;base64,' + codeImage"
-                          alt=""
-                        />
+                        <img :src="'data:image/jpeg;base64,' + codeImage" alt="" />
                       </div>
                     </div>
                     <div class="input-box">
@@ -229,12 +196,7 @@
                       </div>
                     </div>
                     <div class="button-container">
-                      <el-button
-                        :loading="loading"
-                        type="primary"
-                        @click.native.prevent="handleLogin"
-                        >登录</el-button
-                      >
+                      <el-button :loading="loading" type="primary" @click.native.prevent="handleLogin">登录</el-button>
                     </div>
                   </div>
                 </transition>
@@ -245,27 +207,12 @@
       </div>
       <div class="info">
         <div class="info-item">
-          <el-link
-            :href="companyList[0].icpRecordLink"
-            :underline="false"
-            target="_blank"
-            >{{ companyList[0].icpRecord }}</el-link
-          >
-          <div
-            style="margin: 0 20px"
-            v-if="companyList[0].companyName && companyList[0].icpRecordLink"
-          >
-            |
-          </div>
-          <el-link
-            :href="companyList[0].pubSecurityRecordLink"
-            :underline="false"
-            target="_blank"
-          >
-            <el-image
-              style="width: 14px; height: 16px"
-              :src="require('@/assets/login/icon_0001.png')"
-            ></el-image>
+          <el-link :href="companyList[0].icpRecordLink" :underline="false" target="_blank">{{
+            companyList[0].icpRecord
+          }}</el-link>
+          <div style="margin: 0 20px" v-if="companyList[0].companyName && companyList[0].icpRecordLink">|</div>
+          <el-link :href="companyList[0].pubSecurityRecordLink" :underline="false" target="_blank">
+            <el-image style="width: 14px; height: 16px" :src="require('@/assets/login/icon_0001.png')"></el-image>
             {{ companyList[0].pubSecurityRecord }}
           </el-link>
         </div>
@@ -431,19 +378,19 @@ export default {
             .dispatch('user/login', this.loginForm)
             .then(() => {
               // console.log(this.redirect);
-              this.$router.push({ path: this.redirect || "/" });
-              console.log(444);
-              this.saveUnAndPw();
-              this.$store.commit("user/showMessage", "yes");
+              this.$router.push({ path: this.redirect || '/' })
+              console.log(444)
+              this.saveUnAndPw()
+              this.$store.commit('user/showMessage', 'yes')
               // this.$message.success("登录成功");
               this.loading = false
             })
             .catch(() => {
-              console.log(555);
-              this.getCode();
-              this.loginForm.codeValue = "";
-              this.loading = false;
-            });
+              console.log(555)
+              this.getCode()
+              this.loginForm.codeValue = ''
+              this.loading = false
+            })
         } else {
           console.log('error submit!!')
           return false

+ 3 - 3
src/views/sales_policy/components/AddCondition.vue

@@ -461,17 +461,17 @@ export default {
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
       // 如果没有返回值则默认返回false(全部无法选中)
     },
-    async getCommonApi(policyId,id) {
+    async getCommonApi(policyId, id) {
       if (id) {
         this.id = id
       }
 
-          console.log(555,policyId);
+      console.log(555, policyId)
       if (this.id || policyId) {
         if (policyId) {
           this.edit = 'eidt'
         }
-        console.log(this.policyId , policyId , this.id);
+        console.log(this.policyId, policyId, this.id)
         const res = await getConditionMaterialDetail({
           id: this.policyId || policyId || this.id
         })

+ 1 - 1
src/views/sales_policy/components/editPolicy.vue

@@ -574,7 +574,7 @@ export default {
     },
     catCond(row) {
       this.cid = row.id
-      this.$refs.cond.getCommonApi('',row.id)
+      this.$refs.cond.getCommonApi('', row.id)
       this.isCondition = 2
 
       // $refs.cond.getCommonApi(),

+ 84 - 172
src/views/setting/other.vue

@@ -9,11 +9,7 @@
       <el-radio-button label="sixth">机型类别</el-radio-button>
       <el-radio-button label="seventh">登录类型</el-radio-button>
       <el-radio-button label="eigth">权限分类</el-radio-button>
-      <el-radio-button
-        label="receipt"
-        v-if="$checkBtnRole('receipt', $route.meta.roles)"
-        >发票</el-radio-button
-      >
+      <el-radio-button label="receipt" v-if="$checkBtnRole('receipt', $route.meta.roles)">发票</el-radio-button>
     </el-radio-group>
 
     <div v-show="formType === 'first'">
@@ -28,9 +24,7 @@
         ></el-time-picker>
         <span>的订单,订单日期计为下一天的日期</span>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('first')"
-        >确 定</el-button
-      >
+      <el-button type="primary" size="small" @click="submitForm('first')">确 定</el-button>
     </div>
 
     <div v-show="formType === 'second'">
@@ -45,9 +39,7 @@
           ></el-input>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('second')"
-        >确 定</el-button
-      >
+      <el-button type="primary" size="small" @click="submitForm('second')">确 定</el-button>
     </div>
 
     <div v-show="formType === 'third'">
@@ -75,9 +67,7 @@
         ></el-input>
         <span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('third')"
-        >确 定</el-button
-      >
+      <el-button type="primary" size="small" @click="submitForm('third')">确 定</el-button>
     </div>
 
     <div v-show="formType === 'fourth'">
@@ -147,9 +137,7 @@
           <span>显示充足</span>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('fourth')"
-        >确 定</el-button
-      >
+      <el-button type="primary" size="small" @click="submitForm('fourth')">确 定</el-button>
     </div>
 
     <div v-show="formType === 'fifth'">
@@ -164,16 +152,12 @@
           ></el-input>
         </div>
       </div>
-      <el-button type="primary" size="small" @click="submitForm('fifth')"
-        >确 定</el-button
-      >
+      <el-button type="primary" size="small" @click="submitForm('fifth')">确 定</el-button>
     </div>
 
     <div v-show="formType === 'sixth'">
       <div style="margin: 40px 0 30px">
-        <el-button type="primary" size="mini" @click="addShowFn"
-          >新增</el-button
-        >
+        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
@@ -201,29 +185,15 @@
                 show-overflow-tooltip
               ></el-table-column>
 
-              <el-table-column
-                align="center"
-                label="操作"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
                 <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    class="textColor"
-                    @click="editFn(scope.row)"
-                    >编辑</el-button
-                  >
+                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
                   <el-popconfirm
                     @onConfirm="deleFn(scope.row.sysDictId)"
                     v-if="$checkBtnRole('del', $route.meta.roles)"
                     title="这是一段内容确定删除吗?"
                   >
-                    <el-button type="text" class="textColor" slot="reference"
-                      >删除</el-button
-                    >
+                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -234,9 +204,7 @@
     </div>
     <div v-show="formType === 'seventh'">
       <div style="margin: 40px 0 30px">
-        <el-button type="primary" size="mini" @click="addShowFn"
-          >新增</el-button
-        >
+        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
@@ -264,29 +232,15 @@
                 show-overflow-tooltip
               ></el-table-column>
 
-              <el-table-column
-                align="center"
-                label="操作"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
                 <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    class="textColor"
-                    @click="editFn(scope.row)"
-                    >编辑</el-button
-                  >
+                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
                   <el-popconfirm
                     @onConfirm="deleFn(scope.row.sysDictId)"
                     v-if="$checkBtnRole('del', $route.meta.roles)"
                     title="这是一段内容确定删除吗?"
                   >
-                    <el-button type="text" class="textColor" slot="reference"
-                      >删除</el-button
-                    >
+                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -297,9 +251,7 @@
     </div>
     <div v-show="formType === 'eigth'">
       <div style="margin: 40px 0 30px">
-        <el-button type="primary" size="mini" @click="addShowFn"
-          >新增</el-button
-        >
+        <el-button type="primary" size="mini" @click="addShowFn">新增</el-button>
         <!-- 列表 -->
         <div class="mymain-container">
           <div class="table">
@@ -327,29 +279,15 @@
                 show-overflow-tooltip
               ></el-table-column>
 
-              <el-table-column
-                align="center"
-                label="操作"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" prop="" min-width="160" show-overflow-tooltip fixed="right">
                 <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    class="textColor"
-                    @click="editFn(scope.row)"
-                    >编辑</el-button
-                  >
+                  <el-button type="text" class="textColor" @click="editFn(scope.row)">编辑</el-button>
                   <el-popconfirm
                     @onConfirm="deleFn(scope.row.sysDictId)"
                     v-if="$checkBtnRole('del', $route.meta.roles)"
                     title="这是一段内容确定删除吗?"
                   >
-                    <el-button type="text" class="textColor" slot="reference"
-                      >删除</el-button
-                    >
+                    <el-button type="text" class="textColor" slot="reference">删除</el-button>
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -372,31 +310,13 @@
           style="margin: 0 10px"
         >
         </el-date-picker>
-        <el-button
-          size="mini"
-          type="warning"
-          icon="el-icon-finished"
-          @click="updateReceipt"
-          >更新发票</el-button
-        >
+        <el-button size="mini" type="warning" icon="el-icon-finished" @click="updateReceipt">更新发票</el-button>
       </div>
     </div>
 
     <!-- //弹窗 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="dialogForm"
-      width="30%"
-      :show-close="false"
-      :close-on-click-modal="false"
-    >
-      <el-form
-        size="mini"
-        ref="addForm"
-        :rules="rules"
-        :model="addForm"
-        label-width="120px"
-      >
+    <el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
+      <el-form size="mini" ref="addForm" :rules="rules" :model="addForm" label-width="120px">
         <el-form-item label="名称" prop="dictCode">
           <el-input v-model="addForm.dictCode"></el-input>
         </el-form-item>
@@ -406,22 +326,14 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button size="mini" @click="cancelFn">取 消</el-button>
-        <el-button size="mini" type="primary" @click="addDataFn"
-          >确 定</el-button
-        >
+        <el-button size="mini" type="primary" @click="addDataFn">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {
-  getDictList,
-  editDictList,
-  addDictList,
-  deleDictList,
-  updateReceipt,
-} from "@/api/common";
+import { getDictList, editDictList, addDictList, deleDictList, updateReceipt } from '@/api/common'
 
 export default {
   data() {
@@ -445,7 +357,7 @@ export default {
       },
       thirdForm: {
         input1: {},
-        input2: {},
+        input2: {}
       },
       fourthForm: {
         input1: {},
@@ -461,8 +373,8 @@ export default {
       sixthForm: [],
       seventhForm: [],
       eigthForm: [],
-      value1: "",
-      choiceDate: "",
+      value1: '',
+      choiceDate: '',
       setDisabled: {
         disabledDate: time => {
           if (this.choiceDate) {
@@ -565,45 +477,45 @@ export default {
     },
 
     changeType(val) {
-      if (this.formType === "receipt") return;
-      console.log(val);
-      this.getDetail(val);
+      if (this.formType === 'receipt') return
+      console.log(val)
+      this.getDetail(val)
     },
     getDictList(e, type) {
-      getDictList({ sysDictEnum: e }).then((res) => {
-        console.log(res, "99");
-        let data = res.data.map((item) => {
+      getDictList({ sysDictEnum: e }).then(res => {
+        console.log(res, '99')
+        let data = res.data.map(item => {
           return {
             sysDictId: item.sysDictId,
             dictValue: item.dictValue,
             dictType: item.dictType,
-            dictCode: item.dictCode,
-          };
-        });
-        if (type != "fourth") {
-          if (e === "FO_SHAN_RESERVED_DAY") {
-            this[type + "Form"].input1 = data[0];
-            return;
-          } else if (e === "GUANG_ZHOU_RESERVED_DAY") {
-            this[type + "Form"].input2 = data[0];
-            return;
+            dictCode: item.dictCode
+          }
+        })
+        if (type != 'fourth') {
+          if (e === 'FO_SHAN_RESERVED_DAY') {
+            this[type + 'Form'].input1 = data[0]
+            return
+          } else if (e === 'GUANG_ZHOU_RESERVED_DAY') {
+            this[type + 'Form'].input2 = data[0]
+            return
           }
-          this[type + "Form"].input1 = data[0];
+          this[type + 'Form'].input1 = data[0]
           // this[type + "Form"].input2 = data[1];
-          console.log(777, this[type + "Form"].input1);
+          console.log(777, this[type + 'Form'].input1)
         } else {
-          this[type + "Form"].input1 = data[0];
-          this[type + "Form"].input2 = data[1];
-          this[type + "Form"].input3 = data[2];
-          this[type + "Form"].input4 = data[3];
-          this[type + "Form"].input5 = data[4];
-          this[type + "Form"].input6 = data[5];
+          this[type + 'Form'].input1 = data[0]
+          this[type + 'Form'].input2 = data[1]
+          this[type + 'Form'].input3 = data[2]
+          this[type + 'Form'].input4 = data[3]
+          this[type + 'Form'].input5 = data[4]
+          this[type + 'Form'].input6 = data[5]
         }
-        if (type == "sixth") {
-          this.sixthForm = res.data;
+        if (type == 'sixth') {
+          this.sixthForm = res.data
         }
-        if (type == "seventh") {
-          this.seventhForm = res.data;
+        if (type == 'seventh') {
+          this.seventhForm = res.data
         }
         if (type == 'sixth') {
           this.sixthForm = res.data
@@ -618,22 +530,22 @@ export default {
     },
     getDetail(type) {
       const MAP = {
-        first: "ORDER_TIME_LIMIT",
-        second: "ENGIN_TWO_PWD",
-        third: ["GUANG_ZHOU_RESERVED_DAY", "FO_SHAN_RESERVED_DAY"],
-        fourth: "STOCK_ORDER",
-        fifth: "PRINT_PASSWORD",
-        sixth: "MACHINE_TYPE",
-        seventh: "SIGN_TYPE",
-        eigth: "POWER_CATEGORY",
-      };
-      if (type === "third") {
-        MAP[type].forEach((e) => {
-          this.getDictList(e, type);
-        });
-        return;
+        first: 'ORDER_TIME_LIMIT',
+        second: 'ENGIN_TWO_PWD',
+        third: ['GUANG_ZHOU_RESERVED_DAY', 'FO_SHAN_RESERVED_DAY'],
+        fourth: 'STOCK_ORDER',
+        fifth: 'PRINT_PASSWORD',
+        sixth: 'MACHINE_TYPE',
+        seventh: 'SIGN_TYPE',
+        eigth: 'POWER_CATEGORY'
       }
-      this.getDictList(MAP[type], type);
+      if (type === 'third') {
+        MAP[type].forEach(e => {
+          this.getDictList(e, type)
+        })
+        return
+      }
+      this.getDictList(MAP[type], type)
     },
 
     submitForm(type) {
@@ -645,28 +557,28 @@ export default {
         }
         list.push(this[type + 'Form'][key])
       }
-      console.log(list, "890");
+      console.log(list, '890')
 
-      editDictList(list).then((res) => {
-        this.$successMsg("保存成功");
-        this.getDetail(type);
-      });
+      editDictList(list).then(res => {
+        this.$successMsg('保存成功')
+        this.getDetail(type)
+      })
     },
     updateReceipt() {
       if (!this.value1) {
-        this.$errorMsg("请选择时间");
-        return;
+        this.$errorMsg('请选择时间')
+        return
       }
       updateReceipt({
         startTime: this.value1[0],
-        endTime: this.value1[1],
-      }).then((res) => {
-        this.$successMsg("已更新");
-        this.value1 = "";
-      });
-    },
-  },
-};
+        endTime: this.value1[1]
+      }).then(res => {
+        this.$successMsg('已更新')
+        this.value1 = ''
+      })
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

+ 164 - 116
src/views/setting/role.vue

@@ -6,7 +6,14 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')" v-if="checkBtnRole('add')">新增角色</el-button>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            @click="addOrEdit('add')"
+            v-if="checkBtnRole('add')"
+            >新增角色</el-button
+          >
         </div>
         <div class="fr">
           <ImportButton :imUrl="'stock/importToll'" @importSuccess="getList" />
@@ -14,7 +21,15 @@
       </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="序号" type="index" width="50"></el-table-column>
           <el-table-column align="center" label="角色" prop="name"></el-table-column>
           <el-table-column align="center" label="允许访问系统" prop="visitSysStatus" width="120">
@@ -22,18 +37,31 @@
               <el-switch
                 v-model="scope.row.visitSysStatus"
                 :disabled="scope.row.type === 1 || scope.row.type === 2"
-                @change="changeStatus(scope.row.adminRoleId, scope.row.visitSysStatus)">
+                @change="changeStatus(scope.row.adminRoleId, scope.row.visitSysStatus)"
+              >
               </el-switch>
             </template>
           </el-table-column>
           <el-table-column align="center" label="操作" width="180">
             <template slot-scope="scope">
-              <el-button type="text" @click="setMenuRole(scope.row.adminRoleId)" v-if="checkBtnRole('detail')">设置权限</el-button>
+              <el-button type="text" @click="setMenuRole(scope.row.adminRoleId)" v-if="checkBtnRole('detail')"
+                >设置权限</el-button
+              >
               <template v-if="checkBtnRole('detail')">
-                <el-button type="text" @click="addOrEdit('edit', scope.row.adminRoleId)" v-if="scope.row.adminRoleId != 1">编辑</el-button>
+                <el-button
+                  type="text"
+                  @click="addOrEdit('edit', scope.row.adminRoleId)"
+                  v-if="scope.row.adminRoleId != 1"
+                  >编辑</el-button
+                >
               </template>
               <template v-if="checkBtnRole('del')">
-                <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.adminRoleId)" v-if="scope.row.adminRoleId != 1">
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定删除吗?"
+                  @onConfirm="handleDelete(scope.row.adminRoleId)"
+                  v-if="scope.row.adminRoleId != 1"
+                >
                   <el-button slot="reference" type="text">删除</el-button>
                 </el-popconfirm>
               </template>
@@ -51,14 +79,21 @@
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
+            :total="listTotal"
+          >
           </el-pagination>
         </div>
       </div>
     </div>
 
     <!-- 新增编辑 -->
-    <el-dialog :title="addFormType == 'add' ? '新增角色':'编辑角色'" :visible.sync="addFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
+    <el-dialog
+      :title="addFormType == 'add' ? '新增角色' : '编辑角色'"
+      :visible.sync="addFormVisible"
+      :show-close="false"
+      width="40%"
+      :close-on-click-modal="false"
+    >
       <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="100px">
         <el-form-item label="角色名" prop="name">
           <el-input v-model="addForm.name" autocomplete="off" placeholder="请输入角色名"></el-input>
@@ -71,7 +106,15 @@
     </el-dialog>
 
     <!-- 设置权限 -->
-    <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="40%" :close-on-click-modal="false" custom-class="tree-dialog" top="50px">
+    <el-dialog
+      title="设置权限"
+      :visible.sync="roleFormVisible"
+      :show-close="false"
+      width="40%"
+      :close-on-click-modal="false"
+      custom-class="tree-dialog"
+      top="50px"
+    >
       <el-tree
         :data="menuRoleList"
         show-checkbox
@@ -81,27 +124,38 @@
         node-key="moduleId"
         ref="tree"
         highlight-current
-        :props="defaultProps">
+        :props="defaultProps"
+      >
         <span class="custom-tree-node" slot-scope="{ node, data }">
           <span>{{ node.label }}</span>
           <span v-if="data.type < 3">
             <el-button type="text" size="mini" @click="() => quickSelection(data)">一键全选</el-button>
-            <el-button type="text" size="mini" @click="() => quickCancel(data)" style="color: #f56c6c">一键取消</el-button>
+            <el-button type="text" size="mini" @click="() => quickCancel(data)" style="color: #f56c6c"
+              >一键取消</el-button
+            >
           </span>
         </span>
       </el-tree>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="roleFormVisible = false">{{editId != 1 ? '取 消':'关 闭'}}</el-button>
+        <el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消' : '关 闭' }}</el-button>
         <el-button type="primary" @click="submitRoleForm" v-if="editId != 1">确 定</el-button>
       </div>
     </el-dialog>
-
   </div>
 </template>
 
 <script>
 import { mapGetters } from 'vuex'
-import { getRoleList, addRole, editRole, getRoleDetail, deleteRole, getMenuList, getMenuRoleIds, setMenuRole } from '@/api/setting'
+import {
+  getRoleList,
+  addRole,
+  editRole,
+  getRoleDetail,
+  deleteRole,
+  getMenuList,
+  getMenuRoleIds,
+  setMenuRole
+} from '@/api/setting'
 
 export default {
   data() {
@@ -113,16 +167,14 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
 
-      editId:  null,
+      editId: null,
       addFormType: 'add',
       addFormVisible: false,
       addForm: {
-        name: '', // 角色名
+        name: '' // 角色名
       },
       addFormRules: {
-        name: [
-          { required: true, message: '请输入角色名', trigger: 'blur' }
-        ],
+        name: [{ required: true, message: '请输入角色名', trigger: 'blur' }]
       },
 
       roleFormVisible: false,
@@ -131,17 +183,14 @@ export default {
       defaultProps: {
         children: 'children',
         label: 'moduleName'
-      },
+      }
     }
   },
   computed: {
-    ...mapGetters([
-      'userid',
-      'name'
-    ])
+    ...mapGetters(['userid', 'name'])
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     // 查询按钮权限
@@ -150,52 +199,52 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0 ? true : false;
-      return true;
+      return true
     },
 
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize
-      };
+      }
 
       getRoleList(params).then(res => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
       })
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 操作 - 删除
     handleDelete(id) {
-      deleteRole({adminRoleId: id}).then(res => {
-        this.getList();
-        this.$successMsg();
+      deleteRole({ adminRoleId: id }).then(res => {
+        this.getList()
+        this.$successMsg()
       })
     },
 
     // 新增编辑
     addOrEdit(type, id) {
-      this.addFormType = type;
-      this.addFormVisible = true;
-      if(type == 'edit') {
-        this.editId = id;
-        getRoleDetail({adminRoleId: id}).then(res => {
+      this.addFormType = type
+      this.addFormVisible = true
+      if (type == 'edit') {
+        this.editId = id
+        getRoleDetail({ adminRoleId: id }).then(res => {
           this.addForm = {
             name: res.data.name
           }
@@ -204,30 +253,30 @@ export default {
     },
 
     // 取消 新增编辑
-    cancelAddForm(){
-      this.addFormVisible = false;
-      this.$refs.addForm.resetFields();
+    cancelAddForm() {
+      this.addFormVisible = false
+      this.$refs.addForm.resetFields()
     },
 
     // 提交 新增编辑
     submitAddForm() {
-      this.$refs.addForm.validate((valid) => {
+      this.$refs.addForm.validate(valid => {
         if (valid) {
           let params = {
             name: this.addForm.name
           }
-          if(this.addFormType == 'edit') {
-            params.adminRoleId = this.editId;
+          if (this.addFormType == 'edit') {
+            params.adminRoleId = this.editId
             editRole(params).then(res => {
-              this.cancelAddForm();
-              this.getList();
-              this.$successMsg('编辑成功');
+              this.cancelAddForm()
+              this.getList()
+              this.$successMsg('编辑成功')
             })
           } else {
             addRole(params).then(res => {
-              this.cancelAddForm();
-              this.getList();
-              this.$successMsg('新增成功');
+              this.cancelAddForm()
+              this.getList()
+              this.$successMsg('新增成功')
             })
           }
         }
@@ -236,13 +285,13 @@ export default {
 
     // 设置权限 - 获取列表
     setMenuRole(id) {
-      this.roleFormVisible = true;
-      this.editId = id;
-      getMenuList({adminUserId: this.userid}).then(res => {
-        this.menuRoleList = res.data;
+      this.roleFormVisible = true
+      this.editId = id
+      getMenuList({ adminUserId: this.userid }).then(res => {
+        this.menuRoleList = res.data
       })
-      getMenuRoleIds({adminRoleId: id}).then(res => {
-        this.$refs.tree.setCheckedKeys(res.data);
+      getMenuRoleIds({ adminRoleId: id }).then(res => {
+        this.$refs.tree.setCheckedKeys(res.data)
       })
     },
 
@@ -250,68 +299,68 @@ export default {
     submitRoleForm() {
       let params = {
         adminModuleIds: this.$refs.tree.getCheckedKeys().join(','),
-        adminRoleId: this.editId,
+        adminRoleId: this.editId
       }
       setMenuRole(params).then(res => {
-        this.roleFormVisible = false;
-        this.getList();
-        this.$successMsg();
+        this.roleFormVisible = false
+        this.getList()
+        this.$successMsg()
       })
     },
 
     // 一键全选
     quickSelection(data) {
-      let nowChecked = this.$refs.tree.getCheckedKeys();
-      let thisId = data.moduleId;
-      let childId = [];
-      if(data.children.length) {
-        childId = this.familyTree(data.children);
+      let nowChecked = this.$refs.tree.getCheckedKeys()
+      let thisId = data.moduleId
+      let childId = []
+      if (data.children.length) {
+        childId = this.familyTree(data.children)
       }
 
-      let setChecked = nowChecked.concat([thisId]).concat(childId);
+      let setChecked = nowChecked.concat([thisId]).concat(childId)
 
-      this.$refs.tree.setCheckedKeys(setChecked);
+      this.$refs.tree.setCheckedKeys(setChecked)
     },
 
     // 一键取消
     quickCancel(data) {
-      let nowChecked = this.$refs.tree.getCheckedKeys();
-      let thisId = data.moduleId;
-      let childId = [];
-      if(data.children.length) {
-        childId = this.familyTree(data.children);
+      let nowChecked = this.$refs.tree.getCheckedKeys()
+      let thisId = data.moduleId
+      let childId = []
+      if (data.children.length) {
+        childId = this.familyTree(data.children)
       }
 
-      let setChecked = nowChecked;
-      if(setChecked.indexOf(thisId) >= 0) {
-        setChecked.splice(setChecked.indexOf(thisId), 1);
+      let setChecked = nowChecked
+      if (setChecked.indexOf(thisId) >= 0) {
+        setChecked.splice(setChecked.indexOf(thisId), 1)
       }
 
-      if(childId.length) {
+      if (childId.length) {
         for (var i = 0; i < childId.length; i++) {
-          if(setChecked.indexOf(childId[i]) >= 0) {
-            setChecked.splice(setChecked.indexOf(childId[i]), 1);
+          if (setChecked.indexOf(childId[i]) >= 0) {
+            setChecked.splice(setChecked.indexOf(childId[i]), 1)
           }
         }
       }
 
-      this.$refs.tree.setCheckedKeys(setChecked);
+      this.$refs.tree.setCheckedKeys(setChecked)
     },
 
     // 递归子id
     familyTree(arr) {
-      var temp = [];
+      var temp = []
       var forFn = function (list) {
         for (var i = 0; i < list.length; i++) {
-          var item = list[i];
+          var item = list[i]
           if (item.children) {
-            temp.push(item.moduleId);
-            forFn(item.children);
+            temp.push(item.moduleId)
+            forFn(item.children)
           }
         }
-      };
-      forFn(arr);
-      return temp;
+      }
+      forFn(arr)
+      return temp
     },
 
     changeStatus(id, status) {
@@ -319,38 +368,37 @@ export default {
         adminRoleId: id,
         visitSysStatus: status
       }).then(res => {
-        this.getList();
-        this.$successMsg('编辑成功');
+        this.getList()
+        this.$successMsg('编辑成功')
       })
     }
-
   }
 }
 </script>
 
 <style lang="scss" scoped>
-  ::v-deep .tree-dialog {
-    .el-dialog__body {
-      padding: 20px;
-      .el-tree {
-        max-height: calc(100vh - 140px - 54px - 70px);
-        overflow-y: scroll;
-        padding: 0 30px;
-        >.el-tree-node {
-          padding: 15px 0;
-          border: 1px dashed #ddd;
-          margin-bottom: 15px;
-          border-radius: 10px;
-        }
+::v-deep .tree-dialog {
+  .el-dialog__body {
+    padding: 20px;
+    .el-tree {
+      max-height: calc(100vh - 140px - 54px - 70px);
+      overflow-y: scroll;
+      padding: 0 30px;
+      > .el-tree-node {
+        padding: 15px 0;
+        border: 1px dashed #ddd;
+        margin-bottom: 15px;
+        border-radius: 10px;
       }
     }
   }
-  ::v-deep .custom-tree-node {
-    flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    font-size: 14px;
-    padding-right: 8px;
-  }
+}
+::v-deep .custom-tree-node {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 14px;
+  padding-right: 8px;
+}
 </style>

+ 114 - 155
src/views/setting/sub_account.vue

@@ -33,11 +33,7 @@
           <el-table-column align="left" label="序号" type="index" width="50" />
           <el-table-column align="left" label="账号" prop="userName" />
           <el-table-column align="left" label="创建时间" prop="createTime" />
-          <el-table-column
-            align="left"
-            label="最后登录时间"
-            prop="lastLoginTime"
-          />
+          <el-table-column align="left" label="最后登录时间" prop="lastLoginTime" />
           <el-table-column align="left" label="主帐号" prop="isMaster">
             <template slot-scope="scope">
               <el-tag v-if="scope.row.isMaster" type="success">是</el-tag>
@@ -46,13 +42,8 @@
           </el-table-column>
           <el-table-column align="center" label="操作" width="180">
             <template slot-scope="scope">
-              <el-button type="text" @click="addOrEdit('edit', scope.row)"
-                >修改</el-button
-              >
-              <el-button
-                v-if="checkBtnRole('detail')"
-                type="text"
-                @click="setMenuRole(scope.row.adminUserId, 'role')"
+              <el-button type="text" @click="addOrEdit('edit', scope.row)">修改</el-button>
+              <el-button v-if="checkBtnRole('detail')" type="text" @click="setMenuRole(scope.row.adminUserId, 'role')"
                 >设置权限</el-button
               >
             </template>
@@ -99,32 +90,16 @@
         <span slot-scope="{ node, data }" class="custom-tree-node">
           <span>{{ node.label }}</span>
           <span v-if="data.type < 3">
-            <el-button
-              type="text"
-              size="mini"
-              @click="() => quickSelection(data)"
-              >一键全选</el-button
-            >
-            <el-button
-              type="text"
-              size="mini"
-              style="color: #f56c6c"
-              @click="() => quickCancel(data)"
+            <el-button type="text" size="mini" @click="() => quickSelection(data)">一键全选</el-button>
+            <el-button type="text" size="mini" style="color: #f56c6c" @click="() => quickCancel(data)"
               >一键取消</el-button
             >
           </span>
         </span>
       </el-tree>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="roleFormVisible = false">{{
-          editId != 1 ? "取 消" : "关 闭"
-        }}</el-button>
-        <el-button
-          v-if="editId != 1"
-          type="primary"
-          @click="submitRoleForm('role')"
-          >确 定</el-button
-        >
+        <el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消' : '关 闭' }}</el-button>
+        <el-button v-if="editId != 1" type="primary" @click="submitRoleForm('role')">确 定</el-button>
       </div>
     </el-dialog>
     <el-dialog
@@ -134,28 +109,12 @@
       :title="'add' === addFormType ? '新增' : '修改'"
       @close="cancelAddForm"
     >
-      <el-form
-        ref="ruleForm"
-        :model="ruleForm"
-        :rules="rules"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
+      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm">
         <el-form-item v-if="addFormType !== 'edit'" label="账号" prop="account">
-          <el-input
-            v-model="ruleForm.account"
-            type="text"
-            autocomplete="off"
-            disabled
-            placeholder="系统自动生成"
-          />
+          <el-input v-model="ruleForm.account" type="text" autocomplete="off" disabled placeholder="系统自动生成" />
         </el-form-item>
         <el-form-item label="密码" prop="password">
-          <el-input
-            v-model="ruleForm.password"
-            type="password"
-            autocomplete="off"
-          />
+          <el-input v-model="ruleForm.password" type="password" autocomplete="off" />
         </el-form-item>
       </el-form>
 
@@ -169,7 +128,7 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
+import { mapGetters } from 'vuex'
 import {
   addSubAccount,
   deleteRole,
@@ -178,8 +137,8 @@ import {
   getAccountList,
   getMenuList,
   getRoleChecked,
-  setMenuRole,
-} from "@/api/setting";
+  setMenuRole
+} from '@/api/setting'
 
 export default {
   data() {
@@ -192,37 +151,37 @@ export default {
       listTotal: 0, // 列表总数
 
       editId: null,
-      addFormType: "add",
+      addFormType: 'add',
       addFormVisible: false,
       addForm: {
-        name: "", // 角色名
+        name: '' // 角色名
       },
       addFormRules: {
-        name: [{ required: true, message: "请输入角色名", trigger: "blur" }],
+        name: [{ required: true, message: '请输入角色名', trigger: 'blur' }]
       },
 
       roleFormVisible: false,
 
       menuRoleList: [],
       defaultProps: {
-        children: "children",
-        label: "moduleName",
+        children: 'children',
+        label: 'moduleName'
       },
       dialogVisible: false,
       ruleForm: {
-        account: "",
-        password: "",
+        account: '',
+        password: ''
       },
       rules: {
-        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
-      },
-    };
+        password: [{ required: true, message: '请输入密码', trigger: 'blur' }]
+      }
+    }
   },
   computed: {
-    ...mapGetters(["userid", "name", "customerId"]),
+    ...mapGetters(['userid', 'name', 'customerId'])
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     // 查询按钮权限
@@ -231,67 +190,67 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0 ? true : false;
-      return true;
+      return true
     },
 
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         customerId: this.customerId,
-        isMaster: false,
-      };
-      getAccountList(params).then((res) => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        isMaster: false
+      }
+      getAccountList(params).then(res => {
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 操作 - 删除
     handleDelete(id) {
-      deleteRole({ adminRoleId: id }).then((res) => {
-        this.getList();
-        this.$successMsg();
-      });
+      deleteRole({ adminRoleId: id }).then(res => {
+        this.getList()
+        this.$successMsg()
+      })
     },
 
     // 新增编辑
     addOrEdit(type, row) {
-      this.addFormType = type;
-      this.dialogVisible = true;
-      if (type === "edit") {
+      this.addFormType = type
+      this.dialogVisible = true
+      if (type === 'edit') {
         this.$nextTick(() => {
           this.ruleForm = {
             account: row.userName,
-            password: "",
-            adminUserId: row.adminUserId,
-          };
-        });
+            password: '',
+            adminUserId: row.adminUserId
+          }
+        })
       }
     },
 
     // 取消 新增编辑
     cancelAddForm() {
-      this.dialogVisible = false;
+      this.dialogVisible = false
       this.$nextTick(() => {
-        this.$refs.tree.setCheckedKeys([]);
-      });
-      this.$refs.ruleForm.resetFields();
+        this.$refs.tree.setCheckedKeys([])
+      })
+      this.$refs.ruleForm.resetFields()
     },
 
     // 提交 新增编辑
@@ -300,120 +259,120 @@ export default {
         const params = {
           userName: this.ruleForm.account,
           password: this.ruleForm.password,
-          adminModuleIds: "",
+          adminModuleIds: ''
           // adminModuleIds:this.$refs.tree ? this.$refs.tree.getCheckedKeys().join(',') :
-        };
+        }
         if (valid) {
-          if (this.addFormType === "edit") {
-            params.adminUserId = this.ruleForm.adminUserId;
-            editSubAccount(params).then((res) => {
-              this.cancelAddForm();
-              this.getList();
-              this.$successMsg("编辑成功");
-            });
+          if (this.addFormType === 'edit') {
+            params.adminUserId = this.ruleForm.adminUserId
+            editSubAccount(params).then(res => {
+              this.cancelAddForm()
+              this.getList()
+              this.$successMsg('编辑成功')
+            })
           } else {
-            addSubAccount(params).then((res) => {
-              this.cancelAddForm();
-              this.getList();
-              this.$successMsg("新增成功");
-            });
+            addSubAccount(params).then(res => {
+              this.cancelAddForm()
+              this.getList()
+              this.$successMsg('新增成功')
+            })
           }
         }
-      });
+      })
     },
 
     // 设置权限 - 获取列表
     setMenuRole(id, type) {
-      this.roleFormVisible = true;
-      this.editId = id;
-      getMenuList({ adminUserId: this.userid }).then((res) => {
-        this.menuRoleList = res.data;
-      });
-      getRoleChecked({ adminUserId: id }).then((res) => {
-        this.$refs.tree.setCheckedKeys(res.data);
-      });
+      this.roleFormVisible = true
+      this.editId = id
+      getMenuList({ adminUserId: this.userid }).then(res => {
+        this.menuRoleList = res.data
+      })
+      getRoleChecked({ adminUserId: id }).then(res => {
+        this.$refs.tree.setCheckedKeys(res.data)
+      })
     },
 
     // 设置权限 - 提交数据
     submitRoleForm(type) {
       const params = {
-        adminModuleIds: this.$refs.tree.getCheckedKeys().join(","),
-        adminRoleId: this.editId,
-      };
-      setMenuRole(params).then((res) => {
-        this.getList();
-        this.$successMsg();
-      });
+        adminModuleIds: this.$refs.tree.getCheckedKeys().join(','),
+        adminRoleId: this.editId
+      }
+      setMenuRole(params).then(res => {
+        this.getList()
+        this.$successMsg()
+      })
 
-      this.roleFormVisible = false;
+      this.roleFormVisible = false
     },
 
     // 一键全选
     quickSelection(data) {
-      const nowChecked = this.$refs.tree.getCheckedKeys();
-      const thisId = data.moduleId;
-      let childId = [];
+      const nowChecked = this.$refs.tree.getCheckedKeys()
+      const thisId = data.moduleId
+      let childId = []
       if (data.children.length) {
-        childId = this.familyTree(data.children);
+        childId = this.familyTree(data.children)
       }
 
-      const setChecked = nowChecked.concat([thisId]).concat(childId);
+      const setChecked = nowChecked.concat([thisId]).concat(childId)
 
-      this.$refs.tree.setCheckedKeys(setChecked);
+      this.$refs.tree.setCheckedKeys(setChecked)
     },
 
     // 一键取消
     quickCancel(data) {
-      const nowChecked = this.$refs.tree.getCheckedKeys();
-      const thisId = data.moduleId;
-      let childId = [];
+      const nowChecked = this.$refs.tree.getCheckedKeys()
+      const thisId = data.moduleId
+      let childId = []
       if (data.children.length) {
-        childId = this.familyTree(data.children);
+        childId = this.familyTree(data.children)
       }
 
-      const setChecked = nowChecked;
+      const setChecked = nowChecked
       if (setChecked.indexOf(thisId) >= 0) {
-        setChecked.splice(setChecked.indexOf(thisId), 1);
+        setChecked.splice(setChecked.indexOf(thisId), 1)
       }
 
       if (childId.length) {
         for (var i = 0; i < childId.length; i++) {
           if (setChecked.indexOf(childId[i]) >= 0) {
-            setChecked.splice(setChecked.indexOf(childId[i]), 1);
+            setChecked.splice(setChecked.indexOf(childId[i]), 1)
           }
         }
       }
 
-      this.$refs.tree.setCheckedKeys(setChecked);
+      this.$refs.tree.setCheckedKeys(setChecked)
     },
 
     // 递归子id
     familyTree(arr) {
-      var temp = [];
+      var temp = []
       var forFn = function (list) {
         for (var i = 0; i < list.length; i++) {
-          var item = list[i];
+          var item = list[i]
           if (item.children) {
-            temp.push(item.moduleId);
-            forFn(item.children);
+            temp.push(item.moduleId)
+            forFn(item.children)
           }
         }
-      };
-      forFn(arr);
-      return temp;
+      }
+      forFn(arr)
+      return temp
     },
 
     changeStatus(id, status) {
       editRole({
         adminRoleId: id,
-        visitSysStatus: status,
-      }).then((res) => {
-        this.getList();
-        this.$successMsg("编辑成功");
-      });
-    },
-  },
-};
+        visitSysStatus: status
+      }).then(res => {
+        this.getList()
+        this.$successMsg('编辑成功')
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 183 - 413
src/views/supply/apply/apply_list.vue

@@ -1,10 +1,6 @@
 <template>
   <div class="app-container">
-    <div
-      v-show="
-        !isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm
-      "
-    >
+    <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
         <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
@@ -183,10 +179,7 @@
             >
           </div>
           <div class="fr">
-            <ExportButton
-              :ex-url="'invoice/listExport'"
-              :ex-params="exParams"
-            />
+            <ExportButton :ex-url="'invoice/listExport'" :ex-params="exParams" />
           </div>
         </div>
         <div class="table">
@@ -201,30 +194,13 @@
             :summary-method="$getSummaries"
             @selection-change="handleSelectionChange"
           >
-            <el-table-column
-              align="center"
-              type="selection"
-              width="55"
-              fixed="left"
-            />
-            <el-table-column
-              align="left"
-              label="订单类型"
-              prop="type"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="center" type="selection" width="55" fixed="left" />
+            <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.type | orderTypeFilter }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="发货申请单"
-              prop="id"
-              min-width="130"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货申请单" prop="id" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
@@ -237,28 +213,12 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.type === 3
-                    ? scope.row.stockName
-                    : scope.row.correspondName
-                }}
+                {{ scope.row.type === 3 ? scope.row.stockName : scope.row.correspondName }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单号"
-              prop="mainOrderId"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单号" prop="mainOrderId" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.mainOrderId" />
                 <span>{{ scope.row.mainOrderId }}</span>
@@ -276,25 +236,13 @@
                 <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialCode"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
                 <span>{{ scope.row.materialCode }}</span>
@@ -312,37 +260,19 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品类别"
-              prop="categoryName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品类别" prop="categoryName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 <span>{{ scope.row.categoryName }}</span>
               </template>
@@ -354,52 +284,16 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="文件编号"
-              prop="itemFileNo"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="refundableQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="已退数量"
-              prop="retiredQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="含税单价"
-              prop="singlePayPrice"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="文件编号" prop="itemFileNo" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.singlePayPrice | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="价税合计"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
@@ -426,27 +320,9 @@
                 {{ scope.row.totalDiscAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单备注"
-              prop="headerRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="发货申请备注"
-              prop="remark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="表体备注"
-              prop="invoiceRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="审批说明"
@@ -454,13 +330,7 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="表头业务员"
@@ -468,50 +338,17 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approvalName"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="approvalTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核状态"
-              prop="examineStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核人" prop="approvalName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="审核日期" prop="approvalTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
             <el-table-column
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               align="left"
               label="同步到格匠采购入库单"
               prop="gejiangSync"
@@ -519,38 +356,21 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{
-                  scope.row.gejiangSync === 1
-                    ? "同步成功"
-                    : scope.row.gejiangSync === 0
-                    ? "待同步"
-                    : "同步失败"
-                }}
+                {{ scope.row.gejiangSync === 1 ? '同步成功' : scope.row.gejiangSync === 0 ? '待同步' : '同步失败' }}
               </template>
             </el-table-column>
             <el-table-column
               align="left"
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               label="同步格匠失败原因"
               prop="gejiangSyncRemark"
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="180"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
                   style="margin-right: 10px"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.id, 'WAIT')"
@@ -558,10 +378,7 @@
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   style="margin-right: 10px"
                   title="确定撤回吗?"
                   @onConfirm="handleSubmit(scope.row.id, 'SAVE')"
@@ -569,10 +386,7 @@
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'OK'
-                  "
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
                   style="margin-right: 10px"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.id)"
@@ -582,8 +396,7 @@
                 <el-button
                   v-if="
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
                   "
                   type="text"
@@ -594,8 +407,7 @@
                 <el-button
                   v-if="
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 2
                   "
                   type="text"
@@ -604,30 +416,20 @@
                   编辑
                 </el-button>
                 <el-button
-                  v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
-                  "
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   type="text"
                   @click="toExamine(scope.row)"
                 >
                   审单
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)">
-                  详情
-                </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('del', $route.meta.roles) &&
-                    scope.row.examineStatus !== 'OK'
-                  "
+                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
                 >
-                  <el-button slot="reference" type="text" style="color: #f56c6c"
-                    >删除</el-button
-                  >
+                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -649,69 +451,42 @@
       </div>
     </div>
 
-    <ExamineDialog
-      :is-show.sync="isShowExamineDialog"
-      :examine-form.sync="examineForm"
-    />
-
-    <ApplyDetail
-      v-if="isShowDetail"
-      ref="refDetail"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyExamine
-      v-if="isShowExamine"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyForm
-      v-if="isShowForm"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyReturnForm
-      v-if="isShowReturnForm"
-      :list-item="queryItem"
-      :is-show="isShow"
-      @backListFormDetail="backList"
-    />
+    <ExamineDialog :is-show.sync="isShowExamineDialog" :examine-form.sync="examineForm" />
+
+    <ApplyDetail v-if="isShowDetail" ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyReturnForm v-if="isShowReturnForm" :list-item="queryItem" :is-show="isShow" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getApplyList,
-  submitApply,
-  deleteApply,
-  abandonApply,
-  examineBatchApply,
-} from "@/api/supply/apply";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import ApplyDetail from "@/views/supply/apply/components/apply_detail";
-import ApplyExamine from "@/views/supply/apply/components/apply_examine";
-import ApplyForm from "@/views/supply/apply/components/apply_form";
-import ApplyReturnForm from "@/views/supply/apply/components/apply_return_form";
-import ExamineDialog from "@/components/Common/examine-dialog";
-
-let that;
+import { getApplyList, submitApply, deleteApply, abandonApply, examineBatchApply } from '@/api/supply/apply'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import ApplyDetail from '@/views/supply/apply/components/apply_detail'
+import ApplyExamine from '@/views/supply/apply/components/apply_examine'
+import ApplyForm from '@/views/supply/apply/components/apply_form'
+import ApplyReturnForm from '@/views/supply/apply/components/apply_return_form'
+import ExamineDialog from '@/components/Common/examine-dialog'
+
+let that
 export default {
   components: {
     ApplyDetail,
     ApplyExamine,
     ApplyForm,
     ApplyReturnForm,
-    ExamineDialog,
+    ExamineDialog
   },
   filters: {
     statusFilter(val) {
-      const obj = that.statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      const obj = that.statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
-      const obj = that.orderTypeList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+      const obj = that.orderTypeList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -722,34 +497,34 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        status: "",
-        orderNum: "",
-        warehouse: "",
-        jxsNum: "",
-        jxsName: "",
-        date: "",
-        chName: "",
-        model: "",
-        salesMan: "",
-        orderType: "",
-        mainOrderId: "",
-        k3ServiceId: "",
-        serviceId: "",
-        categoryId: "",
-        approvalName: "",
-        createBy: "",
+        status: '',
+        orderNum: '',
+        warehouse: '',
+        jxsNum: '',
+        jxsName: '',
+        date: '',
+        chName: '',
+        model: '',
+        salesMan: '',
+        orderType: '',
+        mainOrderId: '',
+        k3ServiceId: '',
+        serviceId: '',
+        categoryId: '',
+        approvalName: '',
+        createBy: ''
       },
       statusList: [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         //  // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
+        { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
-        { label: "发货申请单", value: 1 },
-        { label: "退货申请单", value: 2 },
-        { label: "直调发货单", value: 3 },
+        { label: '发货申请单', value: 1 },
+        { label: '退货申请单', value: 2 },
+        { label: '直调发货单', value: 3 }
       ],
       salesmanList: [],
 
@@ -763,11 +538,11 @@ export default {
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
-        status: "",
-        remark: "",
+        status: '',
+        remark: ''
       },
-      categoryList: [],
-    };
+      categoryList: []
+    }
   },
 
   computed: {
@@ -779,8 +554,8 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         k3ServiceId: this.screenForm.k3ServiceId,
         serviceId: this.screenForm.serviceId,
@@ -788,36 +563,36 @@ export default {
         type: this.screenForm.orderType,
         mainOrderId: this.screenForm.mainOrderId,
         categoryId: this.screenForm.categoryId,
-        approvalName: this.screenForm.approvalName,
-      };
-    },
+        approvalName: this.screenForm.approvalName
+      }
+    }
   },
 
   watch: {
     multipleSelection(data) {
       // 监听选中状态
-      this.selectRow = [];
+      this.selectRow = []
       if (data.length > 0) {
         data.forEach((item, index) => {
-          this.selectRow.push(item.id);
-        });
+          this.selectRow.push(item.id)
+        })
       }
-    },
+    }
   },
 
   beforeCreate() {
-    that = this;
+    that = this
   },
 
   created() {
-    this.getSalesmanList();
-    this.getList();
-    this.getCategoryList();
-    this.isShow = false;
+    this.getSalesmanList()
+    this.getList()
+    this.getCategoryList()
+    this.isShow = false
     if (this.$route.query && this.$route.query.isShow) {
-      this.isShow = this.$route.query.isShow;
+      this.isShow = this.$route.query.isShow
 
-      this.toReturnForm();
+      this.toReturnForm()
     }
   },
   //   activated() {
@@ -836,15 +611,15 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
@@ -857,167 +632,162 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         serviceId: this.screenForm.salesMan,
         type: this.screenForm.orderType,
         k3ServiceId: this.screenForm.k3ServiceId,
         mainOrderId: this.screenForm.mainOrderId,
         categoryId: this.screenForm.categoryId,
-        approvalName: this.screenForm.approvalName,
-      };
-      getApplyList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["refundableQty", "retiredQty"];
-          item.sums2 = [
-            "singlePayPrice",
-            "payAmount",
-            "payRebateAmount",
-            "totalDiscAmount",
-          ];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        approvalName: this.screenForm.approvalName
+      }
+      getApplyList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['refundableQty', 'retiredQty']
+          item.sums2 = ['singlePayPrice', 'payAmount', 'payRebateAmount', 'totalDiscAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
     handleCollapse() {
       this.isCollapse = !this.isCollapse
     },
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入表单
     toForm(item) {
-      this.queryItem = item;
-      this.isShowForm = true;
+      this.queryItem = item
+      this.isShowForm = true
     },
 
     // 进入表单
     toReturnForm(item) {
-      this.queryItem = item;
-      this.isShowReturnForm = true;
+      this.queryItem = item
+      this.isShowReturnForm = true
     },
 
     // 进入审批
     toExamine(item) {
-      this.queryItem = item;
-      this.isShowExamine = true;
+      this.queryItem = item
+      this.isShowExamine = true
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
-      this.isShowDetail = true;
+      this.queryItem = item
+      this.isShowDetail = true
       this.$nextTick(() => {
-        this.$refs.refDetail.initPrint();
-      });
+        this.$refs.refDetail.initPrint()
+      })
 
       // this.$refs.refDetail.initPrint()
     },
 
     backList() {
-      this.queryItem = {};
-      this.isShowDetail = false;
-      this.isShowExamine = false;
-      this.isShowForm = false;
-      this.isShowReturnForm = false;
+      this.queryItem = {}
+      this.isShowDetail = false
+      this.isShowExamine = false
+      this.isShowForm = false
+      this.isShowReturnForm = false
     },
 
     handleDelete(id) {
-      deleteApply({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      deleteApply({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 申请/撤回
     handleSubmit(id, examineStatus) {
-      submitApply({ id, examineStatus }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      submitApply({ id, examineStatus }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 弃审
     handleAbandon(id) {
-      abandonApply({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      abandonApply({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     handleSelectionChange(val) {
-      this.multipleSelection = val;
+      this.multipleSelection = val
       if (val) {
-        this.selections = val;
+        this.selections = val
       } else {
-        this.selections = [];
+        this.selections = []
       }
     },
 
     rowClass({ row, rowIndex }) {
       if (this.selectRow.includes(row.id)) {
-        return { "background-color": "#ecf5ff" };
+        return { 'background-color': '#ecf5ff' }
       }
     },
 
     // 打开 批量审批
     batchExamine() {
-      this.isShowExamineDialog = true;
+      this.isShowExamineDialog = true
     },
 
     // 提交 批量审批
     submitExamineForm() {
-      let ids = this.multipleSelection.map((item) => {
-        return item.id;
-      });
-      ids = Array.from(new Set(ids));
+      let ids = this.multipleSelection.map(item => {
+        return item.id
+      })
+      ids = Array.from(new Set(ids))
       examineBatchApply({
-        ids: ids.join(","),
+        ids: ids.join(','),
         examineStatus: this.examineForm.status,
-        approvalRemark: this.examineForm.remark,
-      }).then((res) => {
-        this.isShowExamineDialog = false;
-        this.getList();
-        this.$successMsg("审批成功");
-      });
+        approvalRemark: this.examineForm.remark
+      }).then(res => {
+        this.isShowExamineDialog = false
+        this.getList()
+        this.$successMsg('审批成功')
+      })
     },
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
-    },
-  },
-};
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

+ 185 - 417
src/views/supply/apply/engin_list.vue

@@ -1,10 +1,6 @@
 <template>
   <div class="app-container">
-    <div
-      v-show="
-        !isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm
-      "
-    >
+    <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
         <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
@@ -196,10 +192,7 @@
             >
           </div>
           <div class="fr">
-            <ExportButton
-              :ex-url="'invoice/listProjectExport'"
-              :ex-params="exParams"
-            />
+            <ExportButton :ex-url="'invoice/listProjectExport'" :ex-params="exParams" />
           </div>
         </div>
         <div class="table">
@@ -215,44 +208,18 @@
             @selection-change="handleSelectionChange"
           >
             <!--            :selectable="selectable"-->
-            <el-table-column
-              align="center"
-              type="selection"
-              width="55"
-              fixed="left"
-              :selectable="selectable"
-            />
-            <el-table-column
-              align="left"
-              label="订单状态"
-              prop="type"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="center" type="selection" width="55" fixed="left" :selectable="selectable" />
+            <el-table-column align="left" label="订单状态" prop="type" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.automaticStatus ? "非计划单推发货" : "计划单推发货"
-                }}
+                {{ scope.row.automaticStatus ? '非计划单推发货' : '计划单推发货' }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单类型"
-              prop="type"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.type | orderTypeFilter }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="发货申请单"
-              prop="id"
-              min-width="130"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货申请单" prop="id" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
@@ -265,28 +232,12 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.type === 3
-                    ? scope.row.stockName
-                    : scope.row.correspondName
-                }}
+                {{ scope.row.type === 3 ? scope.row.stockName : scope.row.correspondName }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单号"
-              prop="enginOrderNo"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.enginOrderNo" />
                 <span>{{ scope.row.enginOrderNo }}</span>
@@ -319,13 +270,7 @@
               show-overflow-tooltip
             />
 
-            <el-table-column
-              align="left"
-              label="使用单位"
-              prop="refUseUnit"
-              min-width="120"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="使用单位" prop="refUseUnit" min-width="120" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="经销商编码"
@@ -338,25 +283,13 @@
                 <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialCode"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
                 <span>{{ scope.row.materialCode }}</span>
@@ -374,80 +307,32 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品类别"
-              prop="categoryName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品类别" prop="categoryName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 <span>{{ scope.row.categoryName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="文件编号"
-              prop="itemFileNo"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="refundableQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="含税单价"
-              prop="singlePayPrice"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="文件编号" prop="itemFileNo" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.singlePayPrice | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="价税合计"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
@@ -474,34 +359,10 @@
                 {{ scope.row.totalDiscAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单备注"
-              prop="headerRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="发货申请备注"
-              prop="remark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="表体备注"
-              prop="invoiceRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="表头业务员"
@@ -509,59 +370,20 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="区域"
-              prop="refRegionWork"
-              min-width="160"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="区域" prop="refRegionWork" min-width="160" show-overflow-tooltip />
 
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approvalName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="审核人" prop="approvalName" min-width="100" show-overflow-tooltip />
 
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="approvalTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核状态"
-              prop="examineStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="审核日期" prop="approvalTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
             <el-table-column
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               align="left"
               label="同步到格匠采购入库单"
               prop="gejiangSync"
@@ -569,32 +391,18 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{
-                  scope.row.gejiangSync === 1
-                    ? "同步成功"
-                    : scope.row.gejiangSync === 0
-                    ? "待同步"
-                    : "同步失败"
-                }}
+                {{ scope.row.gejiangSync === 1 ? '同步成功' : scope.row.gejiangSync === 0 ? '待同步' : '同步失败' }}
               </template>
             </el-table-column>
             <el-table-column
               align="left"
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               label="同步格匠失败原因"
               prop="gejiangSyncRemark"
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="180"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
@@ -636,8 +444,7 @@
                   v-if="
                     !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
                   "
                   type="text"
@@ -649,8 +456,7 @@
                   v-if="
                     !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 2
                   "
                   type="text"
@@ -669,22 +475,15 @@
                 >
                   审单
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)">
-                  详情
-                </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK'
-                  "
+                  v-if="!scope.row.automaticStatus && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
                 >
-                  <el-button slot="reference" type="text" style="color: #f56c6c"
-                    >删除</el-button
-                  >
+                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -706,68 +505,42 @@
       </div>
     </div>
 
-    <ExamineDialog
-      :is-show.sync="isShowExamineDialog"
-      :examine-form.sync="examineForm"
-    />
+    <ExamineDialog :is-show.sync="isShowExamineDialog" :examine-form.sync="examineForm" />
 
-    <EnginDetail
-      v-if="isShowDetail"
-      ref="refDetail"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <EnginExamine
-      v-if="isShowExamine"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <EnginForm
-      v-if="isShowForm"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <EnginReturnForm
-      v-if="isShowReturnForm"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
+    <EnginDetail v-if="isShowDetail" ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
+    <EnginExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
+    <EnginForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
+    <EnginReturnForm v-if="isShowReturnForm" :list-item="queryItem" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getEnginList,
-  submitEngin,
-  deleteEngin,
-  abandonEngin,
-  examineBatchEngin,
-} from "@/api/supply/apply";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import EnginDetail from "@/views/supply/apply/components/engin_detail";
-import EnginExamine from "@/views/supply/apply/components/engin_examine";
-import EnginForm from "@/views/supply/apply/components/engin_form";
-import EnginReturnForm from "@/views/supply/apply/components/engin_return_form";
-import ExamineDialog from "@/components/Common/examine-dialog";
-
-let that;
+import { getEnginList, submitEngin, deleteEngin, abandonEngin, examineBatchEngin } from '@/api/supply/apply'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import EnginDetail from '@/views/supply/apply/components/engin_detail'
+import EnginExamine from '@/views/supply/apply/components/engin_examine'
+import EnginForm from '@/views/supply/apply/components/engin_form'
+import EnginReturnForm from '@/views/supply/apply/components/engin_return_form'
+import ExamineDialog from '@/components/Common/examine-dialog'
+
+let that
 export default {
   components: {
     EnginDetail,
     EnginExamine,
     EnginForm,
     EnginReturnForm,
-    ExamineDialog,
+    ExamineDialog
   },
   filters: {
     statusFilter(val) {
-      const obj = that.statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      const obj = that.statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
-      const obj = that.orderTypeList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+      const obj = that.orderTypeList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -778,36 +551,36 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        status: "",
-        orderNum: "",
-        warehouse: "",
-        jxsNum: "",
-        jxsName: "",
-        date: "",
-        chName: "",
-        model: "",
-        salesMan: "",
-        orderType: "",
-        mainOrderId: "",
-        refEnginRecordNo: "",
-        refUseUnit: "",
-        k3ServiceId: "",
-        categoryId: "",
-        approvalName: "",
-        refRegionWork: "",
-        createBy: "",
+        status: '',
+        orderNum: '',
+        warehouse: '',
+        jxsNum: '',
+        jxsName: '',
+        date: '',
+        chName: '',
+        model: '',
+        salesMan: '',
+        orderType: '',
+        mainOrderId: '',
+        refEnginRecordNo: '',
+        refUseUnit: '',
+        k3ServiceId: '',
+        categoryId: '',
+        approvalName: '',
+        refRegionWork: '',
+        createBy: ''
       },
       statusList: [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         //  // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
+        { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
-        { label: "发货申请单", value: 1 },
-        { label: "退货申请单", value: 2 },
-        { label: "直调发货单", value: 3 },
+        { label: '发货申请单', value: 1 },
+        { label: '退货申请单', value: 2 },
+        { label: '直调发货单', value: 3 }
       ],
       salesmanList: [],
 
@@ -821,12 +594,12 @@ export default {
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
-        status: "",
-        remark: "",
+        status: '',
+        remark: ''
       },
       isShow: false,
-      categoryList: [],
-    };
+      categoryList: []
+    }
   },
 
   computed: {
@@ -838,8 +611,8 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         serviceId: this.screenForm.salesMan,
         k3ServiceId: this.screenForm.k3ServiceId,
@@ -850,35 +623,35 @@ export default {
         refUseUnit: this.screenForm.refUseUnit,
         categoryId: this.screenForm.categoryId,
         approvalName: this.screenForm.approvalName,
-        refRegionWork: this.screenForm.refRegionWork,
-      };
-    },
+        refRegionWork: this.screenForm.refRegionWork
+      }
+    }
   },
 
   watch: {
     multipleSelection(data) {
       // 监听选中状态
-      this.selectRow = [];
+      this.selectRow = []
       if (data.length > 0) {
         data.forEach((item, index) => {
-          this.selectRow.push(item.id);
-        });
+          this.selectRow.push(item.id)
+        })
       }
-    },
+    }
   },
 
   beforeCreate() {
-    that = this;
+    that = this
   },
 
   created() {
-    this.getSalesmanList();
-    this.getList();
-    this.getCategoryList();
-    this.isShow = false;
+    this.getSalesmanList()
+    this.getList()
+    this.getCategoryList()
+    this.isShow = false
     if (this.$route.query && this.$route.query.isShow) {
-      this.isShow = this.$route.query.isShow;
-      this.toReturnForm();
+      this.isShow = this.$route.query.isShow
+      this.toReturnForm()
     }
   },
   // activated() {
@@ -896,15 +669,15 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
@@ -915,8 +688,8 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         createBy: this.screenForm.createBy,
 
@@ -928,152 +701,147 @@ export default {
         refUseUnit: this.screenForm.refUseUnit,
         categoryId: this.screenForm.categoryId,
         approvalName: this.screenForm.approvalName,
-        refRegionWork: this.screenForm.refRegionWork,
-      };
-      getEnginList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["refundableQty"];
-          item.sums2 = [
-            "singlePayPrice",
-            "payAmount",
-            "payRebateAmount",
-            "totalDiscAmount",
-          ];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        refRegionWork: this.screenForm.refRegionWork
+      }
+      getEnginList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['refundableQty']
+          item.sums2 = ['singlePayPrice', 'payAmount', 'payRebateAmount', 'totalDiscAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入表单
     toForm(item) {
-      this.queryItem = item;
-      this.isShowForm = true;
+      this.queryItem = item
+      this.isShowForm = true
     },
 
     // 进入表单
     toReturnForm(item) {
-      this.queryItem = item;
-      this.isShowReturnForm = true;
+      this.queryItem = item
+      this.isShowReturnForm = true
     },
 
     // 进入审批
     toExamine(item) {
-      this.queryItem = item;
-      this.isShowExamine = true;
+      this.queryItem = item
+      this.isShowExamine = true
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
-      this.isShowDetail = true;
+      this.queryItem = item
+      this.isShowDetail = true
       this.$nextTick(() => {
-        this.$refs.refDetail.initPrint();
-      });
+        this.$refs.refDetail.initPrint()
+      })
     },
 
     backList() {
-      this.queryItem = {};
-      this.isShowDetail = false;
-      this.isShowExamine = false;
-      this.isShowForm = false;
-      this.isShowReturnForm = false;
+      this.queryItem = {}
+      this.isShowDetail = false
+      this.isShowExamine = false
+      this.isShowForm = false
+      this.isShowReturnForm = false
     },
 
     handleDelete(id) {
-      deleteEngin({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      deleteEngin({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 申请/撤回
     handleSubmit(id, examineStatus) {
-      submitEngin({ id, examineStatus }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      submitEngin({ id, examineStatus }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 弃审
     handleAbandon(id) {
-      abandonEngin({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      abandonEngin({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     handleSelectionChange(val) {
-      this.multipleSelection = val;
+      this.multipleSelection = val
       if (val) {
-        this.selections = val;
+        this.selections = val
       } else {
-        this.selections = [];
+        this.selections = []
       }
     },
 
     rowClass({ row, rowIndex }) {
       if (this.selectRow.includes(row.id)) {
-        return { "background-color": "#ecf5ff" };
+        return { 'background-color': '#ecf5ff' }
       }
     },
 
     // 打开 批量审批
     batchExamine() {
-      this.isShowExamineDialog = true;
+      this.isShowExamineDialog = true
     },
 
     // 提交 批量审批
     submitExamineForm() {
-      let ids = this.multipleSelection.map((item) => {
-        return item.id;
-      });
-      ids = Array.from(new Set(ids));
+      let ids = this.multipleSelection.map(item => {
+        return item.id
+      })
+      ids = Array.from(new Set(ids))
       examineBatchEngin({
-        ids: ids.join(","),
+        ids: ids.join(','),
         examineStatus: this.examineForm.status,
-        approvalRemark: this.examineForm.remark,
-      }).then((res) => {
-        this.isShowExamineDialog = false;
-        this.getList();
-        this.$successMsg("审批成功");
-      });
+        approvalRemark: this.examineForm.remark
+      }).then(res => {
+        this.isShowExamineDialog = false
+        this.getList()
+        this.$successMsg('审批成功')
+      })
     },
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
     },
     /**
      * 根据条件禁用行复选框
@@ -1084,15 +852,15 @@ export default {
      */
     selectable: function (row, index) {
       if (row.automaticStatus) {
-        return false;
+        return false
       }
-      return true;
+      return true
       // 函数必须有返回值且是布尔值
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
       // 如果没有返回值则默认返回false(全部无法选中)
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

+ 202 - 478
src/views/supply/apply/new_apply.vue

@@ -1,63 +1,38 @@
 <template>
   <div class="app-container">
-    <div
-      v-show="
-        !isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm
-      "
-    >
+    <div v-show="!isShowDetail && !isShowExamine && !isShowForm && !isShowReturnForm">
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <el-form
-          ref="screenForm"
-          :model="screenForm"
-          label-width="100px"
-          size="mini"
-          label-position="left"
-        >
+        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" 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" @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 v-model="screenForm.orderNum" placeholder="请输入发货申请单" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="仓库名称" prop="warehouse">
-                <el-input
-                  v-model="screenForm.warehouse"
-                  placeholder="请输入仓库名称"
-                />
+                <el-input v-model="screenForm.warehouse" placeholder="请输入仓库名称" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编码" prop="jxsNum">
-                <el-input
-                  v-model="screenForm.jxsNum"
-                  placeholder="请输入经销商编码"
-                />
+                <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码" />
               </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 v-model="screenForm.jxsName" placeholder="请输入经销商名称" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -75,18 +50,12 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="产品名称" prop="chName">
-                <el-input
-                  v-model="screenForm.chName"
-                  placeholder="请输入产品名称"
-                />
+                <el-input v-model="screenForm.chName" placeholder="请输入产品名称" />
               </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 v-model="screenForm.model" placeholder="请输入规格型号" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -129,26 +98,14 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单类型" prop="orderType">
-                <el-select
-                  v-model="screenForm.orderType"
-                  placeholder="请选择"
-                  clearable
-                >
-                  <el-option
-                    v-for="item in orderTypeList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
+                <el-select v-model="screenForm.orderType" placeholder="请选择" clearable>
+                  <el-option v-for="item in orderTypeList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单号" prop="mainOrderId">
-                <el-input
-                  v-model="screenForm.mainOrderId"
-                  placeholder="请输入订单号"
-                />
+                <el-input v-model="screenForm.mainOrderId" placeholder="请输入订单号" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -160,37 +117,24 @@
                   filterable
                   clearable
                 >
-                  <el-option
-                    v-for="item in categoryList"
-                    :key="item.name"
-                    :label="item.name"
-                    :value="item.id"
-                  />
+                  <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="审核人" prop="approvalName">
-                <el-input
-                  v-model="screenForm.approvalName"
-                  placeholder="请输入审核人"
-                />
+                <el-input v-model="screenForm.approvalName" placeholder="请输入审核人" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="制单人" prop="createBy">
-                <el-input
-                  v-model="screenForm.createBy"
-                  placeholder="请输入制单人"
-                />
+                <el-input v-model="screenForm.createBy" placeholder="请输入制单人" />
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
-                <el-button type="primary" @click="submitScreenForm"
-                  >搜索</el-button
-                >
+                <el-button type="primary" @click="submitScreenForm">搜索</el-button>
               </el-form-item>
             </el-col>
           </el-row>
@@ -227,10 +171,7 @@
             >
           </div>
           <div class="fr">
-            <ExportButton
-              :ex-url="'invoice/listExport'"
-              :ex-params="exParams"
-            />
+            <ExportButton :ex-url="'invoice/listExport'" :ex-params="exParams" />
           </div>
         </div>
         <div class="table">
@@ -245,30 +186,13 @@
             :summary-method="$getSummaries"
             @selection-change="handleSelectionChange"
           >
-            <el-table-column
-              align="center"
-              type="selection"
-              width="55"
-              fixed="left"
-            />
-            <el-table-column
-              align="left"
-              label="订单类型"
-              prop="type"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="center" type="selection" width="55" fixed="left" />
+            <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.type | orderTypeFilter }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="发货申请单"
-              prop="id"
-              min-width="130"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货申请单" prop="id" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
@@ -281,28 +205,12 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.type === 3
-                    ? scope.row.stockName
-                    : scope.row.correspondName
-                }}
+                {{ scope.row.type === 3 ? scope.row.stockName : scope.row.correspondName }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单号"
-              prop="mainOrderId"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单号" prop="mainOrderId" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.mainOrderId" />
                 <span>{{ scope.row.mainOrderId }}</span>
@@ -320,25 +228,13 @@
                 <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialCode"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
                 <span>{{ scope.row.materialCode }}</span>
@@ -356,37 +252,19 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品类别"
-              prop="categoryName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品类别" prop="categoryName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 <span>{{ scope.row.categoryName }}</span>
               </template>
@@ -398,52 +276,16 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="文件编号"
-              prop="itemFileNo"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="refundableQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="已退数量"
-              prop="retiredQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="含税单价"
-              prop="singlePayPrice"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="文件编号" prop="itemFileNo" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.singlePayPrice | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="价税合计"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
@@ -470,27 +312,9 @@
                 {{ scope.row.totalDiscAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单备注"
-              prop="headerRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="发货申请备注"
-              prop="remark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="表体备注"
-              prop="invoiceRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="审批说明"
@@ -498,13 +322,7 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="表头业务员"
@@ -512,50 +330,17 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approvalName"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="approvalTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核状态"
-              prop="examineStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核人" prop="approvalName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="审核日期" prop="approvalTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
             <el-table-column
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               align="left"
               label="同步到格匠采购入库单"
               prop="gejiangSync"
@@ -565,38 +350,27 @@
               <template slot-scope="scope">
                 {{
                   scope.row.gejiangSync === 1
-                    ? "同步成功"
+                    ? '同步成功'
                     : scope.row.gejiangSync === 0
-                    ? "待同步"
+                    ? '待同步'
                     : scope.row.gejiangSync === -1
-                    ? "同步失败"
-                    : ""
+                    ? '同步失败'
+                    : ''
                 }}
               </template>
             </el-table-column>
             <el-table-column
               align="left"
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               label="同步格匠失败原因"
               prop="gejiangSyncRemark"
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="180"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
                   style="margin-right: 10px"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.id, 'WAIT')"
@@ -604,10 +378,7 @@
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   style="margin-right: 10px"
                   title="确定撤回吗?"
                   @onConfirm="handleSubmit(scope.row.id, 'SAVE')"
@@ -615,10 +386,7 @@
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'OK'
-                  "
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
                   style="margin-right: 10px"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.id)"
@@ -628,8 +396,7 @@
                 <el-button
                   v-if="
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
                   "
                   type="text"
@@ -640,8 +407,7 @@
                 <el-button
                   v-if="
                     $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' ||
-                      scope.row.examineStatus === 'FAIL') &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 2
                   "
                   type="text"
@@ -650,30 +416,20 @@
                   编辑
                 </el-button>
                 <el-button
-                  v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
-                  "
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                   type="text"
                   @click="toExamine(scope.row)"
                 >
                   审单
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)">
-                  详情
-                </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <el-popconfirm
-                  v-if="
-                    $checkBtnRole('del', $route.meta.roles) &&
-                    scope.row.examineStatus !== 'OK'
-                  "
+                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
                 >
-                  <el-button slot="reference" type="text" style="color: #f56c6c"
-                    >删除</el-button
-                  >
+                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -695,69 +451,42 @@
       </div>
     </div>
 
-    <ExamineDialog
-      :is-show.sync="isShowExamineDialog"
-      :examine-form.sync="examineForm"
-    />
+    <ExamineDialog :is-show.sync="isShowExamineDialog" :examine-form.sync="examineForm" />
 
-    <ApplyDetail
-      v-if="isShowDetail"
-      ref="refDetail"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyExamine
-      v-if="isShowExamine"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyForm
-      v-if="isShowForm"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
-    <ApplyReturnForm
-      v-if="isShowReturnForm"
-      :list-item="queryItem"
-      :is-show="isShow"
-      @backListFormDetail="backList"
-    />
+    <ApplyDetail v-if="isShowDetail" ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
+    <ApplyReturnForm v-if="isShowReturnForm" :list-item="queryItem" :is-show="isShow" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getApplyList,
-  submitApply,
-  deleteApply,
-  abandonApply,
-  examineBatchApply,
-} from "@/api/supply/apply";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import ApplyDetail from "@/views/supply/apply/components/apply_detail";
-import ApplyExamine from "@/views/supply/apply/components/apply_examine";
-import ApplyForm from "@/views/supply/apply/components/apply_form";
-import ApplyReturnForm from "@/views/supply/apply/components/apply_return_form";
-import ExamineDialog from "@/components/Common/examine-dialog";
-
-let that;
+import { getApplyList, submitApply, deleteApply, abandonApply, examineBatchApply } from '@/api/supply/apply'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import ApplyDetail from '@/views/supply/apply/components/apply_detail'
+import ApplyExamine from '@/views/supply/apply/components/apply_examine'
+import ApplyForm from '@/views/supply/apply/components/apply_form'
+import ApplyReturnForm from '@/views/supply/apply/components/apply_return_form'
+import ExamineDialog from '@/components/Common/examine-dialog'
+
+let that
 export default {
   components: {
     ApplyDetail,
     ApplyExamine,
     ApplyForm,
     ApplyReturnForm,
-    ExamineDialog,
+    ExamineDialog
   },
   filters: {
     statusFilter(val) {
-      const obj = that.statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
+      const obj = that.statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
-      const obj = that.orderTypeList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+      const obj = that.orderTypeList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -768,34 +497,34 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        status: "",
-        orderNum: "",
-        warehouse: "",
-        jxsNum: "",
-        jxsName: "",
-        date: "",
-        chName: "",
-        model: "",
-        salesMan: "",
-        orderType: "",
-        mainOrderId: "",
-        k3ServiceId: "",
-        serviceId: "",
-        categoryId: "",
-        approvalName: "",
-        createBy: "",
+        status: '',
+        orderNum: '',
+        warehouse: '',
+        jxsNum: '',
+        jxsName: '',
+        date: '',
+        chName: '',
+        model: '',
+        salesMan: '',
+        orderType: '',
+        mainOrderId: '',
+        k3ServiceId: '',
+        serviceId: '',
+        categoryId: '',
+        approvalName: '',
+        createBy: ''
       },
       statusList: [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         //  // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
+        { label: '已关闭', value: 'CLOSE' }
       ],
       orderTypeList: [
-        { label: "发货申请单", value: 1 },
-        { label: "退货申请单", value: 2 },
-        { label: "直调发货单", value: 3 },
+        { label: '发货申请单', value: 1 },
+        { label: '退货申请单', value: 2 },
+        { label: '直调发货单', value: 3 }
       ],
       salesmanList: [],
 
@@ -809,11 +538,11 @@ export default {
       multipleSelection: [],
       isShowExamineDialog: false,
       examineForm: {
-        status: "",
-        remark: "",
+        status: '',
+        remark: ''
       },
-      categoryList: [],
-    };
+      categoryList: []
+    }
   },
 
   computed: {
@@ -825,8 +554,8 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         k3ServiceId: this.screenForm.k3ServiceId,
         serviceId: this.screenForm.serviceId,
@@ -834,36 +563,36 @@ export default {
         type: this.screenForm.orderType,
         mainOrderId: this.screenForm.mainOrderId,
         categoryId: this.screenForm.categoryId,
-        approvalName: this.screenForm.approvalName,
-      };
-    },
+        approvalName: this.screenForm.approvalName
+      }
+    }
   },
 
   watch: {
     multipleSelection(data) {
       // 监听选中状态
-      this.selectRow = [];
+      this.selectRow = []
       if (data.length > 0) {
         data.forEach((item, index) => {
-          this.selectRow.push(item.id);
-        });
+          this.selectRow.push(item.id)
+        })
       }
-    },
+    }
   },
 
   beforeCreate() {
-    that = this;
+    that = this
   },
 
   created() {
-    this.getSalesmanList();
-    this.getList();
-    this.getCategoryList();
-    this.isShow = false;
+    this.getSalesmanList()
+    this.getList()
+    this.getCategoryList()
+    this.isShow = false
     if (this.$route.query && this.$route.query.isShow) {
-      this.isShow = this.$route.query.isShow;
+      this.isShow = this.$route.query.isShow
 
-      this.toReturnForm();
+      this.toReturnForm()
     }
   },
   //   activated() {
@@ -882,15 +611,15 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
@@ -903,165 +632,160 @@ export default {
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         examineStatus: this.screenForm.status,
         serviceId: this.screenForm.salesMan,
         type: this.screenForm.orderType,
         k3ServiceId: this.screenForm.k3ServiceId,
         mainOrderId: this.screenForm.mainOrderId,
         categoryId: this.screenForm.categoryId,
-        approvalName: this.screenForm.approvalName,
-      };
-      getApplyList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["refundableQty", "retiredQty"];
-          item.sums2 = [
-            "singlePayPrice",
-            "payAmount",
-            "payRebateAmount",
-            "totalDiscAmount",
-          ];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        approvalName: this.screenForm.approvalName
+      }
+      getApplyList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['refundableQty', 'retiredQty']
+          item.sums2 = ['singlePayPrice', 'payAmount', 'payRebateAmount', 'totalDiscAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入表单
     toForm(item) {
-      this.queryItem = item;
-      this.isShowForm = true;
+      this.queryItem = item
+      this.isShowForm = true
     },
 
     // 进入表单
     toReturnForm(item) {
-      this.queryItem = item;
-      this.isShowReturnForm = true;
+      this.queryItem = item
+      this.isShowReturnForm = true
     },
 
     // 进入审批
     toExamine(item) {
-      this.queryItem = item;
-      this.isShowExamine = true;
+      this.queryItem = item
+      this.isShowExamine = true
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
-      this.isShowDetail = true;
+      this.queryItem = item
+      this.isShowDetail = true
       this.$nextTick(() => {
-        this.$refs.refDetail.initPrint();
-      });
+        this.$refs.refDetail.initPrint()
+      })
 
       // this.$refs.refDetail.initPrint()
     },
 
     backList() {
-      this.queryItem = {};
-      this.isShowDetail = false;
-      this.isShowExamine = false;
-      this.isShowForm = false;
-      this.isShowReturnForm = false;
+      this.queryItem = {}
+      this.isShowDetail = false
+      this.isShowExamine = false
+      this.isShowForm = false
+      this.isShowReturnForm = false
     },
 
     handleDelete(id) {
-      deleteApply({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      deleteApply({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 申请/撤回
     handleSubmit(id, examineStatus) {
-      submitApply({ id, examineStatus }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      submitApply({ id, examineStatus }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 弃审
     handleAbandon(id) {
-      abandonApply({ id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      abandonApply({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     handleSelectionChange(val) {
-      this.multipleSelection = val;
+      this.multipleSelection = val
       if (val) {
-        this.selections = val;
+        this.selections = val
       } else {
-        this.selections = [];
+        this.selections = []
       }
     },
 
     rowClass({ row, rowIndex }) {
       if (this.selectRow.includes(row.id)) {
-        return { "background-color": "#ecf5ff" };
+        return { 'background-color': '#ecf5ff' }
       }
     },
 
     // 打开 批量审批
     batchExamine() {
-      this.isShowExamineDialog = true;
+      this.isShowExamineDialog = true
     },
 
     // 提交 批量审批
     submitExamineForm() {
-      let ids = this.multipleSelection.map((item) => {
-        return item.id;
-      });
-      ids = Array.from(new Set(ids));
+      let ids = this.multipleSelection.map(item => {
+        return item.id
+      })
+      ids = Array.from(new Set(ids))
       examineBatchApply({
-        ids: ids.join(","),
+        ids: ids.join(','),
         examineStatus: this.examineForm.status,
-        approvalRemark: this.examineForm.remark,
-      }).then((res) => {
-        this.isShowExamineDialog = false;
-        this.getList();
-        this.$successMsg("审批成功");
-      });
+        approvalRemark: this.examineForm.remark
+      }).then(res => {
+        this.isShowExamineDialog = false
+        this.getList()
+        this.$successMsg('审批成功')
+      })
     },
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
-    },
-  },
-};
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

Plik diff jest za duży
+ 204 - 491
src/views/supply/apply/new_engin.vue


+ 122 - 313
src/views/supply/deliver/commerce_list.vue

@@ -145,30 +145,12 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column
-              align="left"
-              label="订单类型"
-              prop="type"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单类型" prop="type" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.type == "1"
-                    ? "申请发货单"
-                    : scope.row.type == "2"
-                    ? "退货单"
-                    : "直调发货单"
-                }}
+                {{ scope.row.type == '1' ? '申请发货单' : scope.row.type == '2' ? '退货单' : '直调发货单' }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="发货申请单"
-              prop="id"
-              min-width="130"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货申请单" prop="id" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
@@ -181,28 +163,12 @@
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{
-                  scope.row.type === 3
-                    ? scope.row.stockName
-                    : scope.row.correspondName
-                }}
+                {{ scope.row.type === 3 ? scope.row.stockName : scope.row.correspondName }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单号"
-              prop="enginOrderNo"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.enginOrderNo" />
                 <span>{{ scope.row.enginOrderNo }}</span>
@@ -227,13 +193,7 @@
               min-width="120"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="使用单位"
-              prop="refUseUnit"
-              min-width="120"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="使用单位" prop="refUseUnit" min-width="120" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="经销商编码"
@@ -246,25 +206,13 @@
                 <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialCode"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
                 <span>{{ scope.row.materialCode }}</span>
@@ -282,62 +230,26 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="refundableQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="含税单价"
-              prop="singlePayPrice"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.singlePayPrice | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="价税合计"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
@@ -364,34 +276,10 @@
                 {{ scope.row.totalDiscAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单备注"
-              prop="headerRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="发货申请备注"
-              prop="remark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="表体备注"
-              prop="invoiceRemark"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="表头业务员"
@@ -399,58 +287,19 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="区域"
-              prop="refRegionWork"
-              min-width="160"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="区域" prop="refRegionWork" min-width="160" show-overflow-tooltip />
 
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="approvalName"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="approvalTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审核状态"
-              prop="examineStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="审核人" prop="approvalName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="审核日期" prop="approvalTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
             <el-table-column
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               align="left"
               label="同步到格匠采购入库单"
               prop="gejiangSync"
@@ -458,48 +307,22 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{
-                  scope.row.gejiangSync === 1
-                    ? "同步成功"
-                    : scope.row.gejiangSync === 0
-                    ? "待同步"
-                    : "同步失败"
-                }}
+                {{ scope.row.gejiangSync === 1 ? '同步成功' : scope.row.gejiangSync === 0 ? '待同步' : '同步失败' }}
               </template>
             </el-table-column>
             <el-table-column
               align="left"
-              v-if="
-                this.$store.getters.customerNumber === '100093' ||
-                this.$store.getters.customerNumber === '600023'
-              "
+              v-if="this.$store.getters.customerNumber === '100093' || this.$store.getters.customerNumber === '600023'"
               label="同步格匠失败原因"
               prop="gejiangSyncRemark"
               min-width="160"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="center"
-              label="操作"
-              width="200"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)"
-                  >详情</el-button
-                >
-                <el-button
-                  v-if="!isDealer"
-                  type="text"
-                  @click="getPassword(scope.row.id)"
-                  >获取密码</el-button
-                >
-                <el-button
-                  v-if="!isDealer"
-                  type="text"
-                  @click="openShareDetail(scope.row.id)"
-                  >密码记录</el-button
-                >
+                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-button v-if="!isDealer" type="text" @click="getPassword(scope.row.id)">获取密码</el-button>
+                <el-button v-if="!isDealer" type="text" @click="openShareDetail(scope.row.id)">密码记录</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -537,12 +360,7 @@
           style="width: 100%"
           max-height="270"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          />
+          <el-table-column align="center" label="序号" type="index" width="50" />
           <el-table-column align="center" prop="printPassword" label="密码" />
           <el-table-column align="center" prop="createTime" label="打印时间" />
         </el-table>
@@ -565,28 +383,19 @@
       </div>
     </el-dialog>
 
-    <CommerceDetail
-      v-if="isShowDetail"
-      ref="refDetail"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
+    <CommerceDetail v-if="isShowDetail" ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getEnginList,
-  getPassword,
-  getPasswordRecord,
-} from "@/api/supply/deliver";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import CommerceDetail from "@/views/supply/deliver/components/commerce_detail";
+import { getEnginList, getPassword, getPasswordRecord } from '@/api/supply/deliver'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import CommerceDetail from '@/views/supply/deliver/components/commerce_detail'
 
-let that;
+let that
 export default {
   components: {
-    CommerceDetail,
+    CommerceDetail
   },
   filters: {
     statusFilter(val) {
@@ -607,19 +416,19 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        orderNum: "",
-        orderNo: "",
-        contractNo: "",
-        warehouse: "",
-        jxsName: "",
-        chName: "",
-        model: "",
-        date: "",
-        jxsNum: "",
-        status: "",
-        salesMan: "",
-        refRegionWork: "",
-        createBy: "",
+        orderNum: '',
+        orderNo: '',
+        contractNo: '',
+        warehouse: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+        salesMan: '',
+        refRegionWork: '',
+        createBy: ''
       },
       categoryList: [],
       salesmanList: [],
@@ -631,8 +440,8 @@ export default {
       dialogTable_pageSize: 10, // 密码记录 - 每页数量
       dialogTable_listTotal: 0, // 密码记录 - 列表总数
 
-      queryItem: {},
-    };
+      queryItem: {}
+    }
   },
 
   computed: {
@@ -645,31 +454,31 @@ export default {
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         categoryName: this.screenForm.type,
         refRegionWork: this.screenForm.refRegionWork,
         serviceId: this.screenForm.salesMan,
         createBy: this.screenForm.createBy,
-        orderType: 3, // 2家用工程 3商用工程
-      };
+        orderType: 3 // 2家用工程 3商用工程
+      }
     },
     isShowDetail() {
-      return this.queryItem.hasOwnProperty("id");
+      return this.queryItem.hasOwnProperty('id')
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   beforeCreate() {
-    that = this;
+    that = this
   },
 
   created() {
-    this.getSalesmanList();
-    this.getCategoryList();
-    this.getList();
+    this.getSalesmanList()
+    this.getCategoryList()
+    this.getList()
   },
 
   methods: {
@@ -679,25 +488,25 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
     },
 
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
 
       const params = {
         pageNum: this.currentPage,
@@ -710,72 +519,72 @@ export default {
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
         refRegionWork: this.screenForm.refRegionWork,
-        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] : '',
         categoryName: this.screenForm.type,
         serviceId: this.screenForm.salesMan,
         createBy: this.screenForm.createBy,
 
-        orderType: 3, // 2家用工程 3商用工程
-      };
-      getEnginList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
-          item.sums1 = ["refundableQty", "notOutNumber"];
-          item.sums2 = [];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        orderType: 3 // 2家用工程 3商用工程
+      }
+      getEnginList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty
+          item.sums1 = ['refundableQty', 'notOutNumber']
+          item.sums2 = []
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
+      this.queryItem = item
       this.$nextTick(() => {
-        this.$refs.refDetail.initPrint();
-      });
+        this.$refs.refDetail.initPrint()
+      })
     },
 
     backList() {
-      this.queryItem = {};
+      this.queryItem = {}
     },
 
     // 获取密码
     getPassword(id) {
-      getPassword({ id }).then((res) => {
-        this.$alert(res.data, "新密码", {
-          confirmButtonText: "确定",
-          callback: (action) => {},
-        });
-      });
+      getPassword({ id }).then(res => {
+        this.$alert(res.data, '新密码', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        })
+      })
     },
 
     // 密码记录 - 获取列表
@@ -783,28 +592,28 @@ export default {
       getPasswordRecord({
         pageNum: this.dialogTable_currentPage,
         pageSize: this.dialogTable_pageSize,
-        id,
-      }).then((res) => {
-        this.dialogTable_dataList = res.data.records;
-        this.dialogTable_listTotal = res.data.total;
-        this.dialogTable_listLoading = false;
-      });
+        id
+      }).then(res => {
+        this.dialogTable_dataList = res.data.records
+        this.dialogTable_listTotal = res.data.total
+        this.dialogTable_listLoading = false
+      })
     },
 
     // 密码记录 - 打开弹窗
     openShareDetail(id) {
-      this.isShowDialog = true;
-      this.dialogTable_currentPage = 1;
-      this.getPasswordRecord(id);
+      this.isShowDialog = true
+      this.dialogTable_currentPage = 1
+      this.getPasswordRecord(id)
     },
 
     // 密码记录 - 更改列表当前页
     dialogTableCurrentChange(val) {
-      this.dialogTable_currentPage = val;
-      this.getPasswordRecord();
-    },
-  },
-};
+      this.dialogTable_currentPage = val
+      this.getPasswordRecord()
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

+ 98 - 278
src/views/supply/deliver/home_list.vue

@@ -131,39 +131,15 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column
-              align="left"
-              label="发货单号"
-              prop="id"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货单号" prop="id" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="发货申请日期"
-              prop="orderTime"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="订单号"
-              prop="enginOrderNo"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="发货申请日期" prop="orderTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.enginOrderNo" />
                 <span>{{ scope.row.enginOrderNo }}</span>
@@ -177,44 +153,20 @@
               show-overflow-tooltip
             />
 
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="使用单位"
-              prop="refUseUnit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="使用单位" prop="refUseUnit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialCode"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
                 <span>{{ scope.row.materialCode }}</span>
@@ -233,40 +185,16 @@
               </template>
             </el-table-column>
 
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
 
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="qty"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="单价"
-              prop="price"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="总金额"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="总金额" prop="payAmount" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="安装地址"
@@ -274,34 +202,10 @@
               min-width="300"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="联系人"
-              prop="refLinkman"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="固定电话"
-              prop="refTel"
-              min-width="150"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="移动电话"
-              prop="refPhone"
-              min-width="150"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="销售类型"
-              prop="saleTypeName"
-              min-width="150"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="联系人" prop="refLinkman" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="固定电话" prop="refTel" min-width="150" show-overflow-tooltip />
+            <el-table-column align="left" label="移动电话" prop="refPhone" min-width="150" show-overflow-tooltip />
+            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="150" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="项目类别"
@@ -330,15 +234,9 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="押金"
-              prop="takeDeposit"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="押金" prop="takeDeposit" min-width="100" show-overflow-tooltip>
               <template v-slot="scope">
-                {{ scope.row.takeDeposit ? "不扣" : "扣" }}
+                {{ scope.row.takeDeposit ? '不扣' : '扣' }}
               </template>
             </el-table-column>
             <el-table-column
@@ -348,13 +246,7 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="备注信息"
-              prop="headerRemark"
-              min-width="200"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="备注信息" prop="headerRemark" min-width="200" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="格力内部备注"
@@ -362,20 +254,8 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="区域"
-              prop="refRegionWork"
-              min-width="300"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="业务员"
-              prop="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="区域" prop="refRegionWork" min-width="300" show-overflow-tooltip />
+            <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="实装物料编码"
@@ -397,13 +277,7 @@
               min-width="300"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="发货申请备注"
-              prop="remark"
-              min-width="200"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="发货申请备注" prop="remark" min-width="200" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="二级经销商代码"
@@ -424,61 +298,21 @@
                 <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="200"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="200"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审单人"
-              prop="approvalName"
-              min-width="200"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="审单日期"
-              prop="approvalTime"
-              min-width="200"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="right"
-              label="返利金额"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="200" show-overflow-tooltip />
+            <el-table-column align="left" label="制单日期" prop="createTime" min-width="200" show-overflow-tooltip />
+            <el-table-column align="left" label="审单人" prop="approvalName" min-width="200" show-overflow-tooltip />
+            <el-table-column align="left" label="审单日期" prop="approvalTime" min-width="200" show-overflow-tooltip />
+            <el-table-column align="right" label="返利金额" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payRebateAmount | numToFixed }}
               </template>
             </el-table-column>
 
-            <el-table-column
-              align="center"
-              label="操作"
-              width="200"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)"
-                  >详情</el-button
-                >
-                <el-button type="text" @click="getPassword(scope.row.id)"
-                  >获取密码</el-button
-                >
-                <el-button type="text" @click="openShareDetail(scope.row.id)"
-                  >密码记录</el-button
-                >
+                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="getPassword(scope.row.id)">获取密码</el-button>
+                <el-button type="text" @click="openShareDetail(scope.row.id)">密码记录</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -516,12 +350,7 @@
           style="width: 100%"
           max-height="270"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          />
+          <el-table-column align="center" label="序号" type="index" width="50" />
           <el-table-column align="center" prop="printPassword" label="密码" />
           <el-table-column align="center" prop="createTime" label="打印时间" />
         </el-table>
@@ -544,25 +373,16 @@
       </div>
     </el-dialog>
 
-    <HomeDetail
-      v-if="isShowDetail"
-      ref="refDetail"
-      :list-item="queryItem"
-      @backListFormDetail="backList"
-    />
+    <HomeDetail v-if="isShowDetail" ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getEnginList,
-  getPassword,
-  getPasswordRecord,
-} from "@/api/supply/deliver";
-import { getCategoryList, getSalesmanList } from "@/api/common";
-import HomeDetail from "@/views/supply/deliver/components/home_detail";
+import { getEnginList, getPassword, getPasswordRecord } from '@/api/supply/deliver'
+import { getCategoryList, getSalesmanList } from '@/api/common'
+import HomeDetail from '@/views/supply/deliver/components/home_detail'
 
-let that;
+let that
 export default {
   components: {
     HomeDetail
@@ -576,17 +396,17 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: {
         // 筛选表单数据
-        orderNum: "",
-        orderNo: "",
-        contractNo: "",
-        jxsName: "",
-        chName: "",
-        model: "",
-        date: "",
-        jxsNum: "",
-        status: "",
-        salesMan: "",
-        refRegionWork: "",
+        orderNum: '',
+        orderNo: '',
+        contractNo: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+        salesMan: '',
+        refRegionWork: ''
       },
       salesmanList: [],
       categoryList: [],
@@ -598,8 +418,8 @@ export default {
       dialogTable_pageSize: 10, // 密码记录 - 每页数量
       dialogTable_listTotal: 0, // 密码记录 - 列表总数
 
-      queryItem: {},
-    };
+      queryItem: {}
+    }
   },
 
   computed: {
@@ -612,17 +432,17 @@ export default {
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         categoryName: this.screenForm.type,
         serviceId: this.screenForm.salesMan,
         refRegionWork: this.screenForm.refRegionWork,
-        orderType: 2, // 2家用工程 3商用工程
-      };
+        orderType: 2 // 2家用工程 3商用工程
+      }
     },
     isShowDetail() {
-      return this.queryItem.hasOwnProperty("id");
-    },
+      return this.queryItem.hasOwnProperty('id')
+    }
   },
 
   beforeCreate() {
@@ -642,20 +462,20 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
     },
 
     // 查询列表
@@ -672,23 +492,23 @@ export default {
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
         specification: this.screenForm.model,
-        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] : '',
         categoryName: this.screenForm.type,
         refRegionWork: this.screenForm.refRegionWork,
         serviceId: this.screenForm.salesMan,
-        orderType: 2, // 2家用工程 3商用工程
-      };
-      getEnginList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
-          item.sums1 = ["refundableQty", "notOutNumber"];
-          item.sums2 = ["payAmount", "afterTaxPrice", "noTotalAmount"];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        orderType: 2 // 2家用工程 3商用工程
+      }
+      getEnginList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty
+          item.sums1 = ['refundableQty', 'notOutNumber']
+          item.sums2 = ['payAmount', 'afterTaxPrice', 'noTotalAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
@@ -719,10 +539,10 @@ export default {
 
     // 进入详情
     toDetail(item) {
-      this.queryItem = item;
+      this.queryItem = item
       this.$nextTick(() => {
-        this.$refs.refDetail.initPrint();
-      });
+        this.$refs.refDetail.initPrint()
+      })
     },
 
     backList() {
@@ -731,12 +551,12 @@ export default {
 
     // 获取密码
     getPassword(id) {
-      getPassword({ id }).then((res) => {
-        this.$alert(res.data, "新密码", {
-          confirmButtonText: "确定",
-          callback: (action) => {},
-        });
-      });
+      getPassword({ id }).then(res => {
+        this.$alert(res.data, '新密码', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        })
+      })
     },
 
     // 密码记录 - 获取列表
@@ -744,12 +564,12 @@ export default {
       getPasswordRecord({
         pageNum: this.dialogTable_currentPage,
         pageSize: this.dialogTable_pageSize,
-        id,
-      }).then((res) => {
-        this.dialogTable_dataList = res.data.records;
-        this.dialogTable_listTotal = res.data.total;
-        this.dialogTable_listLoading = false;
-      });
+        id
+      }).then(res => {
+        this.dialogTable_dataList = res.data.records
+        this.dialogTable_listTotal = res.data.total
+        this.dialogTable_listLoading = false
+      })
     },
 
     // 密码记录 - 打开弹窗
@@ -761,11 +581,11 @@ export default {
 
     // 密码记录 - 更改列表当前页
     dialogTableCurrentChange(val) {
-      this.dialogTable_currentPage = val;
-      this.getPasswordRecord();
-    },
-  },
-};
+      this.dialogTable_currentPage = val
+      this.getPasswordRecord()
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

+ 365 - 483
src/views/supply/deliver/sum_list.vue

@@ -10,288 +10,223 @@
           </template>
 
           <template #search>
-            <el-form
-          ref="screenForm"
-          :model="screenForm"
-          label-width="120px"
-          size="mini"
-          label-position="left"
-        >
-          <el-row :gutter="20">
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="产品名称" prop="goodsName">
-                <el-input
-                  v-model="screenForm.goodsName"
-                  placeholder="请输入产品名称"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="物料编码" prop="goodsCode">
-                <el-input
-                  v-model="screenForm.goodsCode"
-                  placeholder="请输入物料编码"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="产品编码" prop="goodsOldCode">
-                <el-input
-                  v-model="screenForm.goodsOldCode"
-                  placeholder="请输入产品编码"
-                />
-              </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-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="制单日期" prop="createDate">
-                <el-date-picker
-                  v-model="screenForm.createDate"
-                  type="datetimerange"
-                  range-separator="至"
-                  style="width: 100%"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="发货日期" prop="deliverDate">
-                <el-date-picker
-                  v-model="screenForm.deliverDate"
-                  type="datetimerange"
-                  range-separator="至"
-                  style="width: 100%"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商编号" prop="jxsNum">
-                <el-input
-                  v-model="screenForm.jxsNum"
-                  placeholder="请输入经销商编号"
-                />
-              </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-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-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="订单" prop="mainOrderId">
-                <el-input
-                  v-model="screenForm.mainOrderId"
-                  placeholder="请输入订单"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="存货类别" prop="type">
-                <el-select
-                  v-model="screenForm.type"
-                  placeholder="选择存货类别"
-                  style="width: 100%"
-                  clearable
-                >
-                  <el-option
-                    v-for="item in categoryList"
-                    :key="item.name"
-                    :label="item.name"
-                    :value="item.name"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="仓库" prop="correspondId">
-                <el-select
-                  v-model="screenForm.correspondId"
-                  multiple
-                  style="width: 100%"
-                  placeholder="请选择仓库"
-                  size="mini"
-                  filterable
-                  clearable
-                >
-                  <el-option
-                    v-for="(item, index) in warehouseList"
-                    :key="index"
-                    :label="item.name"
-                    :value="item.id"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="表头业务员" prop="k3ServiceId">
-                <el-select
-                  v-model="screenForm.k3ServiceId"
-                  placeholder="选择表头业务员"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in salesmanList"
-                    :key="item.adminUserId"
-                    :label="item.nickName"
-                    :value="item.adminUserId"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="表体业务员" prop="salesMan">
-                <el-select
-                  v-model="screenForm.salesMan"
-                  placeholder="选择表体业务员"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in salesmanList"
-                    :key="item.adminUserId"
-                    :label="item.nickName"
-                    :value="item.adminUserId"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="审核时间" prop="approvaTime">
-                <el-date-picker
-                  v-model="screenForm.approvaTime"
-                  type="datetimerange"
-                  range-separator="至"
-                  style="width: 100%"
-                  value-format="yyyy-MM-dd HH:mm:ss"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="申请发货单类型" prop="types">
-                <el-select
-                  v-model="screenForm.types"
-                  placeholder="选择申请发货单类型"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in invoiceList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="预约提货打印" prop="printStatus">
-                <el-select
-                  v-model="screenForm.printStatus"
-                  placeholder="选择预约提货打印"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    label="是"
-                    :value="1"
-                  />
-                  <el-option
-                    label="否"
-                    :value="0"
-                  />
-
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="区域" prop="discriminate">
-                <el-select
-                  v-model="screenForm.discriminate"
-                  placeholder="选择区域"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    label="广州"
-                    value="GZ"
-                  />
-                  <el-option
-                    label="佛山"
-                    value="FS"
-                  />
-
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程登录单号" prop="refEnginRecordNo">
-                <el-input
-                  v-model="screenForm.refEnginRecordNo"
-                  placeholder="请输入工程登录单号"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="制单人" prop="createBy">
-                <el-input v-model="screenForm.createBy" placeholder="请输入制单人" />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="发货汇总打印" prop="invoicePrintStatus">
-                <el-select
-                  v-model="screenForm.invoicePrintStatus"
-                  placeholder="选择发货汇总打印"
-                  clearable
-                  filterable
-                  style="width: 100%"
-                >
-                  <el-option
-                    label="是"
-                    :value="1"
-                  />
-                  <el-option
-                    label="否"
-                    :value="0"
-                  />
-
-                </el-select>
-              </el-form-item>
-            </el-col>
-
-          </el-row>
-        </el-form>
-        </template>
+            <el-form ref="screenForm" :model="screenForm" label-width="120px" size="mini" label-position="left">
+              <el-row :gutter="20">
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="产品名称" prop="goodsName">
+                    <el-input v-model="screenForm.goodsName" placeholder="请输入产品名称" />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="物料编码" prop="goodsCode">
+                    <el-input v-model="screenForm.goodsCode" placeholder="请输入物料编码" />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="产品编码" prop="goodsOldCode">
+                    <el-input v-model="screenForm.goodsOldCode" placeholder="请输入产品编码" />
+                  </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-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="制单日期" prop="createDate">
+                    <el-date-picker
+                      v-model="screenForm.createDate"
+                      type="datetimerange"
+                      range-separator="至"
+                      style="width: 100%"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      start-placeholder="开始日期"
+                      end-placeholder="结束日期"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="发货日期" prop="deliverDate">
+                    <el-date-picker
+                      v-model="screenForm.deliverDate"
+                      type="datetimerange"
+                      range-separator="至"
+                      style="width: 100%"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      start-placeholder="开始日期"
+                      end-placeholder="结束日期"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="经销商编号" prop="jxsNum">
+                    <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号" />
+                  </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-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-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="订单" prop="mainOrderId">
+                    <el-input v-model="screenForm.mainOrderId" placeholder="请输入订单" />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="存货类别" prop="type">
+                    <el-select v-model="screenForm.type" placeholder="选择存货类别" style="width: 100%" clearable>
+                      <el-option v-for="item in categoryList" :key="item.name" :label="item.name" :value="item.name" />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="仓库" prop="correspondId">
+                    <el-select
+                      v-model="screenForm.correspondId"
+                      multiple
+                      style="width: 100%"
+                      placeholder="请选择仓库"
+                      size="mini"
+                      filterable
+                      clearable
+                    >
+                      <el-option
+                        v-for="(item, index) in warehouseList"
+                        :key="index"
+                        :label="item.name"
+                        :value="item.id"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="表头业务员" prop="k3ServiceId">
+                    <el-select
+                      v-model="screenForm.k3ServiceId"
+                      placeholder="选择表头业务员"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in salesmanList"
+                        :key="item.adminUserId"
+                        :label="item.nickName"
+                        :value="item.adminUserId"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="表体业务员" prop="salesMan">
+                    <el-select
+                      v-model="screenForm.salesMan"
+                      placeholder="选择表体业务员"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in salesmanList"
+                        :key="item.adminUserId"
+                        :label="item.nickName"
+                        :value="item.adminUserId"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="审核时间" prop="approvaTime">
+                    <el-date-picker
+                      v-model="screenForm.approvaTime"
+                      type="datetimerange"
+                      range-separator="至"
+                      style="width: 100%"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      start-placeholder="开始日期"
+                      end-placeholder="结束日期"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="申请发货单类型" prop="types">
+                    <el-select
+                      v-model="screenForm.types"
+                      placeholder="选择申请发货单类型"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in invoiceList"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="预约提货打印" prop="printStatus">
+                    <el-select
+                      v-model="screenForm.printStatus"
+                      placeholder="选择预约提货打印"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="区域" prop="discriminate">
+                    <el-select
+                      v-model="screenForm.discriminate"
+                      placeholder="选择区域"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option label="广州" value="GZ" />
+                      <el-option label="佛山" value="FS" />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="工程登录单号" prop="refEnginRecordNo">
+                    <el-input v-model="screenForm.refEnginRecordNo" placeholder="请输入工程登录单号" />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="制单人" prop="createBy">
+                    <el-input v-model="screenForm.createBy" placeholder="请输入制单人" />
+                  </el-form-item>
+                </el-col>
+                <el-col :xs="24" :sm="12" :lg="6">
+                  <el-form-item label="发货汇总打印" prop="invoicePrintStatus">
+                    <el-select
+                      v-model="screenForm.invoicePrintStatus"
+                      placeholder="选择发货汇总打印"
+                      clearable
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </template>
         </Collapse>
       </div>
 
@@ -405,15 +340,13 @@
               <template slot-scope="scope">
                 <CopyButton
                   :copy-text="
-                    scope.row.enginOrderType == 'HOME' ||
-                    scope.row.enginOrderType == 'TRADE'
+                    scope.row.enginOrderType == 'HOME' || scope.row.enginOrderType == 'TRADE'
                       ? scope.row.enginOrderNo
                       : scope.row.mainOrderId
                   "
                 />
                 <span>{{
-                  scope.row.enginOrderType == "HOME" ||
-                  scope.row.enginOrderType == "TRADE"
+                  scope.row.enginOrderType == 'HOME' || scope.row.enginOrderType == 'TRADE'
                     ? scope.row.enginOrderNo
                     : scope.row.mainOrderId
                 }}</span>
@@ -737,13 +670,7 @@
               min-width="100"
               show-overflow-tooltip
             />
-            <el-table-column
-              align="left"
-              label="制单人"
-              prop="createBy"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip />
 
             <el-table-column
               align="left"
@@ -905,16 +832,16 @@ export default {
       invoiceList: [
         {
           value: 1,
-          label: "申请发货单",
+          label: '申请发货单'
         },
         {
           value: 2,
-          label: "退货单",
+          label: '退货单'
         },
         {
           value: 3,
-          label: "直调发货单",
-        },
+          label: '直调发货单'
+        }
       ],
       categoryList: [],
       salesmanList: [],
@@ -924,24 +851,24 @@ export default {
       totalNum: 0,
       isShowDialog: false,
       dialogForm: {
-        password: "",
-        createMan: "",
-        createDate: "",
+        password: '',
+        createMan: '',
+        createDate: ''
       },
       warehouseList: [],
       dialogFormRules: {
-        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
+        password: [{ required: true, message: '请输入密码', trigger: 'blur' }]
       },
       dialogVisible: false,
       excelData: [
         {
           value: 1,
-          name: "状态",
+          name: '状态'
         },
         {
           value: 2,
-          name: "打印时间",
-        },
+          name: '打印时间'
+        }
       ],
       check: [],
       checkAll: false,
@@ -959,18 +886,10 @@ export default {
         discriminate: this.screenForm.discriminate,
         refEnginRecordNo: this.screenForm.refEnginRecordNo,
         createBy: this.screenForm.createBy,
-        createStartTime: this.screenForm.createDate
-          ? this.screenForm.createDate[0]
-          : "",
-        createEndTime: this.screenForm.createDate
-          ? this.screenForm.createDate[1]
-          : "",
-        startTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[0]
-          : "",
-        endTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[1]
-          : "",
+        createStartTime: this.screenForm.createDate ? this.screenForm.createDate[0] : '',
+        createEndTime: this.screenForm.createDate ? this.screenForm.createDate[1] : '',
+        startTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[0] : '',
+        endTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[1] : '',
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         id: this.screenForm.orderNum,
@@ -980,75 +899,66 @@ export default {
         mainOrderId: this.screenForm.mainOrderId,
         printStatus: this.screenForm.printStatus,
         invoicePrintStatus: this.screenForm.invoicePrintStatus,
-        approvalEndTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[1]
-          : "",
-        approvalStartTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[0]
-          : "",
-        correspondId: this.screenForm.correspondId.join(","),
-        type: this.screenForm.types,
-      };
+        approvalEndTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[1] : '',
+        approvalStartTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[0] : '',
+        correspondId: this.screenForm.correspondId.join(','),
+        type: this.screenForm.types
+      }
     },
     comRefundableQty() {
       return (type, status, row) => {
         if (type == 2) {
-          return "";
+          return ''
         } else {
-          if (status == "OK") {
-            return 0;
+          if (status == 'OK') {
+            return 0
           } else {
-            return row.refundableQty;
+            return row.refundableQty
           }
         }
-      };
-    },
+      }
+    }
   },
   watch: {
     dataList: {
       handler(newValue, oldValue) {
         if (newValue && newValue.length) {
           newValue.forEach((item, index) => {
-            this.dataList[index].compute_zkeAmount =
-              item.totalDiscAmount + item.payRebateAmount;
-            this.dataList[index].compute_wckNum = this.comRefundableQty(
-              item.type,
-              item.salesExamineStatus,
-              item
-            );
-          });
+            this.dataList[index].compute_zkeAmount = item.totalDiscAmount + item.payRebateAmount
+            this.dataList[index].compute_wckNum = this.comRefundableQty(item.type, item.salesExamineStatus, item)
+          })
         }
       },
       immediate: true,
-      deep: true,
-    },
+      deep: true
+    }
   },
   created() {
-    this.getSalesmanList();
-    this.getCategoryList();
-    this.getList();
-    this.getWarehouseList();
+    this.getSalesmanList()
+    this.getCategoryList()
+    this.getList()
+    this.getWarehouseList()
   },
   mounted() {
-    this.initPrint();
+    this.initPrint()
   },
   methods: {
     handleFilterData() {
-      this.dialogVisible = true;
+      this.dialogVisible = true
     },
 
     handleCheckAllChange(val) {
-      const arr = [];
+      const arr = []
       if (val) {
         for (let i = 1; i <= this.excelData.length; i++) {
-          arr.push(i);
+          arr.push(i)
         }
       }
-      this.check = val ? arr : [];
-      this.isIndeterminate = false;
+      this.check = val ? arr : []
+      this.isIndeterminate = false
     },
     handleCheckedCitiesChange() {
-      console.log(this.checkAll);
+      console.log(this.checkAll)
     },
     // 获取业务员列表
     getSalesmanList() {
@@ -1056,33 +966,33 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 获取存货类别列表
     getCategoryList() {
       getCategoryList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.categoryList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.categoryList = res.data.records
+      })
     },
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
     },
     // 查询列表
     getList() {
-      this.listLoading = true;
+      this.listLoading = true
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
@@ -1097,18 +1007,10 @@ export default {
 
         refEnginRecordNo: this.screenForm.refEnginRecordNo,
 
-        createStartTime: this.screenForm.createDate
-          ? this.screenForm.createDate[0]
-          : "",
-        createEndTime: this.screenForm.createDate
-          ? this.screenForm.createDate[1]
-          : "",
-        startTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[0]
-          : "",
-        endTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[1]
-          : "",
+        createStartTime: this.screenForm.createDate ? this.screenForm.createDate[0] : '',
+        createEndTime: this.screenForm.createDate ? this.screenForm.createDate[1] : '',
+        startTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[0] : '',
+        endTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[1] : '',
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         id: this.screenForm.orderNum,
@@ -1116,34 +1018,30 @@ export default {
         serviceId: this.screenForm.salesMan,
         k3ServiceId: this.screenForm.k3ServiceId,
         mainOrderId: this.screenForm.mainOrderId,
-        approvalEndTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[1]
-          : "",
-        approvalStartTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[0]
-          : "",
-        correspondId: this.screenForm.correspondId.join(","),
-        type: this.screenForm.types,
-      };
+        approvalEndTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[1] : '',
+        approvalStartTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[0] : '',
+        correspondId: this.screenForm.correspondId.join(','),
+        type: this.screenForm.types
+      }
 
-      getSumList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
-          item.sums1 = ["refundableQty", "compute_wckNum"];
+      getSumList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.notOutNumber = item.salesStatus ? 0 : item.refundableQty
+          item.sums1 = ['refundableQty', 'compute_wckNum']
           item.sums2 = [
-            "payAmount",
-            "payRebateAmount",
-            "discAmount",
-            "totalDiscAmount",
-            "singlePayPrice",
-            "compute_zkeAmount",
-          ];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
-      this.getListInvoiceNumber();
+            'payAmount',
+            'payRebateAmount',
+            'discAmount',
+            'totalDiscAmount',
+            'singlePayPrice',
+            'compute_zkeAmount'
+          ]
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
+      this.getListInvoiceNumber()
     },
 
     getListInvoiceNumber() {
@@ -1154,18 +1052,10 @@ export default {
         specification: this.screenForm.model,
         createBy: this.screenForm.createBy,
 
-        createStartTime: this.screenForm.createDate
-          ? this.screenForm.createDate[0]
-          : "",
-        createEndTime: this.screenForm.createDate
-          ? this.screenForm.createDate[1]
-          : "",
-        startTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[0]
-          : "",
-        endTime: this.screenForm.deliverDate
-          ? this.screenForm.deliverDate[1]
-          : "",
+        createStartTime: this.screenForm.createDate ? this.screenForm.createDate[0] : '',
+        createEndTime: this.screenForm.createDate ? this.screenForm.createDate[1] : '',
+        startTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[0] : '',
+        endTime: this.screenForm.deliverDate ? this.screenForm.deliverDate[1] : '',
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         id: this.screenForm.orderNum,
@@ -1173,83 +1063,77 @@ export default {
         serviceId: this.screenForm.salesMan,
         k3ServiceId: this.screenForm.k3ServiceId,
         mainOrderId: this.screenForm.mainOrderId,
-        approvalEndTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[1]
-          : "",
-        approvalStartTime: this.screenForm.approvaTime
-          ? this.screenForm.approvaTime[0]
-          : "",
-        correspondId: this.screenForm.correspondId.join(","),
-        type: this.screenForm.types,
-      };
-      getListInvoiceNumber(params).then((res) => {
+        approvalEndTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[1] : '',
+        approvalStartTime: this.screenForm.approvaTime ? this.screenForm.approvaTime[0] : '',
+        correspondId: this.screenForm.correspondId.join(','),
+        type: this.screenForm.types
+      }
+      getListInvoiceNumber(params).then(res => {
         // console.log(res,'ii');
-        this.totalNum = res.data;
-      });
+        this.totalNum = res.data
+      })
     },
     // 提交筛选表单
     submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+      this.currentPage = 1
+      this.getList()
     },
 
     // 重置筛选表单
     resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+      this.$refs.screenForm.resetFields()
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改每页数量
     handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
     },
 
     // 更改当前页
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+      this.currentPage = val
+      this.getList()
     },
 
     handleSelect(selection, row) {
-      this.$refs.table.toggleRowSelection(row);
-      this.dataList.forEach((item) => {
+      this.$refs.table.toggleRowSelection(row)
+      this.dataList.forEach(item => {
         if (item.id === row.id) {
-          this.$refs.table.toggleRowSelection(item);
+          this.$refs.table.toggleRowSelection(item)
         }
-      });
-      this.tableSelection = this.$refs.table.selection;
+      })
+      this.tableSelection = this.$refs.table.selection
     },
 
     handleSelectAll(selection) {
-      this.tableSelection = this.$refs.table.selection;
+      this.tableSelection = this.$refs.table.selection
     },
 
     // 点击打印
     toPrint() {
-      this.queryItem = this.tableSelection;
+      this.queryItem = this.tableSelection
       if (!this.tableSelection[0].printNum) {
-        this.queryItem = this.tableSelection;
-        this.getDateil(this.tableSelection, "getDeliverDetail").then((res) => {
-          this.$endLoading();
-          this.$refs.preView.show(this.hiprintTemplate, this.outputData);
-        });
+        this.queryItem = this.tableSelection
+        this.getDateil(this.tableSelection, 'getDeliverDetail').then(res => {
+          this.$endLoading()
+          this.$refs.preView.show(this.hiprintTemplate, this.outputData)
+        })
       } else {
-        this.queryItem = this.tableSelection;
-        this.dialogForm.createMan = JSON.parse(
-          localStorage.getItem("supply_user")
-        ).nickName;
-        this.dialogForm.createDate = this.getDate();
-        this.isShowDialog = true;
+        this.queryItem = this.tableSelection
+        this.dialogForm.createMan = JSON.parse(localStorage.getItem('supply_user')).nickName
+        this.dialogForm.createDate = this.getDate()
+        this.isShowDialog = true
       }
     },
 
     // 关闭弹窗
     cancelDialogForm() {
-      this.isShowDialog = false;
-      this.$refs.dialogForm.resetFields();
+      this.isShowDialog = false
+      this.$refs.dialogForm.resetFields()
     },
 
     // 提交 弹窗
@@ -1258,43 +1142,41 @@ export default {
         if (valid) {
           const params = {
             shipId: this.queryItem[0].invoiceId,
-            password: this.dialogForm.password,
-          };
-          checkPassword(params).then((res) => {
-            this.getDateil(this.tableSelection, "getDeliverDetail").then(
-              (res) => {
-                this.$endLoading();
-                this.$refs.preView.show(this.hiprintTemplate, this.outputData);
-              }
-            );
-            this.cancelDialogForm();
-          });
+            password: this.dialogForm.password
+          }
+          checkPassword(params).then(res => {
+            this.getDateil(this.tableSelection, 'getDeliverDetail').then(res => {
+              this.$endLoading()
+              this.$refs.preView.show(this.hiprintTemplate, this.outputData)
+            })
+            this.cancelDialogForm()
+          })
         }
-      });
+      })
     },
 
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.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;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+      var currentdate = year + seperator1 + month + seperator1 + strDate
+      return currentdate
     },
 
     backList() {
-      this.queryItem = {};
-      this.isShowPrint = false;
-    },
-  },
-};
+      this.queryItem = {}
+      this.isShowPrint = false
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 134 - 256
src/views/supply/engin/commerce_list.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="app-container">
-    <div
-      v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
-    >
+    <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
       <!-- 筛选条件 -->
       <div class="screen-container">
         <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
@@ -158,41 +156,19 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column
-              align="center"
-              type="selection"
-              width="55"
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核状态"
-              prop="examineStatus"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="center" type="selection" width="55"></el-table-column>
+            <el-table-column align="left" 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="left"
-              label="工程订单号"
-              prop="enginOrderNo"
-              min-width="140"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.enginOrderNo" />
                 <span>{{ scope.row.enginOrderNo }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="订单日期"
-              prop="orderDate"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <div>
                   <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
@@ -203,8 +179,7 @@
                     @click="editDate(scope.row)"
                     v-if="
                       $checkBtnRole('date', $route.meta.roles) &&
-                      (scope.row.examineStatus === 'SAVE' ||
-                        scope.row.examineStatus === 'WAIT')
+                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')
                     "
                   ></el-button>
                 </div>
@@ -237,24 +212,12 @@
               show-overflow-tooltip
             ></el-table-column>
 
-            <el-table-column
-              align="left"
-              label="订单类型"
-              prop="enginOrderType"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="订单类型" prop="enginOrderType" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.enginOrderType | typeFilter }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="经销商名称"
-              prop="customerName"
-              min-width="250"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.customerName" />
                 <span>{{ scope.row.customerName }}</span>
@@ -275,13 +238,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <!--            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>-->
-            <el-table-column
-              align="left"
-              label="物料编码"
-              prop="materialNumber"
-              min-width="120"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialNumber" />
                 <span>{{ scope.row.materialNumber }}</span>
@@ -299,26 +256,14 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
 
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            >
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
@@ -347,7 +292,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.isDirectTransfer ? "是" : "否" }}
+                {{ scope.row.isDirectTransfer ? '是' : '否' }}
               </template>
             </el-table-column>
             <el-table-column
@@ -366,14 +311,7 @@
               sortable
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
-              align="right"
-              label="单价"
-              prop="price"
-              min-width="100"
-              sortable
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.price | numToFixed }}
               </template>
@@ -473,21 +411,13 @@
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
-              align="center"
-              label="操作"
-              width="220"
-              fixed="right"
-            >
+            <el-table-column align="center" label="操作" width="220" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
                   style="margin-right: 10px"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.parentId, scope.row)"
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
                 >
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
@@ -495,10 +425,7 @@
                   style="margin-right: 10px"
                   title="确定撤回吗?"
                   @onConfirm="handleWithdraw(scope.row.parentId, scope.row)"
-                  v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'WAIT'
-                  "
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
                 >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
@@ -506,55 +433,35 @@
                   style="margin-right: 10px"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.parentId, scope.row)"
-                  v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'OK'
-                  "
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
                 >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
                 <el-button
                   type="text"
                   @click="toForm(scope.row)"
-                  v-if="
-                    $checkBtnRole('edit', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
-                  "
+                  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'
-                  "
+                  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)"
-                >
+                <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles)">
                   退订
                 </el-button>
-                <el-button type="text" @click="toDetail(scope.row)">
-                  详情
-                </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <el-popconfirm
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.parentId, scope.row)"
-                  v-if="
-                    $checkBtnRole('del', $route.meta.roles) &&
-                    scope.row.examineStatus !== 'OK'
-                  "
+                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
                 >
-                  <el-button slot="reference" type="text" style="color: #f56c6c"
-                    >删除</el-button
-                  >
+                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -577,51 +484,25 @@
       </div>
     </div>
 
-    <EditDateDialog
-      :isShow.sync="isShowEditDateDialog"
-      :dateForm.sync="dateForm"
-    />
-
-    <CommerceDetail
-      :listItem="queryItem"
-      v-if="isShowDetail"
-      @backListFormDetail="backList"
-    />
-    <CommerceForm
-      :listItem="queryItem"
-      v-if="isShowForm"
-      @backListFormDetail="backList"
-    />
-    <CommerceExamine
-      :listItem="queryItem"
-      v-if="isShowExamine"
-      @backListFormDetail="backList"
-    />
-    <CommerceReturn
-      :listItem="queryItem"
-      v-if="isShowReturn"
-      @backListFormDetail="backList"
-    />
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
+
+    <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+    <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
+    <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
   </div>
 </template>
 
 <script>
-import {
-  getOrderList,
-  applyCom,
-  withdrawCom,
-  deleteCom,
-  editDateCom,
-  abandonCom,
-} from "@/api/supply/engin";
-import { getSalesmanList, getTypeList } from "@/api/common";
-import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
-import CommerceForm from "@/views/supply/engin/components/commerce_form";
-import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
-import CommerceReturn from "@/views/supply/engin/components/commerce_return";
-import EditDateDialog from "@/components/Common/edit-date-dialog";
-
-let that;
+import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from '@/api/supply/engin'
+import { getSalesmanList, getTypeList } from '@/api/common'
+import CommerceDetail from '@/views/supply/engin/components/commerce_detail'
+import CommerceForm from '@/views/supply/engin/components/commerce_form'
+import CommerceExamine from '@/views/supply/engin/components/commerce_examine'
+import CommerceReturn from '@/views/supply/engin/components/commerce_return'
+import EditDateDialog from '@/components/Common/edit-date-dialog'
+
+let that
 export default {
   components: {
     CommerceDetail,
@@ -632,16 +513,16 @@ 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 : ''
     },
     typeFilter(val) {
       const MAP = {
-        TRADE: "商用",
-        HOME: "家用",
-      };
-      return MAP[val];
-    },
+        TRADE: '商用',
+        HOME: '家用'
+      }
+      return MAP[val]
+    }
   },
   data() {
     return {
@@ -653,23 +534,23 @@ export default {
       screenForm: {
         // 筛选表单数据
         status: [],
-        orderNum: "",
-        enginNum: "",
-        loginNum: "",
-        enginName: "",
-        date: "",
-        saleType: "",
-        createMan: "",
-        examineMan: "",
-        salesMan: "",
-        dealer: "",
-        model: "",
-        isDirectTransfer: null,
+        orderNum: '',
+        enginNum: '',
+        loginNum: '',
+        enginName: '',
+        date: '',
+        saleType: '',
+        createMan: '',
+        examineMan: '',
+        salesMan: '',
+        dealer: '',
+        model: '',
+        isDirectTransfer: null
       },
       statusList: [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' }
         //  // { label: '审核驳回', value: 'FAIL' },,
         // { label: '已关闭', value: 'CLOSE' },
       ],
@@ -678,8 +559,8 @@ export default {
       isCollapse: true,
       multipleSelection: [],
       transfer: [
-        { label: "是", value: true },
-        { label: "否", value: false },
+        { label: '是', value: true },
+        { label: '否', value: false }
       ],
       queryItem: {},
       isShowDetail: false,
@@ -690,25 +571,24 @@ export default {
       editId: null,
       isShowEditDateDialog: false,
       dateForm: {
-        date: "",
-      },
-    };
+        date: ''
+      }
+    }
   },
 
   computed: {
     exParams() {
-      let ids = this.multipleSelection.map((item) => {
-        return item.enginOrderNo;
-      });
+      let ids = this.multipleSelection.map(item => {
+        return item.enginOrderNo
+      })
       return {
-        examineStatus: this.screenForm.status.join(","),
-        enginOrderNo:
-          ids && ids.length ? ids.join(",") : this.screenForm.orderNum,
+        examineStatus: this.screenForm.status.join(','),
+        enginOrderNo: ids && ids.length ? ids.join(',') : this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
         refProjectName: this.screenForm.enginName,
-        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : "",
-        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
         saleTypeId: this.screenForm.saleType,
         createName: this.screenForm.createMan,
         confirmName: this.screenForm.examineMan,
@@ -717,9 +597,9 @@ export default {
         specification: this.screenForm.model,
         isDirectTransfer: this.screenForm.isDirectTransfer,
 
-        enginOrderType: "TRADE", // TRADE=商用 HOME=家用
-      };
-    },
+        enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
+      }
+    }
   },
 
   beforeCreate() {
@@ -739,20 +619,20 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      }).then((res) => {
-        this.salesmanList = res.data.records;
-      });
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
     },
 
     // 获取销售类型列表
     getSalesTypeList() {
       getTypeList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.salesTypeList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.salesTypeList = res.data.records
+      })
     },
 
     // 查询列表
@@ -762,13 +642,13 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        examineStatus: this.screenForm.status.join(","),
+        examineStatus: this.screenForm.status.join(','),
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
         refProjectName: this.screenForm.enginName,
-        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : "",
-        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : "",
+        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
         saleTypeId: this.screenForm.saleType,
         createName: this.screenForm.createMan,
         confirmName: this.screenForm.examineMan,
@@ -777,17 +657,17 @@ export default {
         isDirectTransfer: this.screenForm.isDirectTransfer,
 
         specification: this.screenForm.model,
-        enginOrderType: "TRADE", // TRADE=商用 HOME=家用
-      };
-      getOrderList(params).then((res) => {
-        res.data.records.forEach((item) => {
-          item.sums1 = ["qty", "directTransferQty", "hasSendQty"];
-          item.sums2 = ["price", "payAmount", "discAmount"];
-        });
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
+        enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
+      }
+      getOrderList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
+          item.sums2 = ['price', 'payAmount', 'discAmount']
+        })
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
     },
 
     // 提交筛选表单
@@ -850,55 +730,53 @@ export default {
 
     // 申请
     handleSubmit(id, row) {
-      applyCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      applyCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 撤回
     handleWithdraw(id, row) {
-      withdrawCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then(
-        (res) => {
-          this.$successMsg();
-          this.getList();
-        }
-      );
+      withdrawCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 弃审
     handleAbandon(id, row) {
-      abandonCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      abandonCom({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 删除
     handleDelete(id) {
-      deleteCom({ ids: id }).then((res) => {
-        this.$successMsg();
-        this.getList();
-      });
+      deleteCom({ ids: id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
     },
 
     // 批量删除
     batchDelete() {
-      this.$confirm("此操作将永久删除, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
-          let ids = this.multipleSelection.map((item) => {
-            return item.parentId;
-          });
-          deleteCom({ ids: ids.join(",") }).then((res) => {
-            this.$successMsg();
-            this.getList();
-          });
+          let ids = this.multipleSelection.map(item => {
+            return item.parentId
+          })
+          deleteCom({ ids: ids.join(',') }).then(res => {
+            this.$successMsg()
+            this.getList()
+          })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
 
     handleSelectionChange(val) {
@@ -916,15 +794,15 @@ export default {
     submitDateForm() {
       editDateCom({
         enginOrderId: this.editId,
-        orderDate: this.dateForm.date + " 00:00:00",
-      }).then((res) => {
-        this.isShowEditDateDialog = false;
-        this.getList();
-        this.$successMsg("修改成功");
-      });
-    },
-  },
-};
+        orderDate: this.dateForm.date + ' 00:00:00'
+      }).then(res => {
+        this.isShowEditDateDialog = false
+        this.getList()
+        this.$successMsg('修改成功')
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped></style>

Plik diff jest za duży
+ 189 - 531
src/views/supply/engin/components/commerce_detail.vue


+ 80 - 218
src/views/supply/engin/components/commerce_examine.vue

@@ -87,7 +87,7 @@
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
           <div class="value">
-            {{ detailData.takeDeposit ? "是" : "否" }}
+            {{ detailData.takeDeposit ? '是' : '否' }}
             <!-- <el-checkbox v-model="detailData.takeDeposit">{{detailData.takeDeposit ? '是':'否'}}</el-checkbox> -->
           </div>
         </el-col>
@@ -102,19 +102,13 @@
         <el-col :span="24" class="item">
           <div class="label">格力回复</div>
           <div class="value">
-            <el-input
-              v-model="detailData.geLiNote"
-              placeholder="请输入格力回复"
-            />
+            <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复" />
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
           <div class="value">
-            <el-input
-              v-model="detailData.geLiInerNote"
-              placeholder="请输入格力内部备注"
-            />
+            <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
           </div>
         </el-col>
         <el-col :span="24" class="item">
@@ -168,88 +162,22 @@
         :summary-method="$getSummaries"
       >
         <el-table-column align="center" label="序号" type="index" width="50" />
-        <el-table-column
-          align="left"
-          label="引用记录"
-          prop="useRefCount"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="销售类型"
-          prop="saleTypeName"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="物料编码"
-          prop="materialNumber"
-          min-width="120"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="产品编码"
-          prop="materialOldNumber"
-          min-width="120"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="产品名称"
-          prop="materialName"
-          min-width="160"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="规格型号"
-          prop="specification"
-          min-width="350"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="单位"
-          prop="unit"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="单价"
-          prop="price"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
             <!-- <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent></el-input> -->
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="工程登录数量"
-          prop="enginNum"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="数量"
-          prop="number"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="订单金额"
-          prop="totalAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="数量" prop="number" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
@@ -272,13 +200,7 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="格力折扣"
-          prop="discAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
@@ -290,26 +212,14 @@
           min-width="100"
           show-overflow-tooltip
         />
-        <el-table-column
-          align="right"
-          label="实付金额"
-          prop="payAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="是否直调"
-          prop="isDirectTransfer"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" 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
@@ -319,34 +229,10 @@
           min-width="100"
           show-overflow-tooltip
         />
-        <el-table-column
-          align="right"
-          label="已发货数量"
-          prop="hasSendQty"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="备注"
-          prop="remark"
-          min-width="160"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="税率"
-          prop="tax"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="仓库"
-          prop="correspondName"
-          min-width="100"
-          show-overflow-tooltip
-        />
+        <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
+        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -366,10 +252,7 @@
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
           <div class="value">
-            <el-input
-              v-model="examineForm.remark"
-              placeholder="请输入审批说明"
-            />
+            <el-input v-model="examineForm.remark" placeholder="请输入审批说明" />
           </div>
         </el-col>
       </el-row>
@@ -377,17 +260,9 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)"
-          >审批通过</el-button
-        >
-        <el-button type="warning" @click="clickSubmitForm(0)"
-          >审批驳回</el-button
-        >
-        <el-popconfirm
-          title="确定关闭吗?"
-          style="margin-left: 10px"
-          @onConfirm="goBack"
-        >
+        <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
+        <el-button type="warning" @click="clickSubmitForm(0)">审批驳回</el-button>
+        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -396,116 +271,103 @@
 </template>
 
 <script>
-import { getOrderDetail, examineCom } from "@/api/supply/engin";
+import { getOrderDetail, examineCom } from '@/api/supply/engin'
 
 export default {
-  name: "CommerceExamine",
-  componentName: "CommerceExamine",
+  name: 'CommerceExamine',
+  componentName: 'CommerceExamine',
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
-      ];
-      const obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      const obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
-  props: ["listItem"],
+  props: ['listItem'],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
       detailData: {},
 
       formLoading: false,
       examineForm: {
-        remark: "",
-      },
-    };
+        remark: ''
+      }
+    }
   },
 
   created() {
-    this.getDetail();
+    this.getDetail()
   },
 
   methods: {
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.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;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+      var currentdate = year + seperator1 + month + seperator1 + strDate
+      return currentdate
     },
 
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
+      getOrderDetail({ id: this.listItem.parentId }).then(res => {
         if (res.data.items) {
-          res.data.items.forEach((item) => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
-            item.sums1 = [
-              "number",
-              "directTransferQty",
-              "qty",
-              "enginNum",
-              "refundableQty",
-              "tdQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "payRebateAmount",
-              "discAmount",
-            ];
-            item.correspondName = res.data.correspondName;
-          });
+          res.data.items.forEach(item => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
+            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
+            item.correspondName = res.data.correspondName
+          })
         }
-        res.data.isPlanOrder = String(res.data.isPlanOrder);
+        res.data.isPlanOrder = String(res.data.isPlanOrder)
 
-        this.detailData = res.data;
+        this.detailData = res.data
 
-        this.examineForm.remark = res.data.examineNote;
-      });
+        this.examineForm.remark = res.data.examineNote
+      })
     },
 
     // 审批
     clickSubmitForm(val) {
-      this.$confirm("此操作将审批订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将审批订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
-          const params = this.detailData;
-          params.examineNote = this.examineForm.remark;
-          params.examineResult = val;
-          examineCom(params).then((res) => {
-            this.$successMsg();
-            this.goBack();
-            this.$parent.getList();
-          });
+          const params = this.detailData
+          params.examineNote = this.examineForm.remark
+          params.examineResult = val
+          examineCom(params).then(res => {
+            this.$successMsg()
+            this.goBack()
+            this.$parent.getList()
+          })
         })
-        .catch(() => {});
-    },
-  },
-};
+        .catch(() => {})
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

Plik diff jest za duży
+ 230 - 557
src/views/supply/engin/components/commerce_form.vue


+ 79 - 221
src/views/supply/engin/components/commerce_return.vue

@@ -78,7 +78,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
-          <div class="value">{{ detailData.takeDeposit ? "是" : "否" }}</div>
+          <div class="value">{{ detailData.takeDeposit ? '是' : '否' }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
@@ -145,87 +145,21 @@
         :summary-method="$getSummaries"
       >
         <el-table-column align="center" label="序号" type="index" width="50" />
-        <el-table-column
-          align="left"
-          label="引用记录"
-          prop="useRefCount"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="销售类型"
-          prop="saleTypeName"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="物料编码"
-          prop="materialNumber"
-          min-width="120"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="产品编码"
-          prop="materialOldNumber"
-          min-width="120"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="产品名称"
-          prop="materialName"
-          min-width="160"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="规格型号"
-          prop="specification"
-          min-width="350"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="单位"
-          prop="unit"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="单价"
-          prop="price"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="工程登录数量"
-          prop="enginNum"
-          min-width="120"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="数量"
-          prop="qty"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="订单金额"
-          prop="totalAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip />
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
@@ -248,13 +182,7 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="格力折扣"
-          prop="discAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
@@ -266,26 +194,14 @@
           min-width="100"
           show-overflow-tooltip
         />
-        <el-table-column
-          align="right"
-          label="实付金额"
-          prop="payAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="是否直调"
-          prop="isDirectTransfer"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" 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
@@ -295,51 +211,15 @@
           min-width="100"
           show-overflow-tooltip
         />
-        <el-table-column
-          align="right"
-          label="可退数量"
-          prop="refundableQty"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="right"
-          label="退订数量"
-          prop="tdQty"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.tdQty"
-              size="mini"
-              type="number"
-              @blur="hasTdQty"
-              @mousewheel.native.prevent
-            />
+            <el-input v-model="scope.row.tdQty" size="mini" type="number" @blur="hasTdQty" @mousewheel.native.prevent />
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="备注"
-          prop="remark"
-          min-width="160"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="税率"
-          prop="tax"
-          min-width="100"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          align="left"
-          label="仓库"
-          prop="correspondName"
-          min-width="100"
-          show-overflow-tooltip
-        />
+        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
+        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -359,10 +239,7 @@
         <el-col :span="24" class="item">
           <div class="label">退订说明</div>
           <div class="value">
-            <el-input
-              v-model="returnForm.remark"
-              placeholder="请输入退订说明"
-            />
+            <el-input v-model="returnForm.remark" placeholder="请输入退订说明" />
           </div>
         </el-col>
       </el-row>
@@ -370,14 +247,8 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm()"
-          >确定退订</el-button
-        >
-        <el-popconfirm
-          title="确定关闭吗?"
-          style="margin-left: 10px"
-          @onConfirm="goBack"
-        >
+        <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
+        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -386,122 +257,109 @@
 </template>
 
 <script>
-import { getOrderDetail, returnCom } from "@/api/supply/engin";
+import { getOrderDetail, returnCom } from '@/api/supply/engin'
 
 export default {
-  name: "CommerceReturn",
-  componentName: "CommerceReturn",
+  name: 'CommerceReturn',
+  componentName: 'CommerceReturn',
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
-      ];
-      const obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      const obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
-  props: ["listItem"],
+  props: ['listItem'],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
       detailData: {},
 
       formLoading: false,
       returnForm: {
-        remark: "",
-      },
-    };
+        remark: ''
+      }
+    }
   },
 
   created() {
-    this.getDetail();
+    this.getDetail()
   },
 
   methods: {
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.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;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+      var currentdate = year + seperator1 + month + seperator1 + strDate
+      return currentdate
     },
 
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
     hasTdQty(row) {
       if (row.tdQty < 0) {
-        row.tdQty = 0;
-        this.$errorMsg("不能填负数");
+        row.tdQty = 0
+        this.$errorMsg('不能填负数')
       }
     },
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
+      getOrderDetail({ id: this.listItem.parentId }).then(res => {
         if (res.data.items) {
-          res.data.items.forEach((item) => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
-            item.sums1 = [
-              "number",
-              "directTransferQty",
-              "qty",
-              "enginNum",
-              "refundableQty",
-              "tdQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "payRebateAmount",
-              "discAmount",
-            ];
-            item.correspondName = res.data.correspondName;
-          });
+          res.data.items.forEach(item => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
+            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
+            item.correspondName = res.data.correspondName
+          })
         }
-        res.data.isPlanOrder = String(res.data.isPlanOrder);
+        res.data.isPlanOrder = String(res.data.isPlanOrder)
 
-        this.detailData = res.data;
-      });
+        this.detailData = res.data
+      })
     },
 
     // 退订
     clickSubmitForm(val) {
-      this.$confirm("此操作将退订订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将退订订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           const params = {
             enginOrderId: this.detailData.enginOrderId,
             items: this.detailData.items,
             refundNote: this.returnForm.remark,
-            refEnginRecordNo: this.detailData.refEnginRecordNo,
-          };
-          returnCom(params).then((res) => {
-            this.$successMsg();
-            this.goBack();
-            this.$parent.getList();
-          });
+            refEnginRecordNo: this.detailData.refEnginRecordNo
+          }
+          returnCom(params).then(res => {
+            this.$successMsg()
+            this.goBack()
+            this.$parent.getList()
+          })
         })
-        .catch(() => {});
-    },
-  },
-};
+        .catch(() => {})
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

+ 42 - 70
src/views/supply/engin/components/engin_detail.vue

@@ -126,12 +126,7 @@
         show-summary
         :summary-method="$getSummaries"
       >
-        <el-table-column
-          align="center"
-          label="序号"
-          type="index"
-          width="50"
-        ></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column
           align="center"
           label="销售类型"
@@ -174,31 +169,13 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
-          align="right"
-          label="单价"
-          prop="price"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="数量"
-          prop="qty"
-          min-width="100"
-          show-overflow-tooltip
-        ></el-table-column>
-        <el-table-column
-          align="right"
-          label="订单金额"
-          prop="totalAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
@@ -273,9 +250,7 @@
           type="primary"
           @click="overData"
           v-if="!isDealer"
-          :disabled="
-            detailData.examineStatus !== 'OK' || detailData.directTransferStatus
-          "
+          :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus"
           >直调完结</el-button
         >
         <el-button @click="goBack">返回列表</el-button>
@@ -288,39 +263,36 @@
 import { getEnginDetail, overEngin } from '@/api/supply/engin'
 import { mapGetters } from 'vuex'
 export default {
-  name: "EnginDetail",
-  componentName: "EnginDetail",
-  props: ["listItem"],
+  name: 'EnginDetail',
+  componentName: 'EnginDetail',
+  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
-      ];
-      let obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      let obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
-      detailData: {},
-    };
+      detailData: {}
+    }
   },
 
   computed: {
-    ...mapGetters(["isCustomer"]),
+    ...mapGetters(['isCustomer']),
     isExamine() {
-      return (
-        this.detailData.examineStatus === "OK" ||
-        this.detailData.examineStatus === "FAIL"
-      );
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   created() {
@@ -330,39 +302,39 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
 
     // 获取详情
     getDetail() {
-      getEnginDetail({ id: this.listItem.enginInfoId }).then((res) => {
+      getEnginDetail({ id: this.listItem.enginInfoId }).then(res => {
         if (res.data.items) {
-          res.data.items.forEach((item) => {
-            item.sums1 = ["qty", "hasOrderQty", "hasDeliverQty"];
-            item.sums2 = ["totalAmount", "price"];
-          });
+          res.data.items.forEach(item => {
+            item.sums1 = ['qty', 'hasOrderQty', 'hasDeliverQty']
+            item.sums2 = ['totalAmount', 'price']
+          })
         }
-        this.detailData = res.data;
-      });
+        this.detailData = res.data
+      })
     },
 
     // 直调完结
     overData() {
-      this.$confirm("此操作将直调完结订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
-          overEngin({ id: this.listItem.enginInfoId }).then((res) => {
-            this.$successMsg();
-            this.getDetail();
-          });
+          overEngin({ id: this.listItem.enginInfoId }).then(res => {
+            this.$successMsg()
+            this.getDetail()
+          })
         })
-        .catch(() => {});
-    },
-  },
-};
+        .catch(() => {})
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

Plik diff jest za duży
+ 246 - 470
src/views/supply/engin/components/engin_examine.vue


+ 101 - 35
src/views/supply/engin/components/engin_form.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="detail-container">
-    <el-page-header :content="listItem ? '编辑':'新增'" @back="goBack" />
+    <el-page-header :content="listItem ? '编辑' : '新增'" @back="goBack" />
 
     <div class="main-title">
       <div class="title">工程信息单</div>
@@ -27,7 +27,7 @@
               disabled
               type="date"
               value-format="yyyy-MM-dd"
-              style="width: 100%;"
+              style="width: 100%"
               placeholder="系统自动生成"
             />
           </el-form-item>
@@ -90,13 +90,17 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商名称" prop="jxsNum">
-            <el-select v-model="mainForm.jxsNum" placeholder="选择经销商" size="small" filterable clearable style="width: 100%" :disabled="listItem != undefined" @change="changeDealer">
-              <el-option
-                v-for="item in dealerList"
-                :key="item.number"
-                :label="item.name"
-                :value="item.number"
-              />
+            <el-select
+              v-model="mainForm.jxsNum"
+              placeholder="选择经销商"
+              size="small"
+              filterable
+              clearable
+              style="width: 100%"
+              :disabled="listItem != undefined"
+              @change="changeDealer"
+            >
+              <el-option v-for="item in dealerList" :key="item.number" :label="item.name" :value="item.number" />
             </el-select>
           </el-form-item>
         </el-col>
@@ -107,13 +111,14 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="行业类别" prop="tradeCategory">
-            <el-select v-model="mainForm.tradeCategory" placeholder="选择行业类别" size="small" clearable style="width: 100%">
-              <el-option
-                v-for="item in tradeCategoryList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
+            <el-select
+              v-model="mainForm.tradeCategory"
+              placeholder="选择行业类别"
+              size="small"
+              clearable
+              style="width: 100%"
+            >
+              <el-option v-for="item in tradeCategoryList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
         </el-col>
@@ -189,7 +194,11 @@
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="格力回复" prop="greeReply">
-            <el-input v-model="mainForm.greeReply" :placeholder="isDealer ? '' : '请输入格力回复'" :disabled="isDealer" />
+            <el-input
+              v-model="mainForm.greeReply"
+              :placeholder="isDealer ? '' : '请输入格力回复'"
+              :disabled="isDealer"
+            />
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
@@ -209,7 +218,7 @@
               type="date"
               disabled
               value-format="yyyy-MM-dd"
-              style="width: 100%;"
+              style="width: 100%"
               placeholder="选择日期"
             />
           </el-form-item>
@@ -220,7 +229,7 @@
               v-model="mainForm.contractDate"
               type="date"
               value-format="yyyy-MM-dd"
-              style="width: 100%;"
+              style="width: 100%"
               placeholder="选择日期"
             />
           </el-form-item>
@@ -239,18 +248,40 @@
     </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
+        :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 align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-if="listItem" v-model="scope.row.saleTypeId" placeholder="选择销售类型" size="mini" clearable style="width: 100%" @change="changeSaleType(scope.$index)">
+            <el-select
+              v-if="listItem"
+              v-model="scope.row.saleTypeId"
+              placeholder="选择销售类型"
+              size="mini"
+              clearable
+              style="width: 100%"
+              @change="changeSaleType(scope.$index)"
+            >
               <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
             </el-select>
             <div v-else>{{ scope.row.saleTypeName }}</div>
           </template>
         </el-table-column>
         <el-table-column align="center" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column
+          align="center"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -282,7 +313,7 @@
         <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip />
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
-            <el-button type="text" @click="deleteItem(scope.$index,scope.row.cid)">删除</el-button>
+            <el-button type="text" @click="deleteItem(scope.$index, scope.row.cid)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -292,7 +323,7 @@
       <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
         <!--        <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>-->
-        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
+        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -341,12 +372,27 @@
 
       <div class="tables">
         <div class="table">
-          <el-table :data="leftGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="leftSelectionChange">
+          <el-table
+            :data="leftGoodsList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+            height="400"
+            @selection-change="leftSelectionChange"
+          >
             <el-table-column align="center" type="selection" width="55" :selectable="checkboxSelect" />
             <el-table-column align="center" label="销售类型" prop="saleName" show-overflow-tooltip />
             <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
             <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+            <el-table-column
+              align="center"
+              label="产品型号"
+              prop="specification"
+              min-width="160"
+              show-overflow-tooltip
+            />
             <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
           </el-table>
           <div class="pagination clearfix" style="margin-top: 10px">
@@ -369,14 +415,28 @@
           <el-button size="small" type="danger" @click="deleteAllGoods">全部删除</el-button>
         </div>
         <div class="table">
-          <el-table :data="rightGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="rightSelectionChange">
+          <el-table
+            :data="rightGoodsList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+            height="400"
+            @selection-change="rightSelectionChange"
+          >
             <el-table-column align="center" type="selection" width="55" />
             <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip />
             <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+            <el-table-column
+              align="center"
+              label="产品型号"
+              prop="specification"
+              min-width="160"
+              show-overflow-tooltip
+            />
             <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
             <el-table-column align="center" prop="saleName" label="销售类型" show-overflow-tooltip />
-
           </el-table>
         </div>
       </div>
@@ -596,7 +656,7 @@ export default {
       getTypeList({
         pageNum: 1,
         pageSize: -1
-      }).then((res) => {
+      }).then(res => {
         this.salesTypeList = res.data.records
       })
     },
@@ -732,14 +792,18 @@ export default {
     delRepeat(arr1, arr2) {
       const allArr = arr1.concat(arr2) // 两个数组对象合并
       const newArr = [] // 存放去重后数据的新数组
-      for (let i = 0; i < allArr.length; i++) { // 循环allArr数组对象的内容
+      for (let i = 0; i < allArr.length; i++) {
+        // 循环allArr数组对象的内容
         let flag = true // 建立标记,判断数据是否重复,true为不重复
-        for (let j = 0; j < newArr.length; j++) { // 循环新数组的内容
-          if (allArr[i].id == newArr[j].id) { // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+        for (let j = 0; j < newArr.length; j++) {
+          // 循环新数组的内容
+          if (allArr[i].id == newArr[j].id) {
+            // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false
           }
         }
-        if (flag) { // 判断是否重复
+        if (flag) {
+          // 判断是否重复
           newArr.push(allArr[i]) // 不重复的放入新数组。  新数组的内容会继续进行上边的循环。
         }
       }
@@ -825,7 +889,9 @@ export default {
             delete item.id
           })
 
-          const saleManItem = this.mainForm.salesMan ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : ''
+          const saleManItem = this.mainForm.salesMan
+            ? this.salesmanList.find(o => o.adminUserId == this.mainForm.salesMan)
+            : ''
           const params = {
             // orderDate: this.mainForm.orderDate + ' 00:00:00',
             // mainId: this.mainForm.mainId,

+ 174 - 345
src/views/supply/engin/components/home_detail.vue

@@ -97,7 +97,7 @@
             <el-col :span="8" class="item">
               <div class="label">不扣押金</div>
               <div class="value">
-                {{ detailData.takeDeposit ? "是" : "否" }}
+                {{ detailData.takeDeposit ? '是' : '否' }}
               </div>
             </el-col>
             <el-col :span="8" class="item">
@@ -127,10 +127,7 @@
             <el-col :span="24" class="item" v-if="!isDealer">
               <div class="label">格力内部备注</div>
               <div class="value">
-                <el-input
-                  v-model="detailData.geLiInerNote"
-                  placeholder="请输入格力内部备注"
-                ></el-input>
+                <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注"></el-input>
                 <el-divider direction="vertical"></el-divider>
                 <el-button type="text" @click="saveRemark">保存备注</el-button>
               </div>
@@ -200,12 +197,7 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column
-              align="center"
-              label="序号"
-              type="index"
-              width="50"
-            ></el-table-column>
+            <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
             <el-table-column
               align="left"
               label="销售类型"
@@ -249,13 +241,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div
-                  :style="
-                    scope.row.realSpecification != scope.row.specification
-                      ? { color: 'blue' }
-                      : ''
-                  "
-                >
+                <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
                   {{ scope.row.realSpecification }}
                 </div>
               </template>
@@ -267,24 +253,12 @@
               min-width="100"
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
-              align="right"
-              label="单价"
-              prop="price"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.price | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="订单金额"
-              prop="totalAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.totalAmount | numToFixed }}
               </template>
@@ -323,24 +297,12 @@
                 {{ scope.row.payRebateAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="格力折扣"
-              prop="discAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.discAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="实付金额"
-              prop="payAmount"
-              min-width="100"
-              show-overflow-tooltip
-            >
+            <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
@@ -353,7 +315,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.isDirectTransfer ? "是" : "否" }}
+                {{ scope.row.isDirectTransfer ? '是' : '否' }}
               </template>
             </el-table-column>
             <el-table-column
@@ -387,13 +349,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div
-                  :style="
-                    scope.row.realMaterialNumber != scope.row.materialNumber
-                      ? { color: 'blue' }
-                      : ''
-                  "
-                >
+                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
                   {{ scope.row.realMaterialNumber }}
                 </div>
               </template>
@@ -406,14 +362,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div
-                  :style="
-                    scope.row.realMaterialOldNumber !=
-                    scope.row.materialOldNumber
-                      ? { color: 'blue' }
-                      : ''
-                  "
-                >
+                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
                   {{ scope.row.realMaterialOldNumber }}
                 </div>
               </template>
@@ -442,19 +391,11 @@
           <el-button
             type="danger"
             @click="closeData"
-            v-if="
-              !isDealer &&
-              (detailData.examineStatus === 'SAVE' ||
-                detailData.examineStatus === 'WAIT')
-            "
+            v-if="!isDealer && (detailData.examineStatus === 'SAVE' || detailData.examineStatus === 'WAIT')"
             >关闭订单</el-button
           >
           <!-- <el-button type="primary" @click="openDirectDialog" v-if="!isDealer">提前开票</el-button> -->
-          <el-button
-            type="primary"
-            @click="overData"
-            :disabled="detailData.directTransferStatus"
-            v-if="!isDealer"
+          <el-button type="primary" @click="overData" :disabled="detailData.directTransferStatus" v-if="!isDealer"
             >直调完结</el-button
           >
           <el-button
@@ -493,28 +434,14 @@
           <!--          </el-col>-->
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="选择仓位" prop="position">
-              <el-select
-                v-model="deliverForm.position"
-                placeholder="请选择仓位"
-                style="width: 100%"
-                filterable
-              >
-                <el-option
-                  v-for="item in positionList"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+              <el-select v-model="deliverForm.position" placeholder="请选择仓位" style="width: 100%" filterable>
+                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="发货申请备注" prop="remark">
-              <el-input
-                v-model="deliverForm.remark"
-                placeholder="请输入发货申请备注"
-                clearable
-              ></el-input>
+              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -530,12 +457,7 @@
           stripe
           max-height="400"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column
             align="center"
             label="销售类型"
@@ -634,20 +556,11 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDeliverDialog">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitDeliverForm"
-          :loading="formLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitDeliverForm" :loading="formLoading">确 定</el-button>
       </span>
     </el-dialog>
 
-    <el-dialog
-      title="直接调拨单(提前开票)"
-      :visible.sync="isShowDirectDialog"
-      width="80%"
-    >
+    <el-dialog title="直接调拨单(提前开票)" :visible.sync="isShowDirectDialog" width="80%">
       <el-form
         ref="directForm"
         :model="directForm"
@@ -684,12 +597,7 @@
                 filterable
                 @change="changePosition1"
               >
-                <el-option
-                  v-for="item in positionList1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -720,12 +628,7 @@
                 filterable
                 @change="changePosition2"
               >
-                <el-option
-                  v-for="item in positionList2"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -742,12 +645,7 @@
           stripe
           max-height="400"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column
             align="center"
             label="销售类型"
@@ -839,20 +737,10 @@
             min-width="110"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调出货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="center" label="调出货主" min-width="100" show-overflow-tooltip>
             <template slot-scope="">弘格</template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            label="调入货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="center" label="调入货主" min-width="100" show-overflow-tooltip>
             <template slot-="scope">弘格</template>
           </el-table-column>
           <el-table-column
@@ -866,20 +754,11 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDirectDialog">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitDirectForm"
-          :loading="formLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitDirectForm" :loading="formLoading">确 定</el-button>
       </span>
     </el-dialog>
 
-    <CheckOrder
-      :checkOrderId="checkOrderId"
-      v-if="isShowCheckOrder"
-      @backDetail="backDetail"
-    />
+    <CheckOrder :checkOrderId="checkOrderId" v-if="isShowCheckOrder" @backDetail="backDetail" />
   </div>
 </template>
 
@@ -892,29 +771,29 @@ import {
   deliverOrder,
   directOrder,
   getPositionList,
-  editRemarkHome,
-} from "@/api/supply/engin";
-import CheckOrder from "@/components/Common/check-order";
+  editRemarkHome
+} from '@/api/supply/engin'
+import CheckOrder from '@/components/Common/check-order'
 
 export default {
-  name: "HomeDetail",
-  componentName: "HomeDetail",
+  name: 'HomeDetail',
+  componentName: 'HomeDetail',
   components: {
     CheckOrder
   },
-  props: ["listItem"],
+  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
-      ];
-      let obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      let obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -922,41 +801,31 @@ export default {
 
       isShowDeliverDialog: false,
       deliverForm: {
-        date: "",
-        position: "",
-        remark: "",
+        date: '',
+        position: '',
+        remark: ''
       },
       deliverFormRules: {
         // date: [
         //   { required: true, message: "请选择发货日期", trigger: "change" },
         // ],
-        position: [
-          { required: true, message: "请选择仓位", trigger: "change" },
-        ],
+        position: [{ required: true, message: '请选择仓位', trigger: 'change' }]
       },
       positionList: [],
       deliverGoodsList: [],
 
       isShowDirectDialog: false,
       directForm: {
-        warehouse1: "",
-        position1: "",
-        warehouse2: "",
-        position2: "",
+        warehouse1: '',
+        position1: '',
+        warehouse2: '',
+        position2: ''
       },
       directFormRules: {
-        warehouse1: [
-          { required: true, message: "请选择调出仓库", trigger: "change" },
-        ],
-        position1: [
-          { required: true, message: "请选择调出仓位", trigger: "change" },
-        ],
-        warehouse2: [
-          { required: true, message: "请选择调入仓库", trigger: "change" },
-        ],
-        position2: [
-          { required: true, message: "请选择调入仓位", trigger: "change" },
-        ],
+        warehouse1: [{ required: true, message: '请选择调出仓库', trigger: 'change' }],
+        position1: [{ required: true, message: '请选择调出仓位', trigger: 'change' }],
+        warehouse2: [{ required: true, message: '请选择调入仓库', trigger: 'change' }],
+        position2: [{ required: true, message: '请选择调入仓位', trigger: 'change' }]
       },
       warehouseList1: [],
       warehouseList2: [],
@@ -967,24 +836,18 @@ export default {
       formLoading: false,
 
       checkOrderId: {},
-      isShowCheckOrder: false,
-    };
+      isShowCheckOrder: false
+    }
   },
 
   computed: {
     isExamine() {
-      return (
-        this.detailData.examineStatus === "OK" ||
-        this.detailData.examineStatus === "FAIL"
-      );
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
     },
     isDealer() {
-      console.log(
-        JSON.parse(localStorage.getItem("supply_user")).isCustomer,
-        "898"
-      );
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      console.log(JSON.parse(localStorage.getItem('supply_user')).isCustomer, '898')
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   created() {
@@ -994,18 +857,18 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
 
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList1 = res.data.records;
-        this.warehouseList2 = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList1 = res.data.records
+        this.warehouseList2 = res.data.records
+      })
     },
 
     // 获取虚拟仓位列表
@@ -1013,100 +876,85 @@ export default {
       getPositionList({
         pageNum: 1,
         pageSize: -1,
-        type: 2,
-      }).then((res) => {
-        this.positionList = res.data.records;
-      });
+        type: 2
+      }).then(res => {
+        this.positionList = res.data.records
+      })
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
+      getOrderDetail({ id: this.listItem.parentId }).then(res => {
         if (res.data.items) {
-          res.data.items.forEach((item) => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
-            item.sums1 = [
-              "number",
-              "directTransferQty",
-              "qty",
-              "enginNum",
-              "oldQty",
-              "hasSendQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "payRebateAmount",
-              "discAmount",
-            ];
-          });
+          res.data.items.forEach(item => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
+            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'oldQty', 'hasSendQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
+          })
         }
-        this.detailData = res.data;
-      });
+        this.detailData = res.data
+      })
     },
 
     // 关闭订单
     closeData() {
-      this.$confirm("此操作将关闭订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将关闭订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           closeHome({
             id: this.listItem.parentId,
-            refEnginRecordNo: this.detailData.refEnginRecordNo,
-          }).then((res) => {
-            this.$successMsg();
-            this.getDetail();
-          });
+            refEnginRecordNo: this.detailData.refEnginRecordNo
+          }).then(res => {
+            this.$successMsg()
+            this.getDetail()
+          })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
 
     // 直调完结
     overData() {
-      this.$confirm("此操作将直调完结订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           overOrder({
             id: this.listItem.parentId,
-            refEnginRecordNo: this.detailData.refEnginRecordNo,
-          }).then((res) => {
-            this.$successMsg();
-            this.getDetail();
-          });
+            refEnginRecordNo: this.detailData.refEnginRecordNo
+          }).then(res => {
+            this.$successMsg()
+            this.getDetail()
+          })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
 
     // 更改仓库
     changeWarehouse() {
-      this.deliverForm.position = "";
-      let obj = this.warehouseList.find(
-        (o) => o.id == this.deliverForm.warehouse
-      );
-      this.positionList = obj.kingDeeStocks;
+      this.deliverForm.position = ''
+      let obj = this.warehouseList.find(o => o.id == this.deliverForm.warehouse)
+      this.positionList = obj.kingDeeStocks
     },
 
     // 打开 直调发货
     openDeliverDialog() {
-      this.isShowDeliverDialog = true;
-      this.deliverGoodsList = this.detailData.items;
-      this.deliverGoodsList.forEach((item) => {
-        item.warehouse1 = "";
-        item.warehouse2 = "";
-        item.position1 = "";
-        item.position2 = "";
-        item.status1 = "";
-        item.status2 = "";
-        this.$set(item, "realDirectTransferQty", item.refundableQty);
-      });
-      this.getPositionList();
+      this.isShowDeliverDialog = true
+      this.deliverGoodsList = this.detailData.items
+      this.deliverGoodsList.forEach(item => {
+        item.warehouse1 = ''
+        item.warehouse2 = ''
+        item.position1 = ''
+        item.position2 = ''
+        item.status1 = ''
+        item.status2 = ''
+        this.$set(item, 'realDirectTransferQty', item.refundableQty)
+      })
+      this.getPositionList()
     },
 
     // 关闭 直调发货
@@ -1119,81 +967,70 @@ export default {
       this.$refs.deliverForm.validate(valid => {
         if (valid) {
           for (let i = 0; i < this.deliverGoodsList.length; i++) {
-            if (
-              !this.deliverGoodsList[i].directTransferQty &&
-              this.deliverGoodsList[i].directTransferQty !== 0
-            ) {
-              this.$errorMsg("请输入直调数量");
-              return;
+            if (!this.deliverGoodsList[i].directTransferQty && this.deliverGoodsList[i].directTransferQty !== 0) {
+              this.$errorMsg('请输入直调数量')
+              return
             }
           }
           let params = {
             enginOrderId: this.detailData.enginOrderId,
-            enginOrderType: "HOME", // TRADE=商用 HOME=家用
-            deliverDate: this.deliverForm.date + " 00:00:00",
+            enginOrderType: 'HOME', // TRADE=商用 HOME=家用
+            deliverDate: this.deliverForm.date + ' 00:00:00',
             correspondId: this.deliverForm.position,
             remark: this.deliverForm.remark,
             refEnginRecordNo: this.detailData.refEnginRecordNo,
-            items: this.deliverGoodsList,
-          };
-          this.formLoading = true;
+            items: this.deliverGoodsList
+          }
+          this.formLoading = true
           deliverOrder(params)
-            .then((res) => {
-              this.$successMsg();
-              this.isShowDeliverDialog = false;
-              this.getDetail();
+            .then(res => {
+              this.$successMsg()
+              this.isShowDeliverDialog = false
+              this.getDetail()
+            })
+            .finally(res => {
+              this.formLoading = false
             })
-            .finally((res) => {
-              this.formLoading = false;
-            });
         }
-      });
+      })
     },
 
     // 更改调出仓库
     changeWarehouse1() {
-      this.directForm.position1 = "";
-      let obj = this.warehouseList1.find(
-        (o) => o.id == this.directForm.warehouse1
-      );
-      this.positionList1 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse1 = obj.name;
-      });
+      this.directForm.position1 = ''
+      let obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+      this.positionList1 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse1 = obj.name
+      })
     },
 
     // 更改调入仓库
     changeWarehouse2() {
-      this.directForm.position2 = "";
-      let obj = this.warehouseList2.find(
-        (o) => o.id == this.directForm.warehouse2
-      );
-      this.positionList2 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse2 = obj.name;
-      });
+      this.directForm.position2 = ''
+      let obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+      this.positionList2 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse2 = obj.name
+      })
     },
 
     // 更改调出仓位
     changePosition1() {
-      let obj = this.positionList1.find(
-        (o) => o.id == this.directForm.position1
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position1 = obj.name;
-        item.status1 = obj.defStockStatusName;
-      });
+      let obj = this.positionList1.find(o => o.id == this.directForm.position1)
+      this.directGoodsList.forEach(item => {
+        item.position1 = obj.name
+        item.status1 = obj.defStockStatusName
+      })
     },
 
     // 更改调入仓位
     changePosition2() {
-      let obj = this.positionList2.find(
-        (o) => o.id == this.directForm.position2
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position2 = obj.name;
-        item.status2 = obj.defStockStatusName;
-      });
+      let obj = this.positionList2.find(o => o.id == this.directForm.position2)
+      this.directGoodsList.forEach(item => {
+        item.position2 = obj.name
+        item.status2 = obj.defStockStatusName
+      })
     },
 
     // 打开 提前开票
@@ -1212,21 +1049,13 @@ export default {
     submitDirectForm() {
       this.$refs.directForm.validate(valid => {
         if (valid) {
-          let warehouseItem1 = this.warehouseList1.find(
-            (o) => o.id == this.directForm.warehouse1
-          );
-          let positionItem1 = this.positionList1.find(
-            (o) => o.id == this.directForm.position1
-          );
-          let warehouseItem2 = this.warehouseList2.find(
-            (o) => o.id == this.directForm.warehouse2
-          );
-          let positionItem2 = this.positionList2.find(
-            (o) => o.id == this.directForm.position2
-          );
+          let warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+          let positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
+          let warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+          let positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
           let params = {
             orderNo: this.detailData.enginOrderId,
-            orderType: "HOME", // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
+            orderType: 'HOME', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
             correspondId: this.directForm.warehouse1,
             correspondName: warehouseItem1.name,
             stockId: this.directForm.position1,
@@ -1235,20 +1064,20 @@ export default {
             inCorrespondName: warehouseItem2.name,
             inStockId: this.directForm.position2,
             inStockName: positionItem2.name,
-            refEnginRecordNo: this.detailData.refEnginRecordNo || "",
-          };
-          this.formLoading = true;
+            refEnginRecordNo: this.detailData.refEnginRecordNo || ''
+          }
+          this.formLoading = true
           directOrder(params)
-            .then((res) => {
-              this.$successMsg();
-              this.isShowDirectDialog = false;
-              this.getDetail();
+            .then(res => {
+              this.$successMsg()
+              this.isShowDirectDialog = false
+              this.getDetail()
+            })
+            .finally(res => {
+              this.formLoading = false
             })
-            .finally((res) => {
-              this.formLoading = false;
-            });
         }
-      });
+      })
     },
 
     // 联查单据
@@ -1262,18 +1091,18 @@ export default {
       editRemarkHome({
         enginOrderId: this.detailData.enginOrderId,
         geLiInerNote: this.detailData.geLiInerNote,
-        refEnginRecordNo: this.detailData.refEnginRecordNo,
-      }).then((res) => {
-        this.$successMsg("编辑成功");
-        this.getDetail();
-      });
+        refEnginRecordNo: this.detailData.refEnginRecordNo
+      }).then(res => {
+        this.$successMsg('编辑成功')
+        this.getDetail()
+      })
     },
 
     backDetail() {
-      this.isShowCheckOrder = false;
-    },
-  },
-};
+      this.isShowCheckOrder = false
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

Plik diff jest za duży
+ 102 - 565
src/views/supply/engin/components/home_form.vue


+ 63 - 172
src/views/supply/engin/components/home_return.vue

@@ -39,11 +39,7 @@
         <el-col :span="8" class="item">
           <div class="label">行业类别</div>
           <div class="value">
-            <el-input
-              v-model="detailData.refTradeCategory"
-              :disabled="isDealer"
-              placeholder="请输入行业类别"
-            />
+            <el-input v-model="detailData.refTradeCategory" :disabled="isDealer" placeholder="请输入行业类别" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
@@ -92,7 +88,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
-          <div class="value">{{ detailData.takeDeposit ? "是" : "否" }}</div>
+          <div class="value">{{ detailData.takeDeposit ? '是' : '否' }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
@@ -166,12 +162,7 @@
         show-summary
         :summary-method="$getSummaries"
       >
-        <el-table-column
-          align="center"
-          label="序号"
-          type="index"
-          width="50"
-        ></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column
           align="left"
           label="引用记录"
@@ -223,31 +214,13 @@
           show-overflow-tooltip
         >
           <template slot-scope="scope">
-            <div
-              :style="
-                scope.row.realSpecification != scope.row.specification
-                  ? { color: 'blue' }
-                  : ''
-              "
-            >
+            <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
               {{ scope.row.realSpecification }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="单位"
-          prop="unit"
-          min-width="100"
-          show-overflow-tooltip
-        ></el-table-column>
-        <el-table-column
-          align="right"
-          label="单价"
-          prop="price"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
@@ -259,20 +232,8 @@
           min-width="120"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
-          align="right"
-          label="数量"
-          prop="qty"
-          min-width="100"
-          show-overflow-tooltip
-        ></el-table-column>
-        <el-table-column
-          align="right"
-          label="订单金额"
-          prop="totalAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
@@ -284,24 +245,12 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
-          align="right"
-          label="使用返利金额"
-          prop="rebateAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.rebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="right"
-          label="格力折扣"
-          prop="discAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
@@ -313,26 +262,14 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
-          align="right"
-          label="实付金额"
-          prop="payAmount"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="是否直调"
-          prop="isDirectTransfer"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="left" 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
@@ -349,13 +286,7 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
-          align="right"
-          label="退订数量"
-          prop="tdQty"
-          min-width="100"
-          show-overflow-tooltip
-        >
+        <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.tdQty"
@@ -381,13 +312,7 @@
           show-overflow-tooltip
         >
           <template slot-scope="scope">
-            <div
-              :style="
-                scope.row.realMaterialNumber != scope.row.materialNumber
-                  ? { color: 'blue' }
-                  : ''
-              "
-            >
+            <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
               {{ scope.row.realMaterialNumber }}
             </div>
           </template>
@@ -400,24 +325,12 @@
           show-overflow-tooltip
         >
           <template slot-scope="scope">
-            <div
-              :style="
-                scope.row.realMaterialOldNumber != scope.row.materialOldNumber
-                  ? { color: 'blue' }
-                  : ''
-              "
-            >
+            <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
               {{ scope.row.realMaterialOldNumber }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column
-          align="left"
-          label="税率"
-          prop="tax"
-          min-width="100"
-          show-overflow-tooltip
-        ></el-table-column>
+        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>
     </div>
 
@@ -437,10 +350,7 @@
         <el-col :span="24" class="item">
           <div class="label">退订说明</div>
           <div class="value">
-            <el-input
-              v-model="returnForm.remark"
-              placeholder="请输入退订说明"
-            ></el-input>
+            <el-input v-model="returnForm.remark" placeholder="请输入退订说明"></el-input>
           </div>
         </el-col>
       </el-row>
@@ -448,15 +358,8 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm()"
-          >确定退订</el-button
-        >
-        <el-popconfirm
-          title="确定关闭吗?"
-          @onConfirm="goBack"
-          style="margin-left: 10px"
-          v-if="!isDealer"
-        >
+        <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px" v-if="!isDealer">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -468,21 +371,21 @@
 import { getOrderDetail, returnHome } from '@/api/supply/engin'
 
 export default {
-  name: "HomeReturn",
-  componentName: "HomeReturn",
-  props: ["listItem"],
+  name: 'HomeReturn',
+  componentName: 'HomeReturn',
+  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: "已关闭", value: "CLOSE" },
-      ];
-      let obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      let obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -491,14 +394,14 @@ export default {
 
       formLoading: false,
       returnForm: {
-        remark: "",
-      },
-    };
+        remark: ''
+      }
+    }
   },
   computed: {
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
   created() {
     this.getDetail()
@@ -512,74 +415,62 @@ export default {
       var month = date.getMonth() + 1
       var strDate = date.getDate()
       if (month >= 1 && month <= 9) {
-        month = "0" + month;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
       var currentdate = year + seperator1 + month + seperator1 + strDate
       return currentdate
     },
     hasTdQty(row) {
       if (row.tdQty < 0) {
-        row.tdQty = 0;
-        this.$errorMsg("不能填负数");
+        row.tdQty = 0
+        this.$errorMsg('不能填负数')
       }
     },
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
+      getOrderDetail({ id: this.listItem.parentId }).then(res => {
         if (res.data.items) {
-          res.data.items.forEach((item) => {
-            item.sums1 = [
-              "directTransferQty",
-              "qty",
-              "enginNum",
-              "refundableQty",
-              "tdQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "discAmount",
-              "rebateAmount",
-            ];
-          });
+          res.data.items.forEach(item => {
+            item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'rebateAmount']
+          })
         }
-        this.detailData = res.data;
-      });
+        this.detailData = res.data
+      })
     },
 
     // 退订
     clickSubmitForm(val) {
-      this.$confirm("此操作将退订订单, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将退订订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           let params = {
             enginOrderId: this.detailData.enginOrderId,
             items: this.detailData.items,
             refundNote: this.returnForm.remark,
-            refEnginRecordNo: this.detailData.refEnginRecordNo,
-          };
-          returnHome(params).then((res) => {
-            this.$successMsg();
-            this.goBack();
-            this.$parent.getList();
-          });
+            refEnginRecordNo: this.detailData.refEnginRecordNo
+          }
+          returnHome(params).then(res => {
+            this.$successMsg()
+            this.goBack()
+            this.$parent.getList()
+          })
         })
-        .catch(() => {});
-    },
-  },
-};
+        .catch(() => {})
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

+ 254 - 169
src/views/supply/engin/engin_list.vue

@@ -114,7 +114,14 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button v-if="$checkBtnRole('add', $route.meta.roles)" size="mini" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
+            <el-button
+              v-if="$checkBtnRole('add', $route.meta.roles)"
+              size="mini"
+              type="primary"
+              icon="el-icon-plus"
+              @click="toForm()"
+              >新增</el-button
+            >
           </div>
           <div class="fr">
             <ExportButton :ex-url="'engin-info-order/export'" :ex-params="exParams" />
@@ -132,7 +139,14 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column align="left" label="审核状态" sortable prop="examineStatus" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="审核状态"
+              sortable
+              prop="examineStatus"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
@@ -161,7 +175,16 @@
               <template slot-scope="scope">
                 <div>
                   <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
-                  <el-button v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" />
+                  <el-button
+                    v-if="
+                      $checkBtnRole('date', $route.meta.roles) &&
+                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')
+                    "
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  />
                 </div>
               </template>
             </el-table-column>
@@ -192,10 +215,38 @@
                 <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="项目类别" sortable prop="projectName" min-width="160" show-overflow-tooltip />
-            <el-table-column align="left" label="使用单位" sortable prop="useUnit" min-width="160" show-overflow-tooltip />
-            <el-table-column align="left" label="安装地址" sortable prop="installAddress" min-width="160" show-overflow-tooltip />
-            <el-table-column align="left" label="物料编码" sortable prop="materialNumber" min-width="120" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="项目类别"
+              sortable
+              prop="projectName"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="使用单位"
+              sortable
+              prop="useUnit"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="安装地址"
+              sortable
+              prop="installAddress"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="物料编码"
+              sortable
+              prop="materialNumber"
+              min-width="120"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialNumber" />
                 <span>{{ scope.row.materialNumber }}</span>
@@ -265,18 +316,60 @@
                 {{ scope.row.totalAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="表体业务员" sortable prop="itemServiceName" min-width="110" show-overflow-tooltip />
-            <el-table-column align="left" label="表头业务员" sortable prop="serviceName" min-width="110" show-overflow-tooltip />
+            <el-table-column
+              align="left"
+              label="表体业务员"
+              sortable
+              prop="itemServiceName"
+              min-width="110"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="表头业务员"
+              sortable
+              prop="serviceName"
+              min-width="110"
+              show-overflow-tooltip
+            />
             <el-table-column align="left" label="备注" sortable prop="remark" min-width="160" show-overflow-tooltip />
-            <el-table-column align="left" label="制表人" sortable prop="createName" min-width="100" show-overflow-tooltip />
-            <el-table-column align="left" label="制表日期" sortable prop="createTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="left" label="审核人" sortable prop="confirmName" min-width="100" show-overflow-tooltip />
-            <el-table-column align="left" label="审核日期" sortable prop="confirmTime" min-width="160" show-overflow-tooltip />
+            <el-table-column
+              align="left"
+              label="制表人"
+              sortable
+              prop="createName"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="制表日期"
+              sortable
+              prop="createTime"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="审核人"
+              sortable
+              prop="confirmName"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              align="left"
+              label="审核日期"
+              sortable
+              prop="confirmTime"
+              min-width="160"
+              show-overflow-tooltip
+            />
             <el-table-column align="center" label="操作" width="210" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.enginInfoId)"
                 >
@@ -284,7 +377,7 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定撤回吗?"
                   @onConfirm="handleWithdraw(scope.row.enginInfoId)"
                 >
@@ -292,14 +385,17 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.enginInfoId)"
                 >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
                 <el-button
-                  v-if="$checkBtnRole('edit', $route.meta.roles) && (!isDealer || (isDealer && scope.row.examineStatus === 'SAVE'))"
+                  v-if="
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    (!isDealer || (isDealer && scope.row.examineStatus === 'SAVE'))
+                  "
                   type="text"
                   @click="toForm(scope.row)"
                 >
@@ -312,19 +408,14 @@
                 >
                   审批
                 </el-button>
-                <el-button
-                  type="text"
-                  @click="toDetail(scope.row)"
-                >
-                  详情
-                </el-button>
+                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
                 <el-popconfirm
                   v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
-                  style="margin-left: 10px;"
+                  style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.enginInfoId)"
                 >
-                  <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
+                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -351,7 +442,6 @@
     <EnginDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
     <EnginForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
     <EnginExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
-
   </div>
 </template>
 
@@ -400,7 +490,6 @@ export default {
         model: '',
         orderDate: '',
         isDirectTransfer: null
-
       },
       statusList: [
         { label: '已保存', value: 'SAVE' },
@@ -418,7 +507,7 @@ export default {
       isShowDetail: false,
       isShowForm: false,
       isShowExamine: false,
-      isCollapse:true,
+      isCollapse: true,
       editId: null,
       isShowEditDateDialog: false,
       dateForm: {
@@ -449,7 +538,6 @@ export default {
         serviceId: this.screenForm.salesMan,
         specification: this.screenForm.model,
         isDirectTransfer: this.screenForm.isDirectTransfer
-
       }
     }
   },
@@ -477,167 +565,164 @@ export default {
     this.getList()
   },
 
-  methods:
-
-    {
+  methods: {
     // 获取业务员列表
-      getSalesmanList() {
-        getSalesmanList({
-          pageNum: 1,
-          pageSize: -1,
-          isCustomer: 0,
-          status: true
-        }).then(res => {
-          this.salesmanList = res.data.records
-        })
-      },
-
-      // 查询列表
-      getList() {
-        this.listLoading = true
+    getSalesmanList() {
+      getSalesmanList({
+        pageNum: 1,
+        pageSize: -1,
+        isCustomer: 0,
+        status: true
+      }).then(res => {
+        this.salesmanList = res.data.records
+      })
+    },
 
-        const params = {
-          pageNum: this.currentPage,
-          pageSize: this.pageSize,
-          enginInfoNo: this.screenForm.orderNum,
-          projectNo: this.screenForm.enginNum,
-          enginSignType: this.screenForm.loginNum,
-          projectName: this.screenForm.enginName,
-          startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
-          endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
-          startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
-          endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
-          customerKeyword: this.screenForm.dealer,
-          useUnit: this.screenForm.company,
-          createName: this.screenForm.createMan,
-          confirmName: this.screenForm.examineMan,
-          examineStatus: this.screenForm.status.join(','),
-          serviceId: this.screenForm.salesMan,
-          specification: this.screenForm.model,
-          isDirectTransfer: this.screenForm.isDirectTransfer
+    // 查询列表
+    getList() {
+      this.listLoading = true
 
-        }
-        getEnginList(params).then((res) => {
-          res.data.records.forEach(item => {
-            item.sums1 = ['qty', 'hasOrderQty', 'compute_kdQty']
-            item.sums2 = ['totalAmount', 'price']
-          })
-          this.dataList = res.data.records
-          this.listTotal = res.data.total
-          this.listLoading = false
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        enginInfoNo: this.screenForm.orderNum,
+        projectNo: this.screenForm.enginNum,
+        enginSignType: this.screenForm.loginNum,
+        projectName: this.screenForm.enginName,
+        startOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[0] : '',
+        endOrderDate: this.screenForm.orderDate ? this.screenForm.orderDate[1] : '',
+        startContractExpireDate: this.screenForm.date ? this.screenForm.date[0] : '',
+        endContractExpireDate: this.screenForm.date ? this.screenForm.date[1] : '',
+        customerKeyword: this.screenForm.dealer,
+        useUnit: this.screenForm.company,
+        createName: this.screenForm.createMan,
+        confirmName: this.screenForm.examineMan,
+        examineStatus: this.screenForm.status.join(','),
+        serviceId: this.screenForm.salesMan,
+        specification: this.screenForm.model,
+        isDirectTransfer: this.screenForm.isDirectTransfer
+      }
+      getEnginList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['qty', 'hasOrderQty', 'compute_kdQty']
+          item.sums2 = ['totalAmount', 'price']
         })
-      },
+        this.dataList = res.data.records
+        this.listTotal = res.data.total
+        this.listLoading = false
+      })
+    },
 
-      // 提交筛选表单
-      submitScreenForm() {
-        this.currentPage = 1
-        this.getList()
-      },
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1
+      this.getList()
+    },
 
-      // 重置筛选表单
-      resetScreenForm() {
-        this.$refs.screenForm.resetFields()
-        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()
-      },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.currentPage = 1
+      this.getList()
+    },
 
-      // 更改当前页
-      handleCurrentChange(val) {
-        this.currentPage = val
-        this.getList()
-      },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this.getList()
+    },
 
-      // 进入表单
-      toForm(item) {
-        this.queryItem = item
-        this.isShowForm = true
-      },
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item
+      this.isShowForm = true
+    },
 
-      // 进入审批
-      toExamine(item) {
-        this.queryItem = item
-        this.isShowExamine = true
-      },
+    // 进入审批
+    toExamine(item) {
+      this.queryItem = item
+      this.isShowExamine = true
+    },
 
-      // 进入详情
-      toDetail(item) {
-        this.queryItem = item
-        this.isShowDetail = true
-      },
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item
+      this.isShowDetail = true
+    },
 
-      backList() {
-        this.queryItem = {}
-        this.isShowDetail = false
-        this.isShowForm = false
-        this.isShowExamine = false
-      },
+    backList() {
+      this.queryItem = {}
+      this.isShowDetail = false
+      this.isShowForm = false
+      this.isShowExamine = false
+    },
 
-      // 申请
-      handleSubmit(id) {
-        applyEngin({ id }).then(res => {
-          this.$successMsg()
-          this.getList()
-        })
-      },
+    // 申请
+    handleSubmit(id) {
+      applyEngin({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
+    },
 
-      // 撤回
-      handleWithdraw(id) {
-        withdrawEngin({ id }).then(res => {
-          this.$successMsg()
-          this.getList()
-        })
-      },
+    // 撤回
+    handleWithdraw(id) {
+      withdrawEngin({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
+    },
 
-      // 弃审
-      handleAbandon(id) {
-        abandonEngin({ id }).then(res => {
-          this.$successMsg()
-          this.getList()
-        })
-      },
+    // 弃审
+    handleAbandon(id) {
+      abandonEngin({ id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
+    },
 
-      // 删除
-      handleDelete(id) {
-        deleteEngin({ ids: id }).then(res => {
-          this.$successMsg()
-          this.getList()
-        })
-      },
+    // 删除
+    handleDelete(id) {
+      deleteEngin({ ids: id }).then(res => {
+        this.$successMsg()
+        this.getList()
+      })
+    },
 
-      // 打开 修改订单日期
-      editDate(item) {
-        this.editId = item.enginInfoId
-        this.dateForm.date = item.orderDate.slice(0, 10)
-        this.isShowEditDateDialog = true
-      },
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.enginInfoId
+      this.dateForm.date = item.orderDate.slice(0, 10)
+      this.isShowEditDateDialog = true
+    },
 
-      // 提交 修改订单日期
-      submitDateForm() {
-        editDateEngin({
-          enginInfoId: this.editId,
-          orderDate: this.dateForm.date + ' 00:00:00'
-        }).then(res => {
-          this.isShowEditDateDialog = false
-          this.getList()
-          this.$successMsg('修改成功')
-        })
-      },
+    // 提交 修改订单日期
+    submitDateForm() {
+      editDateEngin({
+        enginInfoId: this.editId,
+        orderDate: this.dateForm.date + ' 00:00:00'
+      }).then(res => {
+        this.isShowEditDateDialog = false
+        this.getList()
+        this.$successMsg('修改成功')
+      })
+    },
 
-      computeAllowQty(qty = 0, hasOrderQty = 0) {
-        const allowQty = qty - hasOrderQty
-        if (allowQty < 0) {
-          return 0
-        }
-        return allowQty
+    computeAllowQty(qty = 0, hasOrderQty = 0) {
+      const allowQty = qty - hasOrderQty
+      if (allowQty < 0) {
+        return 0
       }
+      return allowQty
     }
+  }
 }
 </script>
 

+ 124 - 90
src/views/supply/pickup/sum_list.vue

@@ -9,88 +9,107 @@
         </template>
         <template #search>
           <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="申请发货单号" prop="orderNum">
-              <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号" />
-            </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-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商编码" prop="jxsNum">
-              <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码" />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="warehouse">
-              <el-input v-model="screenForm.warehouse" placeholder="请输入仓库" />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="状态" prop="status">
-              <el-select v-model="screenForm.status" placeholder="请选择">
-                <el-option label="未打单" :value="0" />
-                <el-option label="已打单" :value="1" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="手机号" prop="takerPhone">
-              <el-input v-model.number="screenForm.takerPhone" type="number" placeholder="请输入手机号" @mousewheel.native.prevent />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货人" prop="takerId">
-              <el-select
-                v-model="screenForm.takerId"
-                placeholder="请选择"
-                clearable
-                filterable
-              >
-                <el-option v-for="item in pickupManList" :key="item.id" :label="item.takerName" :value="item.id">
-                  <template>
-                    <span>{{ item.takerName }}</span>
-                    <span style="color: #cccccc"> {{ item.customerName }}</span>
-                  </template>
-                </el-option>
-
-              </el-select>
-            </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-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="打印时间" prop="printTime">
-              <el-date-picker v-model="screenForm.printTime" type="datetimerange" range-separator="至" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="出库单号" prop="salesOrderId">
-              <el-input v-model.number="screenForm.salesOrderId" type="number" placeholder="请输入出库单号" @mousewheel.native.prevent />
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="物流公司" prop="logisticsId">
-              <el-select
-                v-model="screenForm.logisticsId"
-                placeholder="请选择物流公司"
-                clearable
-                filterable
-              >
-                <el-option v-for="item in logisticsList" :key="item.id" :label="item.logisticsCompany" :value="item.id" />
-
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="申请发货单号" prop="orderNum">
+                  <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号" />
+                </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-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="经销商编码" prop="jxsNum">
+                  <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="仓库" prop="warehouse">
+                  <el-input v-model="screenForm.warehouse" placeholder="请输入仓库" />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="状态" prop="status">
+                  <el-select v-model="screenForm.status" placeholder="请选择">
+                    <el-option label="未打单" :value="0" />
+                    <el-option label="已打单" :value="1" />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="手机号" prop="takerPhone">
+                  <el-input
+                    v-model.number="screenForm.takerPhone"
+                    type="number"
+                    placeholder="请输入手机号"
+                    @mousewheel.native.prevent
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="提货人" prop="takerId">
+                  <el-select v-model="screenForm.takerId" placeholder="请选择" clearable filterable>
+                    <el-option v-for="item in pickupManList" :key="item.id" :label="item.takerName" :value="item.id">
+                      <template>
+                        <span>{{ item.takerName }}</span>
+                        <span style="color: #cccccc"> {{ item.customerName }}</span>
+                      </template>
+                    </el-option>
+                  </el-select>
+                </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-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="打印时间" prop="printTime">
+                  <el-date-picker
+                    v-model="screenForm.printTime"
+                    type="datetimerange"
+                    range-separator="至"
+                    style="width: 100%"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="出库单号" prop="salesOrderId">
+                  <el-input
+                    v-model.number="screenForm.salesOrderId"
+                    type="number"
+                    placeholder="请输入出库单号"
+                    @mousewheel.native.prevent
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="物流公司" prop="logisticsId">
+                  <el-select v-model="screenForm.logisticsId" placeholder="请选择物流公司" clearable filterable>
+                    <el-option
+                      v-for="item in logisticsList"
+                      :key="item.id"
+                      :label="item.logisticsCompany"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
         </template>
       </Collapse>
     </div>
@@ -102,7 +121,15 @@
         </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="left" label="状态" min-width="80" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.printNum ? '已打单' : '未打单' }}
@@ -206,7 +233,15 @@
     </div>
     <div class="pagination clearfix">
       <div class="fr">
-        <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+        <el-pagination
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
       </div>
     </div>
   </div>
@@ -238,7 +273,7 @@ export default {
         salesOrderId: '',
         logisticsId: ''
       },
-      isCollapse:true,
+      isCollapse: true,
       pickupManList: '',
       logisticsList: []
     }
@@ -292,7 +327,7 @@ export default {
         printEndTime: this.screenForm.printTime[1],
         salesOrderId: this.screenForm.salesOrderId
       }
-      getPickupList(params).then((res) => {
+      getPickupList(params).then(res => {
         this.dataList = res.data.records
         this.listTotal = res.data.total
         this.listLoading = false
@@ -300,7 +335,7 @@ export default {
     },
 
     getPickupManList() {
-      getPickupManList({ pageNum: 1, pageSize: -1 }).then((res) => {
+      getPickupManList({ pageNum: 1, pageSize: -1 }).then(res => {
         this.pickupManList = res.data.records
       })
     },
@@ -309,7 +344,7 @@ export default {
         pageNum: 1,
         pageSize: -1
       }
-      getLogisticsList(params).then((res) => {
+      getLogisticsList(params).then(res => {
         this.logisticsList = res.data.records
         console.log(this.logisticsList, 'kkk')
       })
@@ -343,5 +378,4 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 187 - 414
src/views/supply/policy/components/retail_detail.vue

@@ -189,33 +189,11 @@
           ></el-table-column> -->
           <el-table-column align="right" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip />
 
-            label="原订单数量"
-            prop="oldQty"
-            min-width="100"
-            show-overflow-tooltip
-          />
+          label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip />
 
-          <el-table-column
-            align="left"
-            label="表体业务员"
-            prop="serviceName"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="备注"
-            prop="remark"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="税率"
-            prop="tax"
-            min-width="100"
-            show-overflow-tooltip
-          />
+          <el-table-column align="left" label="表体业务员" prop="serviceName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
+          <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
         </el-table>
       </div>
 
@@ -232,10 +210,7 @@
             <el-col :span="12" class="item">
               <div class="label">审批结果</div>
               <div class="value">
-                {{
-                  detailData.examineStatus
-                    | statusFilter(detailData.examineTime)
-                }}
+                {{ detailData.examineStatus | statusFilter(detailData.examineTime) }}
               </div>
             </el-col>
             <el-col :span="24" class="item">
@@ -255,33 +230,21 @@
         <el-button
           v-if="isCustomer"
           :type="status ? 'info' : 'primary'"
-          :disabled="
-            detailData.examineStatus !== 'OK' ||
-            status ||
-            detailData.directTransferStatus
-          "
+          :disabled="detailData.examineStatus !== 'OK' || status || detailData.directTransferStatus"
           @click="openDeliverDialog"
           >直调发货</el-button
         >
         <el-button
           v-if="isCustomer"
           :type="status ? 'info' : 'primary'"
-          :disabled="
-            detailData.examineStatus !== 'OK' ||
-            status ||
-            detailData.directTransferStatus
-          "
+          :disabled="detailData.examineStatus !== 'OK' || status || detailData.directTransferStatus"
           @click="handleFinish"
           >直调完成</el-button
         >
         <el-button @click="goBack">返回列表</el-button>
       </div>
     </div>
-    <el-dialog
-      title="直接调拨单(提前开票)"
-      :visible.sync="isShowDirectDialog"
-      width="80%"
-    >
+    <el-dialog title="直接调拨单(提前开票)" :visible.sync="isShowDirectDialog" width="80%">
       <el-form
         ref="directForm"
         :model="directForm"
@@ -300,12 +263,7 @@
                 filterable
                 @change="changeWarehouse1"
               >
-                <el-option
-                  v-for="item in warehouseList1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
+                <el-option v-for="item in warehouseList1" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -318,12 +276,7 @@
                 filterable
                 @change="changePosition1"
               >
-                <el-option
-                  v-for="item in positionList1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
+                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -336,12 +289,7 @@
                 filterable
                 @change="changeWarehouse2"
               >
-                <el-option
-                  v-for="item in warehouseList2"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
+                <el-option v-for="item in warehouseList2" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -354,12 +302,7 @@
                 filterable
                 @change="changePosition2"
               >
-                <el-option
-                  v-for="item in positionList2"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
+                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -377,140 +320,46 @@
           max-height="400"
         >
           <el-table-column align="left" label="序号" type="index" width="50" />
-          <el-table-column
-            align="left"
-            label="销售类型"
-            prop="saleTypeName"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialCode"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="物料编码" prop="materialCode" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialCode" />
               <span>{{ scope.row.materialCode }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品编码"
-            prop="materialOldNumber"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialOldNumber" />
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="产品名称"
-            prop="materialName"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="规格型号"
-            prop="specification"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.specification" />
               <span>{{ scope.row.specification }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="right"
-            label="数量"
-            prop="refundableQty"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调出仓库"
-            prop="warehouse1"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调出仓位"
-            prop="position1"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调入仓库"
-            prop="warehouse2"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调入仓位"
-            prop="position2"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调出库存状态"
-            prop="status1"
-            min-width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调入库存状态"
-            prop="status2"
-            min-width="110"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="调出货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+          <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="调出仓库" prop="warehouse1" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="调出仓位" prop="position1" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="调入仓库" prop="warehouse2" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="调入仓位" prop="position2" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="调出库存状态" prop="status1" min-width="110" show-overflow-tooltip />
+          <el-table-column align="left" label="调入库存状态" prop="status2" min-width="110" show-overflow-tooltip />
+          <el-table-column align="left" label="调出货主" min-width="100" show-overflow-tooltip>
             <template slot-scope="">弘格</template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="调入货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="调入货主" min-width="100" show-overflow-tooltip>
             <template slot-="scope">弘格</template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="备注"
-            prop="remark"
-            min-width="160"
-            show-overflow-tooltip
-          />
+          <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -567,11 +416,7 @@
           </el-col>
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="发货申请备注" prop="remark">
-              <el-input
-                v-model="deliverForm.remark"
-                placeholder="请输入发货申请备注"
-                clearable
-              ></el-input>
+              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -590,20 +435,8 @@
           :summary-method="$getSummaries"
         >
           <el-table-column align="left" label="序号" type="index" width="50" />
-          <el-table-column
-            align="left"
-            label="销售类型"
-            prop="saleTypeName"
-            min-width="100"
-            show-overflow-tooltip
-          />
-          <el-table-column
-            align="left"
-            label="物料编码"
-            prop="materialCode"
-            min-width="160"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="left" label="物料编码" prop="materialCode" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copyText="scope.row.materialCode" />
               <span>{{ scope.row.materialCode }}</span>
@@ -660,92 +493,68 @@
         <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
       </span>
     </el-dialog>
-    <CheckOrder
-      v-if="isShowCheckOrder"
-      :check-order-id="checkOrderId"
-      @backDetail="backDetail"
-    />
+    <CheckOrder v-if="isShowCheckOrder" :check-order-id="checkOrderId" @backDetail="backDetail" />
   </div>
 </template>
 
 <script>
-import { getDetail } from "@/api/supply/policy";
-import {
-  adjustDeliver,
-  directOrder,
-  finishData,
-  getPositionList,
-  getWarehouseList,
-} from "@/api/supply/retail";
-import { mapState } from "vuex";
-import CheckOrder from "@/components/Common/check-order";
+import { getDetail } from '@/api/supply/policy'
+import { adjustDeliver, directOrder, finishData, getPositionList, getWarehouseList } from '@/api/supply/retail'
+import { mapState } from 'vuex'
+import CheckOrder from '@/components/Common/check-order'
 
 export default {
-  name: "RetailDetail",
-  componentName: "RetailDetail",
+  name: 'RetailDetail',
+  componentName: 'RetailDetail',
   components: {
-    CheckOrder,
+    CheckOrder
   },
   filters: {
     statusFilter(val, time) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' }
         // { label: '审核驳回', value: 'FAIL' },
-      ];
-      const obj = statusList.find((o) => o.value === val);
+      ]
+      const obj = statusList.find(o => o.value === val)
       if (!time) {
-        return obj ? obj.label : "";
+        return obj ? obj.label : ''
       } else {
-        return val === "SAVE" && time
-          ? "驳回"
-          : obj && obj.label
-          ? obj.label
-          : "";
+        return val === 'SAVE' && time ? '驳回' : obj && obj.label ? obj.label : ''
       }
-    },
+    }
   },
-  props: ["listItem"],
+  props: ['listItem'],
   data() {
     return {
       detailData: {},
       isShowDeliverDialog: false,
       deliverForm: {
-        date: "",
-        position: "",
-        remark: "",
+        date: '',
+        position: '',
+        remark: ''
       },
       deliverFormRules: {
         // date: [
         //   { required: true, message: "请选择发货日期", trigger: "change" },
         // ],
-        position: [
-          { required: true, message: "请选择虚拟仓位", trigger: "change" },
-        ],
+        position: [{ required: true, message: '请选择虚拟仓位', trigger: 'change' }]
       },
       positionList: [],
       goodsList: [],
       isShowDirectDialog: false,
       directForm: {
-        warehouse1: "",
-        position1: "",
-        warehouse2: "",
-        position2: "",
+        warehouse1: '',
+        position1: '',
+        warehouse2: '',
+        position2: ''
       },
       directFormRules: {
-        warehouse1: [
-          { required: true, message: "请选择调出仓库", trigger: "change" },
-        ],
-        position1: [
-          { required: true, message: "请选择调出仓位", trigger: "change" },
-        ],
-        warehouse2: [
-          { required: true, message: "请选择调入仓库", trigger: "change" },
-        ],
-        position2: [
-          { required: true, message: "请选择调入仓位", trigger: "change" },
-        ],
+        warehouse1: [{ required: true, message: '请选择调出仓库', trigger: 'change' }],
+        position1: [{ required: true, message: '请选择调出仓位', trigger: 'change' }],
+        warehouse2: [{ required: true, message: '请选择调入仓库', trigger: 'change' }],
+        position2: [{ required: true, message: '请选择调入仓位', trigger: 'change' }]
       },
       warehouseList1: [],
       warehouseList2: [],
@@ -754,244 +563,211 @@ export default {
       directGoodsList: [],
       status: false,
       checkOrderId: {},
-      isShowCheckOrder: false,
-    };
+      isShowCheckOrder: false
+    }
   },
 
   computed: {
     sidebar() {
-      return this.$store.state.app.sidebar;
+      return this.$store.state.app.sidebar
     },
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened,
-      };
+        openSidebar: this.sidebar.opened
+      }
     },
     isExamine() {
-      return (
-        this.detailData.examineStatus === "OK" ||
-        this.detailData.examineStatus === "FAIL"
-      );
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
     },
     progress() {
-      if (this.detailData.totalQty == 0) return 0;
-      return (this.detailData.takeQty * 100) / (this.detailData.totalQty * 100);
+      if (this.detailData.totalQty == 0) return 0
+      return (this.detailData.takeQty * 100) / (this.detailData.totalQty * 100)
     },
     ...mapState({
       isCustomer: ({ user }) => {
-        return !(user.customerName || user.customerNumber);
-      },
-    }),
+        return !(user.customerName || user.customerNumber)
+      }
+    })
   },
 
   created() {
-    this.getDetail();
-    this.deliverForm.date = this.getDate();
+    this.getDetail()
+    this.deliverForm.date = this.getDate()
   },
 
   methods: {
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.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;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
       var currentdate = year + seperator1 + month + seperator1 + strDate
       return currentdate
     },
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
     // 是否直调完成
     directTransferStatus(val) {
-      this.status = val.retailOrderItemList.some((k) => {
-        return k.directTransferStatus == true;
-      });
-      console.log(this.status, "4554545");
+      this.status = val.retailOrderItemList.some(k => {
+        return k.directTransferStatus == true
+      })
+      console.log(this.status, '4554545')
     },
     // 获取详情
     getDetail() {
       getDetail({ id: this.listItem.id }).then(res => {
         if (res.data.retailOrderItemList) {
-          res.data.retailOrderItemList.forEach((item) => {
-            item.sums1 = [
-              "directTransferQty",
-              "qty",
-              "refundableQty",
-              "oldQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "payRebateAmount",
-              "discAmount",
-              "totalDiscAmount",
-            ];
-          });
+          res.data.retailOrderItemList.forEach(item => {
+            item.sums1 = ['directTransferQty', 'qty', 'refundableQty', 'oldQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount', 'totalDiscAmount']
+          })
         }
-        this.detailData = res.data;
-        this.directTransferStatus(res.data);
-      });
+        this.detailData = res.data
+        this.directTransferStatus(res.data)
+      })
     },
     // 直调完成
     handleFinish() {
-      this.$confirm("此操作将直调完成, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将直调完成, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           finishData({
-            id: this.listItem.id,
-          }).then((res) => {
-            this.$successMsg();
-            this.getDetail();
-          });
+            id: this.listItem.id
+          }).then(res => {
+            this.$successMsg()
+            this.getDetail()
+          })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
 
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
     },
     // 更改仓库
     changeWarehouse() {
-      this.deliverForm.position = "";
-      const obj = this.warehouseList.find(
-        (o) => o.id == this.deliverForm.warehouse
-      );
-      this.positionList = obj.kingDeeStocks;
+      this.deliverForm.position = ''
+      const obj = this.warehouseList.find(o => o.id == this.deliverForm.warehouse)
+      this.positionList = obj.kingDeeStocks
     },
 
     // 打开 直调发货
     openDeliverDialog() {
-      this.isShowDeliverDialog = true;
-      this.detailData.retailOrderItemList.forEach((item) => {
+      this.isShowDeliverDialog = true
+      this.detailData.retailOrderItemList.forEach(item => {
         if (item.isDirectTransfer) {
-          this.$set(item, "adjustNum", item.refundableQty);
+          this.$set(item, 'adjustNum', item.refundableQty)
         } else {
-          this.$set(item, "adjustNum", 0);
+          this.$set(item, 'adjustNum', 0)
         }
-      });
-      this.goodsList = this.detailData.retailOrderItemList;
+      })
+      this.goodsList = this.detailData.retailOrderItemList
 
-      this.getPositionList();
+      this.getPositionList()
     },
     // 获取虚拟仓位列表
     getPositionList() {
       getPositionList({
         pageNum: 1,
         pageSize: -1,
-        type: 2,
-      }).then((res) => {
-        this.positionList = res.data.records;
-      });
+        type: 2
+      }).then(res => {
+        this.positionList = res.data.records
+      })
     },
     // 关闭 直调发货
     closeDeliverDialog() {
-      this.isShowDeliverDialog = false;
+      this.isShowDeliverDialog = false
     },
     // 联查单据
     toCheckOrder() {
-      this.checkOrderId = this.detailData.id;
-      this.isShowCheckOrder = true;
+      this.checkOrderId = this.detailData.id
+      this.isShowCheckOrder = true
     },
     // 关闭 提前开票
     closeDirectDialog() {
-      this.isShowDirectDialog = false;
+      this.isShowDirectDialog = false
     },
     // 更改调出仓库
     changeWarehouse1() {
-      this.directForm.position1 = "";
-      const obj = this.warehouseList1.find(
-        (o) => o.id == this.directForm.warehouse1
-      );
-      this.positionList1 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse1 = obj.name;
-      });
+      this.directForm.position1 = ''
+      const obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+      this.positionList1 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse1 = obj.name
+      })
     },
 
     // 更改调入仓库
     changeWarehouse2() {
-      this.directForm.position2 = "";
-      const obj = this.warehouseList2.find(
-        (o) => o.id == this.directForm.warehouse2
-      );
-      this.positionList2 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse2 = obj.name;
-      });
+      this.directForm.position2 = ''
+      const obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+      this.positionList2 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse2 = obj.name
+      })
     },
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList1 = res.data.records;
-        this.warehouseList2 = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList1 = res.data.records
+        this.warehouseList2 = res.data.records
+      })
     },
 
     // 更改调出仓位
     changePosition1() {
-      const obj = this.positionList1.find(
-        (o) => o.id == this.directForm.position1
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position1 = obj.name;
-        item.status1 = obj.defStockStatusName;
-      });
+      const obj = this.positionList1.find(o => o.id == this.directForm.position1)
+      this.directGoodsList.forEach(item => {
+        item.position1 = obj.name
+        item.status1 = obj.defStockStatusName
+      })
     },
 
     // 更改调入仓位
     changePosition2() {
-      const obj = this.positionList2.find(
-        (o) => o.id == this.directForm.position2
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position2 = obj.name;
-        item.status2 = obj.defStockStatusName;
-      });
+      const obj = this.positionList2.find(o => o.id == this.directForm.position2)
+      this.directGoodsList.forEach(item => {
+        item.position2 = obj.name
+        item.status2 = obj.defStockStatusName
+      })
     },
     // 提交 提前开票
     submitDirectForm() {
       this.$refs.directForm.validate(valid => {
         if (valid) {
-          const warehouseItem1 = this.warehouseList1.find(
-            (o) => o.id == this.directForm.warehouse1
-          );
-          const positionItem1 = this.positionList1.find(
-            (o) => o.id == this.directForm.position1
-          );
-          const warehouseItem2 = this.warehouseList2.find(
-            (o) => o.id == this.directForm.warehouse2
-          );
-          const positionItem2 = this.positionList2.find(
-            (o) => o.id == this.directForm.position2
-          );
+          const warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+          const positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
+          const warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+          const positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
           const params = {
             orderNo: this.detailData.id,
-            orderType: "RETAIL", // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
+            orderType: 'RETAIL', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
             correspondId: this.directForm.warehouse1,
             correspondName: warehouseItem1.name,
             stockId: this.directForm.position1,
@@ -999,18 +775,18 @@ export default {
             inCorrespondId: this.directForm.warehouse2,
             inCorrespondName: warehouseItem2.name,
             inStockId: this.directForm.position2,
-            inStockName: positionItem2.name,
-          };
-          directOrder(params).then((res) => {
-            this.$successMsg();
-            this.isShowDirectDialog = false;
-            this.getDetail();
-          });
+            inStockName: positionItem2.name
+          }
+          directOrder(params).then(res => {
+            this.$successMsg()
+            this.isShowDirectDialog = false
+            this.getDetail()
+          })
         }
-      });
+      })
     },
     backDetail() {
-      this.isShowCheckOrder = false;
+      this.isShowCheckOrder = false
     },
 
     // 提交 直调发货
@@ -1018,45 +794,42 @@ export default {
       this.$refs.deliverForm.validate(valid => {
         if (valid) {
           for (let i = 0; i < this.goodsList.length; i++) {
-            if (
-              this.goodsList[i].isDirectTransfer &&
-              this.goodsList[i].adjustNum === ""
-            ) {
-              this.$errorMsg("请输入直调数量");
-              return;
+            if (this.goodsList[i].isDirectTransfer && this.goodsList[i].adjustNum === '') {
+              this.$errorMsg('请输入直调数量')
+              return
             }
           }
 
           let goodsList = this.goodsList.map(item => {
             return {
               itemId: item.id,
-              qty: item.adjustNum || 0,
-            };
-          });
+              qty: item.adjustNum || 0
+            }
+          })
           const params = {
             orderNo: this.listItem.id,
-            orderDate: this.deliverForm.date + " 00:00:00",
+            orderDate: this.deliverForm.date + ' 00:00:00',
             correspondId: this.deliverForm.position,
             remark: this.deliverForm.remark,
-            directItems: goodsList,
-          };
+            directItems: goodsList
+          }
 
-          adjustDeliver(params).then((res) => {
-            this.$successMsg();
-            this.isShowDeliverDialog = false;
-            this.getDetail();
-          });
+          adjustDeliver(params).then(res => {
+            this.$successMsg()
+            this.isShowDeliverDialog = false
+            this.getDetail()
+          })
         }
-      });
+      })
     },
     // 打开 提前开票
     openDirectDialog() {
-      this.isShowDirectDialog = true;
-      this.directGoodsList = this.detailData.retailOrderItemList;
-      this.getWarehouseList();
-    },
-  },
-};
+      this.isShowDirectDialog = true
+      this.directGoodsList = this.detailData.retailOrderItemList
+      this.getWarehouseList()
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

Plik diff jest za duży
+ 342 - 469
src/views/supply/policy/components/retail_form.vue


+ 1 - 1
src/views/supply/price/difference_price_list.vue

@@ -57,7 +57,7 @@
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="产品类别" prop="k3CategoryNumber">
-                  <el-select v-model="screenForm.k3CategoryNumber" style="width: 100%;" placeholder="请选择产品类别">
+                  <el-select v-model="screenForm.k3CategoryNumber" style="width: 100%" placeholder="请选择产品类别">
                     <el-option label="全部" value="" />
                     <el-option v-for="item in dictList" :label="item.name" :value="item.number" />
                   </el-select>

+ 1 - 1
src/views/supply/price/price_list.vue

@@ -59,7 +59,7 @@
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
                 <el-form-item label="产品类别" prop="k3CategoryNumber">
-                  <el-select v-model="screenForm.k3CategoryNumber" placeholder="请选择产品类别" style="width: 100%;">
+                  <el-select v-model="screenForm.k3CategoryNumber" placeholder="请选择产品类别" style="width: 100%">
                     <el-option label="全部" value="" />
                     <el-option v-for="item in dictList" :label="item.name" :key="item" :value="item.number" />
                   </el-select>

+ 5 - 15
src/views/supply/reserve/reserve_list.vue

@@ -107,18 +107,8 @@
               v-if="$checkBtnRole('add', $route.meta.roles)"
               >新增</el-button
             >
-            <ExportButton
-              class="ml"
-              :exUrl="'reserve/download'"
-              v-if="!isDealer "
-              exText="下载模板"
-              :exParams="{}"
-            />
-            <ImportButton
-              :imUrl="'reserve/importData'"
-              v-if=" !isDealer "
-              @importSuccess="getList"
-            />
+            <ExportButton class="ml" :exUrl="'reserve/download'" v-if="!isDealer" exText="下载模板" :exParams="{}" />
+            <ImportButton :imUrl="'reserve/importData'" v-if="!isDealer" @importSuccess="getList" />
           </div>
           <div class="fr">
             <ExportButton :exUrl="'reserve/export'" :exParams="exParams" />
@@ -407,8 +397,8 @@ export default {
       }
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   beforeCreate() {
@@ -418,7 +408,7 @@ export default {
   created() {
     this.getWarehouseList()
     this.getList()
-    console.log(this.$route.meta.roles);
+    console.log(this.$route.meta.roles)
   },
 
   methods: {

+ 152 - 327
src/views/supply/retail/components/retail_detail.vue

@@ -89,12 +89,7 @@
           show-summary
           :summary-method="$getSummaries"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column
             align="left"
             label="销售类型"
@@ -144,13 +139,7 @@
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="right"
-            label="单价"
-            prop="price"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.price | numToFixed }}
             </template>
@@ -162,13 +151,7 @@
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="right"
-            label="订单金额"
-            prop="totalAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalAmount | numToFixed }}
             </template>
@@ -180,24 +163,12 @@
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="right"
-            label="返利金额"
-            prop="payRebateAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payRebateAmount | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="格力折扣"
-            prop="totalDiscAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalDiscAmount | numToFixed }}
             </template>
@@ -209,24 +180,12 @@
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="right"
-            label="实付金额"
-            prop="payAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payAmount | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="left"
-            label="是否直调"
-            prop="isDirectTransfer"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.isDirectTransfer ? '是' : '否' }}
             </template>
@@ -293,20 +252,14 @@
           <el-button
             type="primary"
             @click="openDeliverDialog"
-            :disabled="
-              detailData.examineStatus !== 'OK' ||
-              detailData.directTransferStatus === true
-            "
+            :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus === true"
             v-if="!isDealer"
             >直调发货</el-button
           >
           <el-button
             type="primary"
             @click="handleFinish"
-            :disabled="
-              detailData.examineStatus !== 'OK' ||
-              detailData.directTransferStatus
-            "
+            :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus"
             v-if="!isDealer"
             >直调完成</el-button
           >
@@ -340,28 +293,14 @@
           <!--          </el-col>-->
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="选择仓位" prop="position">
-              <el-select
-                v-model="deliverForm.position"
-                placeholder="请选择仓位"
-                style="width: 100%"
-                filterable
-              >
-                <el-option
-                  v-for="item in positionList"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+              <el-select v-model="deliverForm.position" placeholder="请选择仓位" style="width: 100%" filterable>
+                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="发货申请备注" prop="remark">
-              <el-input
-                v-model="deliverForm.remark"
-                placeholder="请输入发货申请备注"
-                clearable
-              ></el-input>
+              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -377,12 +316,7 @@
           stripe
           max-height="400"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column
             align="center"
             label="销售类型"
@@ -441,65 +375,33 @@
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="right"
-            label="直调数量"
-            prop="adjustNum"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="直调数量" prop="adjustNum" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.adjustNum"
                 size="small"
                 type="number"
                 @mousewheel.native.prevent
-                :disabled="
-                  !scope.row.isDirectTransfer || scope.row.adjustNum === 0
-                "
+                :disabled="!scope.row.isDirectTransfer || scope.row.adjustNum === 0"
               ></el-input>
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="单价"
-            prop="price"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.price | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="金额"
-            prop="totalAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalAmount | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="返利"
-            prop="payRebateAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="返利" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payRebateAmount | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="实付金额"
-            prop="payAmount"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payAmount | numToFixed }}
             </template>
@@ -519,11 +421,7 @@
       </span>
     </el-dialog>
 
-    <el-dialog
-      title="直接调拨单(提前开票)"
-      :visible.sync="isShowDirectDialog"
-      width="80%"
-    >
+    <el-dialog title="直接调拨单(提前开票)" :visible.sync="isShowDirectDialog" width="80%">
       <el-form
         ref="directForm"
         :model="directForm"
@@ -560,12 +458,7 @@
                 filterable
                 @change="changePosition1"
               >
-                <el-option
-                  v-for="item in positionList1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -596,12 +489,7 @@
                 filterable
                 @change="changePosition2"
               >
-                <el-option
-                  v-for="item in positionList2"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -618,12 +506,7 @@
           stripe
           max-height="400"
         >
-          <el-table-column
-            align="center"
-            label="序号"
-            type="index"
-            width="50"
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column
             align="center"
             label="销售类型"
@@ -715,20 +598,10 @@
             min-width="110"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调出货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="center" label="调出货主" min-width="100" show-overflow-tooltip>
             <template slot-scope="">弘格</template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            label="调入货主"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="center" label="调入货主" min-width="100" show-overflow-tooltip>
             <template slot-="scope">弘格</template>
           </el-table-column>
           <el-table-column
@@ -746,11 +619,7 @@
       </span>
     </el-dialog>
 
-    <CheckOrder
-      :checkOrderId="checkOrderId"
-      v-if="isShowCheckOrder"
-      @backDetail="backDetail"
-    />
+    <CheckOrder :checkOrderId="checkOrderId" v-if="isShowCheckOrder" @backDetail="backDetail" />
   </div>
 </template>
 
@@ -761,28 +630,28 @@ import {
   adjustDeliver,
   finishData,
   directOrder,
-  getPositionList,
-} from "@/api/supply/retail";
-import CheckOrder from "@/components/Common/check-order";
+  getPositionList
+} from '@/api/supply/retail'
+import CheckOrder from '@/components/Common/check-order'
 
 export default {
-  name: "RetailDetail",
-  componentName: "RetailDetail",
+  name: 'RetailDetail',
+  componentName: 'RetailDetail',
   components: {
     CheckOrder
   },
-  props: ["listItem"],
+  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: "已保存", value: "SAVE" },
-        { label: "待审核", value: "WAIT" },
-        { label: "审核通过", value: "OK" },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' }
         // { label: '审核驳回', value: 'FAIL' },,
-      ];
-      let obj = statusList.find((o) => o.value == val);
-      return obj ? obj.label : "";
-    },
+      ]
+      let obj = statusList.find(o => o.value == val)
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
@@ -790,17 +659,15 @@ export default {
 
       isShowDeliverDialog: false,
       deliverForm: {
-        date: "",
-        position: "",
-        remark: "",
+        date: '',
+        position: '',
+        remark: ''
       },
       deliverFormRules: {
         // date: [
         //   { required: true, message: "请选择发货日期", trigger: "change" },
         // ],
-        position: [
-          { required: true, message: "请选择虚拟仓位", trigger: "change" },
-        ],
+        position: [{ required: true, message: '请选择虚拟仓位', trigger: 'change' }]
       },
       positionList: [],
 
@@ -808,24 +675,16 @@ export default {
 
       isShowDirectDialog: false,
       directForm: {
-        warehouse1: "",
-        position1: "",
-        warehouse2: "",
-        position2: "",
+        warehouse1: '',
+        position1: '',
+        warehouse2: '',
+        position2: ''
       },
       directFormRules: {
-        warehouse1: [
-          { required: true, message: "请选择调出仓库", trigger: "change" },
-        ],
-        position1: [
-          { required: true, message: "请选择调出仓位", trigger: "change" },
-        ],
-        warehouse2: [
-          { required: true, message: "请选择调入仓库", trigger: "change" },
-        ],
-        position2: [
-          { required: true, message: "请选择调入仓位", trigger: "change" },
-        ],
+        warehouse1: [{ required: true, message: '请选择调出仓库', trigger: 'change' }],
+        position1: [{ required: true, message: '请选择调出仓位', trigger: 'change' }],
+        warehouse2: [{ required: true, message: '请选择调入仓库', trigger: 'change' }],
+        position2: [{ required: true, message: '请选择调入仓位', trigger: 'change' }]
       },
       warehouseList1: [],
       warehouseList2: [],
@@ -834,39 +693,36 @@ export default {
       directGoodsList: [],
 
       checkOrderId: {},
-      isShowCheckOrder: false,
-    };
+      isShowCheckOrder: false
+    }
   },
 
   computed: {
     isExamine() {
-      return (
-        this.detailData.examineStatus === "OK" ||
-        this.detailData.examineStatus === "FAIL"
-      );
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
     },
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   created() {
-    this.getDetail();
-    this.deliverForm.date = this.getDate();
+    this.getDetail()
+    this.deliverForm.date = this.getDate()
   },
 
   methods: {
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.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;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
       var currentdate = year + seperator1 + month + seperator1 + strDate
       return currentdate
@@ -874,43 +730,31 @@ export default {
 
     // 返回列表
     goBack() {
-      this.$emit("backListFormDetail");
+      this.$emit('backListFormDetail')
     },
 
     // 获取详情
     getDetail() {
-      getDetail({ id: this.listItem.id }).then((res) => {
+      getDetail({ id: this.listItem.id }).then(res => {
         if (res.data.retailOrderItemList) {
-          res.data.retailOrderItemList.forEach((item) => {
-            item.sums1 = [
-              "directTransferQty",
-              "qty",
-              "refundableQty",
-              "oldQty",
-            ];
-            item.sums2 = [
-              "totalAmount",
-              "payAmount",
-              "price",
-              "payRebateAmount",
-              "discAmount",
-              "totalDiscAmount",
-            ];
-          });
+          res.data.retailOrderItemList.forEach(item => {
+            item.sums1 = ['directTransferQty', 'qty', 'refundableQty', 'oldQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount', 'totalDiscAmount']
+          })
         }
-        this.detailData = res.data;
-      });
+        this.detailData = res.data
+      })
     },
 
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
-        pageSize: -1,
-      }).then((res) => {
-        this.warehouseList1 = res.data.records;
-        this.warehouseList2 = res.data.records;
-      });
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList1 = res.data.records
+        this.warehouseList2 = res.data.records
+      })
     },
 
     // 获取虚拟仓位列表
@@ -918,24 +762,24 @@ export default {
       getPositionList({
         pageNum: 1,
         pageSize: -1,
-        type: 2,
-      }).then((res) => {
-        this.positionList = res.data.records;
-      });
+        type: 2
+      }).then(res => {
+        this.positionList = res.data.records
+      })
     },
 
     // 打开 直调发货
     openDeliverDialog() {
-      this.isShowDeliverDialog = true;
-      this.detailData.retailOrderItemList.forEach((item) => {
+      this.isShowDeliverDialog = true
+      this.detailData.retailOrderItemList.forEach(item => {
         if (item.isDirectTransfer) {
           //  this.$set(item,'adjustNum',item.refundableQty || item.qty)
-          this.$set(item, "adjustNum", item.qty - item.directTransferQty);
+          this.$set(item, 'adjustNum', item.qty - item.directTransferQty)
         } else {
-          this.$set(item, "adjustNum", 0);
+          this.$set(item, 'adjustNum', 0)
         }
-      });
-      this.goodsList = this.detailData.retailOrderItemList;
+      })
+      this.goodsList = this.detailData.retailOrderItemList
 
       this.getPositionList()
     },
@@ -950,98 +794,87 @@ export default {
       this.$refs.deliverForm.validate(valid => {
         if (valid) {
           for (let i = 0; i < this.goodsList.length; i++) {
-            if (
-              this.goodsList[i].adjustNum === "" &&
-              this.goodsList[i].isDirectTransfer
-            ) {
-              this.$errorMsg("请输入直调数量");
-              return;
+            if (this.goodsList[i].adjustNum === '' && this.goodsList[i].isDirectTransfer) {
+              this.$errorMsg('请输入直调数量')
+              return
             }
           }
           let goodsList = this.goodsList.map(item => {
             return {
               itemId: item.id,
-              qty: item.adjustNum || 0,
-            };
-          });
+              qty: item.adjustNum || 0
+            }
+          })
           let params = {
             orderNo: this.listItem.id,
-            orderDate: this.deliverForm.date + " 00:00:00",
+            orderDate: this.deliverForm.date + ' 00:00:00',
             remark: this.deliverForm.remark,
             correspondId: this.deliverForm.position,
-            directItems: goodsList,
-          };
-          adjustDeliver(params).then((res) => {
-            this.$successMsg();
-            this.isShowDeliverDialog = false;
-            this.getDetail();
-          });
+            directItems: goodsList
+          }
+          adjustDeliver(params).then(res => {
+            this.$successMsg()
+            this.isShowDeliverDialog = false
+            this.getDetail()
+          })
         }
-      });
+      })
     },
 
     // 直调完成
     handleFinish() {
-      this.$confirm("此操作将直调完成, 是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('此操作将直调完成, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           finishData({
-            id: this.listItem.id,
-          }).then((res) => {
-            this.$successMsg();
-            this.getDetail();
-          });
+            id: this.listItem.id
+          }).then(res => {
+            this.$successMsg()
+            this.getDetail()
+          })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
 
     // 更改调出仓库
     changeWarehouse1() {
-      this.directForm.position1 = "";
-      let obj = this.warehouseList1.find(
-        (o) => o.id == this.directForm.warehouse1
-      );
-      this.positionList1 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse1 = obj.name;
-      });
+      this.directForm.position1 = ''
+      let obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+      this.positionList1 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse1 = obj.name
+      })
     },
 
     // 更改调入仓库
     changeWarehouse2() {
-      this.directForm.position2 = "";
-      let obj = this.warehouseList2.find(
-        (o) => o.id == this.directForm.warehouse2
-      );
-      this.positionList2 = obj.kingDeeStocks;
-      this.directGoodsList.forEach((item) => {
-        item.warehouse2 = obj.name;
-      });
+      this.directForm.position2 = ''
+      let obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+      this.positionList2 = obj.kingDeeStocks
+      this.directGoodsList.forEach(item => {
+        item.warehouse2 = obj.name
+      })
     },
 
     // 更改调出仓位
     changePosition1() {
-      let obj = this.positionList1.find(
-        (o) => o.id == this.directForm.position1
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position1 = obj.name;
-        item.status1 = obj.defStockStatusName;
-      });
+      let obj = this.positionList1.find(o => o.id == this.directForm.position1)
+      this.directGoodsList.forEach(item => {
+        item.position1 = obj.name
+        item.status1 = obj.defStockStatusName
+      })
     },
 
     // 更改调入仓位
     changePosition2() {
-      let obj = this.positionList2.find(
-        (o) => o.id == this.directForm.position2
-      );
-      this.directGoodsList.forEach((item) => {
-        item.position2 = obj.name;
-        item.status2 = obj.defStockStatusName;
-      });
+      let obj = this.positionList2.find(o => o.id == this.directForm.position2)
+      this.directGoodsList.forEach(item => {
+        item.position2 = obj.name
+        item.status2 = obj.defStockStatusName
+      })
     },
 
     // 打开 提前开票
@@ -1060,21 +893,13 @@ export default {
     submitDirectForm() {
       this.$refs.directForm.validate(valid => {
         if (valid) {
-          let warehouseItem1 = this.warehouseList1.find(
-            (o) => o.id == this.directForm.warehouse1
-          );
-          let positionItem1 = this.positionList1.find(
-            (o) => o.id == this.directForm.position1
-          );
-          let warehouseItem2 = this.warehouseList2.find(
-            (o) => o.id == this.directForm.warehouse2
-          );
-          let positionItem2 = this.positionList2.find(
-            (o) => o.id == this.directForm.position2
-          );
+          let warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+          let positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
+          let warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+          let positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
           let params = {
             orderNo: this.detailData.id,
-            orderType: "RETAIL", // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
+            orderType: 'RETAIL', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
             correspondId: this.directForm.warehouse1,
             correspondName: warehouseItem1.name,
             stockId: this.directForm.position1,
@@ -1082,15 +907,15 @@ export default {
             inCorrespondId: this.directForm.warehouse2,
             inCorrespondName: warehouseItem2.name,
             inStockId: this.directForm.position2,
-            inStockName: positionItem2.name,
-          };
-          directOrder(params).then((res) => {
-            this.$successMsg();
-            this.isShowDirectDialog = false;
-            this.getDetail();
-          });
+            inStockName: positionItem2.name
+          }
+          directOrder(params).then(res => {
+            this.$successMsg()
+            this.isShowDirectDialog = false
+            this.getDetail()
+          })
         }
-      });
+      })
     },
 
     // 联查单据
@@ -1100,10 +925,10 @@ export default {
     },
 
     backDetail() {
-      this.isShowCheckOrder = false;
-    },
-  },
-};
+      this.isShowCheckOrder = false
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików