Bladeren bron

Merge branch 'feature/Feature-sales' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-sales

howie 3 jaren geleden
bovenliggende
commit
d412448415
35 gewijzigde bestanden met toevoegingen van 1223 en 479 verwijderingen
  1. 9 1
      src/api/dashboard.js
  2. 9 0
      src/api/policy_list.js
  3. 29 2
      src/api/supply/pickup.js
  4. 2 1
      src/store/getters.js
  5. 136 109
      src/store/modules/user.js
  6. 251 10
      src/views/dashboard/index.vue
  7. 23 1
      src/views/finance/components/receivable_list-add.vue
  8. 46 7
      src/views/finance/rebate_list.vue
  9. 10 2
      src/views/finance/wallet.vue
  10. 119 84
      src/views/login/index.vue
  11. 12 5
      src/views/pset/login_setting.vue
  12. 2 2
      src/views/supply/deliver/commerce_list.vue
  13. 2 2
      src/views/supply/deliver/home_list.vue
  14. 4 4
      src/views/supply/engin/components/commerce_detail.vue
  15. 3 3
      src/views/supply/engin/components/commerce_examine.vue
  16. 11 11
      src/views/supply/engin/components/commerce_form.vue
  17. 3 3
      src/views/supply/engin/components/commerce_return.vue
  18. 13 1
      src/views/supply/engin/components/engin_detail.vue
  19. 13 1
      src/views/supply/engin/components/engin_examine.vue
  20. 29 5
      src/views/supply/engin/components/engin_form.vue
  21. 4 4
      src/views/supply/engin/components/home_detail.vue
  22. 3 3
      src/views/supply/engin/components/home_examine.vue
  23. 11 11
      src/views/supply/engin/components/home_form.vue
  24. 3 3
      src/views/supply/engin/components/home_return.vue
  25. 1 1
      src/views/supply/engin/engin_list.vue
  26. 151 110
      src/views/supply/pickup/check.vue
  27. 47 18
      src/views/supply/pickup/components/pickup_form.vue
  28. 152 0
      src/views/supply/pickup/components/pickup_print.vue
  29. 9 4
      src/views/supply/pickup/pickup_list.vue
  30. 34 17
      src/views/supply/pickup/statistics.vue
  31. 3 3
      src/views/supply/retail/components/retail_detail.vue
  32. 2 2
      src/views/supply/retail/components/retail_form.vue
  33. 8 7
      src/views/supply/sales/components/sales_detail.vue
  34. 56 30
      src/views/supply/sales/components/sales_examine.vue
  35. 13 12
      src/views/supply/sales/sales_list.vue

+ 9 - 1
src/api/dashboard.js

@@ -1,2 +1,10 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
+// 获取消息列表
+export function getNoticeList(params) {
+  return request({
+    url: "/notice/list",
+    method: "get",
+    params,
+  });
+}

+ 9 - 0
src/api/policy_list.js

@@ -326,3 +326,12 @@ export function addCompany(params) {
     data: params
   })
 }
+
+//获取公司数据
+export function getCompanyList(params) {
+  return request({
+    url: '/record/company/list',
+    method: 'get',
+    params
+  })
+}

+ 29 - 2
src/api/supply/pickup.js

@@ -12,7 +12,7 @@ export function getPickupList(params) {
 // 获取详情
 export function getDetail(params) {
   return request({
-    url: '/retreat/detail',
+    url: '/pick/detail',
     method: 'get',
     params
   })
@@ -63,7 +63,7 @@ export function getCompanyList(params) {
   })
 }
 
-// 提交提货预约
+// 新增提货预约
 export function addPickupBook(params) {
   return request({
     url: '/pick/add',
@@ -72,6 +72,15 @@ export function addPickupBook(params) {
   })
 }
 
+// 编辑提货预约
+export function editPickupBook(params) {
+  return request({
+    url: '/pick/update',
+    method: 'post',
+    data: params
+  })
+}
+
 // 获取短信验证码
 export function getCode(params) {
   return request({
@@ -88,4 +97,22 @@ export function getPickupManInfo(params) {
     method: 'post',
     params
   })
+}
+
+// 增加打印次数
+export function addPrint(params) {
+  return request({
+    url: '/pick/printAdd',
+    method: 'post',
+    params
+  })
+}
+
+// 获取汇总
+export function getStatistics(params) {
+  return request({
+    url: '/pick/summary',
+    method: 'get',
+    params
+  })
 }

+ 2 - 1
src/store/getters.js

@@ -9,6 +9,7 @@ const getters = {
   name: state => state.user.name,
   menus: state => state.user.menus,
   customerId: state => state.user.customerId,
-  customerName: state => state.user.customerName
+  customerName: state => state.user.customerName,
+  showMessages: state => state.user.showMessages
 }
 export default getters

+ 136 - 109
src/store/modules/user.js

@@ -1,82 +1,105 @@
-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: '', // 用户手机
+    name: "", // 用户名称
+    phone: "", // 用户手机
     menus: "", // 菜单
-    customerId:'',//经销商ID
-    customerName:''//经销商名称
-  }
-}
+    customerId: "", //经销商ID
+    customerName: "", //经销商名称
+    showMessages: null, //
+  };
+};
 
-const state = getDefaultState()
+const state = getDefaultState();
 
 const mutations = {
   RESET_STATE: (state) => {
-    Object.assign(state, getDefaultState())
+    Object.assign(state, getDefaultState());
   },
   SET_USERID: (state, userid) => {
-    state.userid = userid
+    state.userid = userid;
   },
   SET_TOKEN: (state, token) => {
-    state.token = token
+    state.token = token;
   },
   SET_NAME: (state, name) => {
-    state.name = name
+    state.name = name;
   },
   SET_PHONE: (state, phone) => {
-    state.phone = phone
+    state.phone = phone;
   },
   SET_MENUS: (state, menus) => {
-    state.menus = menus
+    state.menus = menus;
   },
   SET_CUSTOMERID: (state, customerId) => {
-    state.customerId = customerId
+    state.customerId = customerId;
   },
   SET_CUSTOMERNAME: (state, customerName) => {
-    state.customerName = customerName
-  }
-}
+    state.customerName = customerName;
+  },
+  showMessage: (state, value) => {
+    if (value == "yes") {
+      state.showMessages = true;
+    } else {
+      state.showMessages = false;
+    }
+  },
+};
 
 const actions = {
   // user login
   login({ commit }, userInfo) {
-    const { username, password, code, codeValue } = userInfo
+    const { username, password, code, codeValue } = userInfo;
     return new Promise((resolve, reject) => {
-      login({ userName: username.trim(), password: password, code: code, codeValue: codeValue }).then(response => {
-        const { data } = response
-        commit('SET_TOKEN', data.token)
-        commit('SET_USERID', data.adminUserId)
-        setToken(data.token)
-        setUserid(data.adminUserId)
-        resolve()
-      }).catch(error => {
-        reject(error)
+      login({
+        userName: username.trim(),
+        password: password,
+        code: code,
+        codeValue: codeValue,
       })
-    })
+        .then((response) => {
+          const { data } = response;
+          commit("SET_TOKEN", data.token);
+          commit("SET_USERID", data.adminUserId);
+          setToken(data.token);
+          setUserid(data.adminUserId);
+          resolve();
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
   },
 
   // get user info
   getInfo({ commit, state }) {
     return new Promise((resolve, reject) => {
       console.log(state);
-      getInfo(state.userid).then(response => {
-        const { data } = response
-        console.log(1111111,data);
+      getInfo(state.userid)
+        .then((response) => {
+          const { data } = response;
+          console.log(1111111, data);
 
-        if (!data) {
-          return reject('Verification failed, please Login again.')
-        }
-        console.log(data);
-        const { nickName, userName ,customerId,customerName} = data
-        
-        // 模拟请求数据
-        // const menus = [
+          if (!data) {
+            return reject("Verification failed, please Login again.");
+          }
+          console.log(data);
+          const { nickName, userName, customerId, customerName } = data;
+
+          // 模拟请求数据
+          // const menus = [
           // {
           //   'path': '/example',
           //   'component': 'Layout',
@@ -98,90 +121,94 @@ const actions = {
           //     }
           //   ]
           // },
-        // ]
-        // menus.push({ path: '*', redirect: '/404', hidden: true })
-        commit('SET_CUSTOMERID',customerId)
-        commit('SET_CUSTOMERNAME',customerName)
-        commit('SET_NAME', nickName)
-        commit('SET_PHONE', userName)
-        // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex
+          // ]
+          // menus.push({ path: '*', redirect: '/404', hidden: true })
+          commit("SET_CUSTOMERID", customerId);
+          commit("SET_CUSTOMERNAME", customerName);
+          commit("SET_NAME", nickName);
+          commit("SET_PHONE", userName);
+          // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex
 
-        localStorage.setItem("supply_user", JSON.stringify(data));
+          localStorage.setItem("supply_user", JSON.stringify(data));
 
-        resolve(data)
-      }).catch(error => {
-        reject(error)
-      })
-    })
+          resolve(data);
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
   },
 
   getRouter({ commit, state }) {
     return new Promise((resolve, reject) => {
-      getRouter({adminUserId: state.userid}).then(response => {
-        const menus = response.data;
-        // 模拟请求数据
-        // const menus = [
-        //   {
-        //     'path': '/example',
-        //     'component': 'Layout',
-        //     'redirect': '/example/table',
-        //     'name': 'Example',
-        //     'meta': { 'title': 'Example', 'icon': 'el-icon-s-help' },
-        //     'children': [
-        //       {
-        //         'path': 'table',
-        //         'name': 'Table',
-        //         'component': 'table/index',
-        //         'meta': { 'title': 'Table', 'icon': 'table' }
-        //       },
-        //       {
-        //         'path': 'tree',
-        //         'name': 'Tree',
-        //         'component': 'tree/index',
-        //         'meta': { 'title': 'Tree', 'icon': 'tree' }
-        //       }
-        //     ]
-        //   },
-        // ]
-        // menus.push({ path: '*', redirect: '/404', hidden: true })
-        commit("SET_MENUS", menus)
-        resolve()
-      }).catch(error => {
-        reject(error)
-      })
-    })
+      getRouter({ adminUserId: state.userid })
+        .then((response) => {
+          const menus = response.data;
+          // 模拟请求数据
+          // const menus = [
+          //   {
+          //     'path': '/example',
+          //     'component': 'Layout',
+          //     'redirect': '/example/table',
+          //     'name': 'Example',
+          //     'meta': { 'title': 'Example', 'icon': 'el-icon-s-help' },
+          //     'children': [
+          //       {
+          //         'path': 'table',
+          //         'name': 'Table',
+          //         'component': 'table/index',
+          //         'meta': { 'title': 'Table', 'icon': 'table' }
+          //       },
+          //       {
+          //         'path': 'tree',
+          //         'name': 'Tree',
+          //         'component': 'tree/index',
+          //         'meta': { 'title': 'Tree', 'icon': 'tree' }
+          //       }
+          //     ]
+          //   },
+          // ]
+          // menus.push({ path: '*', redirect: '/404', hidden: true })
+          commit("SET_MENUS", menus);
+          resolve();
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
   },
 
   // user logout
   logout({ commit, state }) {
     return new Promise((resolve, reject) => {
-      logout(state.token).then(() => {
-        removeToken() // must remove  token  first
-        removeUserid()
-        resetRouter()
-        commit('RESET_STATE')
-        resolve()
-      }).catch(error => {
-        reject(error)
-      })
-    })
+      logout(state.token)
+        .then(() => {
+          removeToken(); // must remove  token  first
+          removeUserid();
+          resetRouter();
+          commit("RESET_STATE");
+          resolve();
+        })
+        .catch((error) => {
+          reject(error);
+        });
+    });
   },
 
   // remove token
   resetToken({ commit }) {
-    return new Promise(resolve => {
-      removeToken() // must remove  token  first
-      removeUserid()
-      commit('RESET_STATE')
-      resolve()
-    })
-  }
-}
+    return new Promise((resolve) => {
+      removeToken(); // must remove  token  first
+      removeUserid();
+      commit("RESET_STATE");
+      resolve();
+    });
+  },
+};
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
-
+  actions,
+};

+ 251 - 10
src/views/dashboard/index.vue

@@ -1,30 +1,271 @@
 <template>
   <div class="dashboard-container">
-
     <el-row :gutter="10" class="top-container">
       <el-col :xs="24" :sm="12" :lg="12">
         <div class="today-content">欢迎登入供应链管理系统</div>
       </el-col>
     </el-row>
+
+    <!-- 弹窗 -->
+    <el-dialog
+      title="消息"
+      :visible.sync="showMessages"
+      width="50%"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <el-radio-group v-model="type" @change="checkFn" size="">
+        <el-radio-button label="1">系统通知</el-radio-button>
+        <el-radio-button label="2">文件下发</el-radio-button>
+        <el-radio-button label="3">返利确认单</el-radio-button>
+      </el-radio-group>
+      <br />
+      <br />
+      <!-- 系统通知 -->
+      <div v-show="type == '1'">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            type="index"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="标题"
+            prop="title"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="来源"
+            prop="source"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="时间"
+            prop="issueTime"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="">
+              <el-button type="text" class="textColor">查看</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!-- 文件下发 -->
+      <div v-show="type == '2'">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            type="index"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="标题"
+            prop="title"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="来源"
+            prop="source"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="时间"
+            prop="issueTime"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="">
+              <el-button type="text" class="textColor">下载</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!-- 返利确认单 -->
+      <div v-show="type == '3'">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            type="index"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认人"
+            prop="customerName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认时间"
+            prop="customerName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="">
+              <el-button type="text" class="textColor">复核</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <br />
+      <br />
+      <!-- 分页 -->
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+        >
+        </el-pagination>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="closeFn">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import { getInfo, getOrder, getGoodsRank  } from '@/api/dashboard'
-import { dateFormat } from '@/utils/util'
+import { getNoticeList } from "@/api/dashboard";
+import { mapGetters } from "vuex";
+import { getInfo, getOrder, getGoodsRank } from "@/api/dashboard";
+import { dateFormat } from "@/utils/util";
 
 export default {
-  name: 'Dashboard',
+  name: "Dashboard",
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      type: this.type,
+    });
+  },
+  computed: {
+    ...mapGetters(["showMessages"]),
+  },
   data() {
     return {
-
-    }
-  }
-}
+      type: "1",
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [],
+      listLoading: false, // 列表加载loading
+    };
+  },
+  methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: this.type,
+      });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: this.type,
+      });
+    },
+    //获取列表数据
+    async getDataList(data) {
+      const res = await getNoticeList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+    //选择
+    checkFn(v) {
+      this.type = v;
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: this.type,
+      });
+    },
+    //关闭
+    closeFn() {
+      this.$store.commit("user/showMessage", "no");
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-
 .dashboard {
   &-container {
     background: #f5f5f5;

+ 23 - 1
src/views/finance/components/receivable_list-add.vue

@@ -325,6 +325,25 @@ export default {
 
     //新增
     async addFn() {
+      let aaa = this.dataList.map((v) => {
+        if (v.afterTaxAmount == "") {
+          this.$message.error("请输入不含税金额");
+          return 1;
+        }
+        if (v.tax == "") {
+          this.$message.error("请输入税额");
+          return 1;
+        }
+        if (v.totalAmount == "") {
+          this.$message.error("请输入总金额");
+          return 1;
+        }
+      });
+
+      let bbb = aaa.indexOf(1);
+      if (bbb != -1) {
+        return;
+      }
       this.dataList.forEach((v) => {
         let res = this.customerList.filter((i) => i.id == v.customerId);
         console.log(res);
@@ -334,7 +353,7 @@ export default {
         v.customerWalletId = res2[0].customerWalletId;
         v.walletId = res2[0].walletRebateId;
       });
-      console.log(this.dataList);
+
       await getFinanceOtherReceAdd({
         items: this.dataList,
         ...this.searchForm,
@@ -387,4 +406,7 @@ export default {
 .selectStyle {
   width: 100%;
 }
+.mar {
+  margin-top: 20px;
+}
 </style>

+ 46 - 7
src/views/finance/rebate_list.vue

@@ -90,6 +90,7 @@
               prop="examineStatus"
               min-width="160"
               show-overflow-tooltip
+              v-if="!isCustomer"
             >
               <template slot-scope="scope">
                 <el-tag v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
@@ -128,6 +129,15 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="isCustomer"
+              align="center"
+              label="标题备注"
+              prop="policyDocNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="经销商编码"
               prop="customerNumber"
@@ -135,6 +145,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="经销商名称"
               prop="customerName"
@@ -151,21 +162,22 @@
             <el-table-column
               align="center"
               label="总返利金额"
-              prop=""
+              prop="amount"
               min-width="160"
               show-overflow-tooltip
             >
-              <template slot-scope="scope">
-                {{ Math.abs(scope.row.amount) + scope.row.withholdAmount }}
-              </template>
             </el-table-column>
             <el-table-column
               align="center"
               label="返利金额"
-              prop="amount"
+              prop=""
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.withholdAmount != 0 ? 0 : 0 }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="暂扣返利"
@@ -181,6 +193,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="折让编号"
               prop="allowanceCode"
@@ -188,6 +201,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="折让账号"
               prop="allowanceAccount"
@@ -195,6 +209,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="已办理折让金额"
               prop="handledAllowanceAmount"
@@ -202,6 +217,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="折让对应收款单号"
               prop="allowanceOrderNo"
@@ -209,6 +225,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="政策文件流水号"
               prop="policyFileNo"
@@ -216,6 +233,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="政策文号"
               prop="policyDocNo"
@@ -223,6 +241,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="政策年份"
               prop="policyYear"
@@ -230,6 +249,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="政策月份"
               prop="policyMonth"
@@ -237,6 +257,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="政策归属部门"
               prop="policyOrg"
@@ -245,12 +266,14 @@
             ></el-table-column>
             <el-table-column
               align="center"
+              v-if="!isCustomer"
               label="客户区域"
               prop="customerArea"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="客户属性"
               prop="customerAttr"
@@ -259,12 +282,14 @@
             ></el-table-column>
             <el-table-column
               align="center"
+              v-if="!isCustomer"
               label="奖励实际归属客户"
               prop="rewardActualCustomers"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="备注1"
               prop="remark1"
@@ -272,6 +297,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="备注2"
               prop="remark2"
@@ -279,6 +305,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="制单人"
               prop="createBy"
@@ -286,6 +313,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="制单时间"
               prop="createTime"
@@ -293,6 +321,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="审核人"
               prop="examineBy"
@@ -300,6 +329,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="审核时间"
               prop="examineTime"
@@ -307,6 +337,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="确认人"
               prop="customerName"
@@ -314,6 +345,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="确认时间"
               prop="customerConfirmTime"
@@ -321,6 +353,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="复核人"
               prop="secondExamineBy"
@@ -328,6 +361,7 @@
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
+              v-if="!isCustomer"
               align="center"
               label="复核时间"
               prop="secondExamineTime"
@@ -345,6 +379,7 @@
                 <el-button
                   type="text"
                   class="textColor"
+                  v-if="!isCustomer"
                   @click="editFn(scope.row.rebateOrderId)"
                   >编辑</el-button
                 >
@@ -396,7 +431,11 @@
                 <el-button
                   type="text"
                   class="textColor"
-                  v-if="isCustomer && scope.row.examineStatus == 'OK_ONE'"
+                  v-if="
+                    isCustomer &&
+                    scope.row.examineStatus == 'OK_ONE' &&
+                    scope.row.withholdAmount == 0
+                  "
                   @click="confirmFn(scope.row.rebateOrderId)"
                   >确认</el-button
                 >

+ 10 - 2
src/views/finance/wallet.vue

@@ -1,5 +1,9 @@
-<template >
+<template>
   <div class="app-container">
+    <div class="sty" v-show="this.$route.query.id">
+      <el-page-header @back="goBack"> </el-page-header>
+    </div>
+
     <el-row>
       <el-col :xs="24" :sm="12" :lg="12">
         <div class="styl">现金钱包</div>
@@ -226,6 +230,10 @@ export default {
     ...mapGetters(["customerId"]),
   },
   methods: {
+    //返回
+    goBack() {
+      this.$router.push("/finance/balance_sum");
+    },
     //取消
     async cancelFn() {
       this.dialogForm = false;
@@ -281,4 +289,4 @@ export default {
 .styl {
   padding-top: 14px;
 }
-</style>
+</style>

+ 119 - 84
src/views/login/index.vue

@@ -1,21 +1,26 @@
 <template>
   <div class="login-container">
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
-
+    <el-form
+      ref="loginForm"
+      :model="loginForm"
+      :rules="loginRules"
+      class="login-form"
+      auto-complete="on"
+      label-position="left"
+    >
       <!-- <div class="title-container">
         <img src="@/assets/login/title.png" alt="">
       </div> -->
       <div class="image-container">
-        <img src="@/assets/login/image.png" alt="">
+        <img src="@/assets/login/image.png" alt="" />
       </div>
       <div class="right-container">
         <div class="empty-height" />
         <div class="form-container">
-
           <div class="title">供应链管理系统</div>
-<!--      <div class="logo">-->
-<!--        <img src="@/assets/login/logo.png" alt="">-->
-<!--      </div>-->
+          <!--      <div class="logo">-->
+          <!--        <img src="@/assets/login/logo.png" alt="">-->
+          <!--      </div>-->
 
           <el-form-item prop="username">
             <span class="svg-container">
@@ -48,7 +53,9 @@
               @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>
 
@@ -66,13 +73,20 @@
               auto-complete="off"
               @keyup.enter.native="handleLogin"
             />
-            <div class="code" @click="getCode"><img :src="'data:image/jpeg;base64,' + codeImage" alt=""></div>
+            <div class="code" @click="getCode">
+              <img :src="'data:image/jpeg;base64,' + codeImage" alt="" />
+            </div>
           </el-form-item>
 
           <el-checkbox v-model="isRemenberPw">记住密码</el-checkbox>
 
           <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>
       </div>
@@ -81,69 +95,75 @@
 </template>
 
 <script>
-import { validUsername } from '@/utils/validate'
-import Cookies from 'js-cookie'
-import { getCode } from '@/api/user'
+import { validUsername } from "@/utils/validate";
+import Cookies from "js-cookie";
+import { getCode } from "@/api/user";
 
 export default {
-  name: 'Login',
+  name: "Login",
   data() {
     const validateUsername = (rule, value, callback) => {
       if (value.length <= 0) {
-        callback(new Error('请输入用户名'))
+        callback(new Error("请输入用户名"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     const validatePassword = (rule, value, callback) => {
       if (value.length <= 0) {
-        callback(new Error('请输入密码'))
+        callback(new Error("请输入密码"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     const validateCode = (rule, value, callback) => {
       if (value.length <= 0) {
-        callback(new Error('请输入验证码'))
+        callback(new Error("请输入验证码"));
       } else {
-        callback()
+        callback();
       }
-    }
+    };
     return {
       loginForm: {
-        username: '',
-        password: '',
-        code: '',
-        codeValue: ''
+        username: "",
+        password: "",
+        code: "",
+        codeValue: "",
       },
       loginRules: {
-        username: [{ required: true, trigger: 'change', validator: validateUsername }],
-        password: [{ required: true, trigger: 'change', validator: validatePassword }],
-        codeValue: [{ required: true, trigger: 'change', validator: validateCode }],
+        username: [
+          { required: true, trigger: "change", validator: validateUsername },
+        ],
+        password: [
+          { required: true, trigger: "change", validator: validatePassword },
+        ],
+        codeValue: [
+          { required: true, trigger: "change", validator: validateCode },
+        ],
       },
       loading: false,
-      passwordType: 'password',
+      passwordType: "password",
       redirect: undefined,
       isRemenberPw: false,
-      codeImage: '',
-    }
+      codeImage: "",
+    };
   },
   watch: {
     $route: {
-      handler: function(route) {
-        this.redirect = route.query && route.query.redirect
+      handler: function (route) {
+        this.redirect = route.query && route.query.redirect;
       },
-      immediate: true
-    }
+      immediate: true,
+    },
   },
   created() {
     // 获取缓存信息
-    if(localStorage.getItem("supply_login")) {
+    if (localStorage.getItem("supply_login")) {
       let storageData = JSON.parse(localStorage.getItem("supply_login"));
       this.loginForm.username = storageData.username;
       this.isRemenberPw = storageData.isRemenberPw;
     }
-    if(this.isRemenberPw) {
+    if (this.isRemenberPw) {
       this.getCookie();
     }
 
@@ -152,57 +172,63 @@ export default {
   methods: {
     // 获取验证码
     getCode() {
-      getCode().then(res => {
+      getCode().then((res) => {
         console.log(res);
         this.loginForm.code = res.data.code;
         this.codeImage = res.data.pic;
-      })
+      });
     },
 
     // 显示隐藏密码
     showPwd() {
-      if (this.passwordType === 'password') {
-        this.passwordType = ''
+      if (this.passwordType === "password") {
+        this.passwordType = "";
       } else {
-        this.passwordType = 'password'
+        this.passwordType = "password";
       }
       this.$nextTick(() => {
-        this.$refs.password.focus()
-      })
+        this.$refs.password.focus();
+      });
     },
 
     // 登录
     handleLogin() {
       console.log(this.loginForm);
-      this.$refs.loginForm.validate(valid => {
+      this.$refs.loginForm.validate((valid) => {
         if (valid) {
-          this.loading = true
-          this.$store.dispatch('user/login', this.loginForm).then(() => {
-            console.log(this.redirect);
-            this.$router.push({ path: this.redirect || '/' })
-            this.saveUnAndPw();
-            this.loading = false
-          }).catch(() => {
-            this.getCode();
-            this.loginForm.codeValue = '';
-            this.loading = false
-          })
+          this.loading = true;
+          this.$store
+            .dispatch("user/login", this.loginForm)
+            .then(() => {
+              console.log(this.redirect);
+
+              this.$router.push({ path: this.redirect || "/" });
+              this.$store.commit("user/showMessage", "yes");
+              this.saveUnAndPw();
+
+              this.loading = false;
+            })
+            .catch(() => {
+              this.getCode();
+              this.loginForm.codeValue = "";
+              this.loading = false;
+            });
         } else {
-          console.log('error submit!!')
-          return false
+          console.log("error submit!!");
+          return false;
         }
-      })
+      });
     },
 
     // 处理账号密码的储存
     saveUnAndPw() {
       let storageData = {
         username: this.loginForm.username,
-        isRemenberPw: this.isRemenberPw
-      }
+        isRemenberPw: this.isRemenberPw,
+      };
       localStorage.setItem("supply_login", JSON.stringify(storageData));
 
-      if(this.isRemenberPw) {
+      if (this.isRemenberPw) {
         this.setCookie(this.loginForm.username, this.loginForm.password, 7);
       }
     },
@@ -212,20 +238,30 @@ export default {
       var exdate = new Date(); //获取时间
       exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays); //保存的天数
       //字符串拼接cookie
-      window.document.cookie = "supply_username" + "=" + c_name + ";path=/;expires=" + exdate.toGMTString();
-      window.document.cookie = "supply_password" + "=" + c_pwd + ";path=/;expires=" + exdate.toGMTString();
+      window.document.cookie =
+        "supply_username" +
+        "=" +
+        c_name +
+        ";path=/;expires=" +
+        exdate.toGMTString();
+      window.document.cookie =
+        "supply_password" +
+        "=" +
+        c_pwd +
+        ";path=/;expires=" +
+        exdate.toGMTString();
     },
 
     //读取cookie
-    getCookie: function() {
+    getCookie: function () {
       if (document.cookie.length > 0) {
-        var arr = document.cookie.split('; '); //这里显示的格式需要切割一下自己可输出看下
+        var arr = document.cookie.split("; "); //这里显示的格式需要切割一下自己可输出看下
         for (var i = 0; i < arr.length; i++) {
-          var arr2 = arr[i].split('='); //再次切割
+          var arr2 = arr[i].split("="); //再次切割
           //判断查找相对应的值
-          if (arr2[0] == 'supply_username') {
+          if (arr2[0] == "supply_username") {
             this.loginForm.username = arr2[1]; //保存到保存数据的地方
-          } else if (arr2[0] == 'supply_password') {
+          } else if (arr2[0] == "supply_password") {
             this.loginForm.password = arr2[1];
           }
         }
@@ -233,20 +269,19 @@ export default {
     },
 
     //清除cookie
-    clearCookie: function() {
+    clearCookie: function () {
       this.setCookie("", "", -1); //修改2值都为空,天数为负1天就好了
-    }
-
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="scss">
 /* 修复input 背景不协调 和光标变色 */
 /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
 
-$bg:#283443;
-$light_gray:#fff;
+$bg: #283443;
+$light_gray: #fff;
 $cursor: #fff;
 $back: #333;
 
@@ -258,7 +293,7 @@ $back: #333;
 
 /* reset element-ui css */
 .login-container {
-  background: url('~@/assets/login/background.png') center center;
+  background: url("~@/assets/login/background.png") center center;
   background-size: cover;
   .el-input {
     display: inline-block;
@@ -302,9 +337,9 @@ $back: #333;
 </style>
 
 <style lang="scss" scoped>
-$bg:#2d3a4b;
-$dark_gray:#889aa4;
-$light_gray:#eee;
+$bg: #2d3a4b;
+$dark_gray: #889aa4;
+$light_gray: #eee;
 
 .login-container {
   min-height: 100%;
@@ -365,7 +400,7 @@ $light_gray:#eee;
 
   .svg-container {
     padding: 6px 5px 6px 5px;
-    color: #33AEF7;
+    color: #33aef7;
     vertical-align: middle;
     width: 30px;
     display: inline-block;
@@ -409,7 +444,7 @@ $light_gray:#eee;
       height: 45px;
       border-radius: 45px;
       background: #33aef7;
-      box-shadow: 2px 3px 8px 0px rgba(5,155,245,0.75);
+      box-shadow: 2px 3px 8px 0px rgba(5, 155, 245, 0.75);
     }
   }
 }

+ 12 - 5
src/views/pset/login_setting.vue

@@ -208,6 +208,7 @@
         delImgData,
         addCompany,
         editImgCarousel,
+        getCompanyList,
     } from "@/api/policy_list";
 
     export default {
@@ -306,11 +307,17 @@
                     mainId: "",
                     status: this.screenForm.status,
                 };
-                // getTypeList(params).then((res) => {
-                //   this.dataList = res.data.records;
-                //   this.listTotal = res.data.total;
-                //   this.listLoading = false;
-                // });
+                getCompanyList().then((res) => {
+                    if(res.data){
+                          this.comPanyDialogForm.id = res.data[0].id,
+                            this.comPanyDialogForm.icpRecord = res.data[0].icpRecord,
+                            this.comPanyDialogForm.icpRecordLink= res.data[0].icpRecordLink,
+                            this.comPanyDialogForm.pubSecurityRecord= res.data[0].pubSecurityRecord,
+                            this.comPanyDialogForm.pubSecurityRecordLink = res.data[0].pubSecurityRecordLink,
+                            this.comPanyDialogForm.companyName = res.data[0].companyName
+                    }
+                });
+
                 getImgCarouseList(params).then((res) => {
                     this.dataList = res.data;
                     this.listLoading = false;

+ 2 - 2
src/views/supply/deliver/commerce_list.vue

@@ -40,7 +40,7 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%; height: 33px;"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期">
@@ -58,7 +58,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>

+ 2 - 2
src/views/supply/deliver/home_list.vue

@@ -35,7 +35,7 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%; height: 33px;"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期">
@@ -53,7 +53,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>

+ 4 - 4
src/views/supply/engin/components/commerce_detail.vue

@@ -140,7 +140,7 @@
           <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -161,9 +161,9 @@
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
-      
+
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="danger" @click="closeData">关闭订单</el-button>
@@ -603,4 +603,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/commerce_examine.vue

@@ -126,7 +126,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -167,7 +167,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 11 - 11
src/views/supply/engin/components/commerce_form.vue

@@ -150,7 +150,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程信息数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
@@ -232,7 +232,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -262,7 +262,7 @@
               <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
             </el-form-item>
           </el-col>
-          
+
           <el-col :xs="24" :sm="12" :lg="6" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
@@ -272,12 +272,12 @@
         </el-row>
       </el-form>
       <div class="table" style="margin: 10px 0 20px;">
-        <el-table 
-          v-loading="dialogTable_listLoading" 
-          :data="dialogTable_dataList" 
-          element-loading-text="Loading" 
-          tooltip-effect="dark" 
-          style="width: 100%" 
+        <el-table
+          v-loading="dialogTable_listLoading"
+          :data="dialogTable_dataList"
+          element-loading-text="Loading"
+          tooltip-effect="dark"
+          style="width: 100%"
           max-height="270">
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
@@ -302,7 +302,7 @@
           </el-pagination>
         </div>
       </div>
-      
+
       <div slot="footer" class="dialog-footer">
         <el-button @click="isShowDialog = false">关 闭</el-button>
       </div>
@@ -727,4 +727,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/commerce_return.vue

@@ -120,7 +120,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -166,7 +166,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 13 - 1
src/views/supply/engin/components/engin_detail.vue

@@ -53,6 +53,18 @@
           <div class="value">{{detailData.enginSignType}}</div>
         </el-col>
         <el-col :span="8" class="item">
+          <div class="label">联系人</div>
+          <div class="value">{{detailData.linkman}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">联系电话</div>
+          <div class="value">{{detailData.phone}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">固定电话</div>
+          <div class="value">{{detailData.tel}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createName}}</div>
         </el-col>
@@ -86,7 +98,7 @@
         <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 13 - 1
src/views/supply/engin/components/engin_examine.vue

@@ -57,6 +57,18 @@
           <div class="value">{{detailData.enginSignType}}</div>
         </el-col>
         <el-col :span="8" class="item">
+          <div class="label">联系人</div>
+          <div class="value">{{detailData.linkman}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">联系电话</div>
+          <div class="value">{{detailData.phone}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">固定电话</div>
+          <div class="value">{{detailData.tel}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createName}}</div>
         </el-col>
@@ -121,7 +133,7 @@
         </el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.price" size="small" type="number"></el-input>

+ 29 - 5
src/views/supply/engin/components/engin_form.vue

@@ -76,6 +76,21 @@
             <el-input v-model="mainForm.loginType" placeholder="请输入工程登录类型"></el-input>
           </el-form-item>
         </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="联系人" prop="linkman">
+            <el-input v-model="mainForm.linkman" placeholder="请输入联系人"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="联系电话" prop="phone">
+            <el-input v-model="mainForm.phone" placeholder="请输入联系电话"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="固定电话" prop="tel">
+            <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
+          </el-form-item>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="16">
           <el-form-item label="备注" prop="remark">
             <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
@@ -150,7 +165,7 @@
         </el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -176,7 +191,7 @@
       </el-table>
       <div class="add"><el-button type="text" icon="el-icon-plus" @click="addGoods">添加产品</el-button></div>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -214,6 +229,9 @@ export default {
         enginNum: '',
         factoryNum: '',
         loginType: '',
+        linkman: '',
+        phone: '',
+        tel: '',
         remark: '',
         salesMan: '',
         createMan: '',
@@ -245,7 +263,7 @@ export default {
         openSidebar: this.sidebar.opened
       }
     },
-    
+
   },
 
   created() {
@@ -301,6 +319,9 @@ export default {
         this.mainForm.enginNum = data.projectNo;
         this.mainForm.factoryNum = data.enginFactoryNo;
         this.mainForm.loginType = data.enginSignType;
+        this.mainForm.linkman = data.linkman;
+        this.mainForm.phone = data.phone;
+        this.mainForm.tel = data.tel;
         this.mainForm.remark = data.remark;
         this.mainForm.salesMan = data.serviceId;
         this.mainForm.createMan = data.createName;
@@ -395,7 +416,7 @@ export default {
 
           let params = {
             orderDate: this.mainForm.orderDate + ' 00:00:00',
-            productCategoryId: this.mainForm.mainId,
+            mainId: this.mainForm.mainId,
             projectName: this.mainForm.enginName,
             orderType: this.mainForm.orderType,
             useUnit: this.mainForm.company,
@@ -403,6 +424,9 @@ export default {
             projectNo: this.mainForm.enginNum,
             enginFactoryNo: this.mainForm.factoryNum,
             enginSignType: this.mainForm.loginType,
+            linkman: this.mainForm.linkman,
+            phone: this.mainForm.phone,
+            tel: this.mainForm.tel,
             remark: this.mainForm.remark,
             contractExpireDate: this.mainForm.contractDate,
             items: this.goodsList
@@ -475,4 +499,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 4 - 4
src/views/supply/engin/components/home_detail.vue

@@ -140,7 +140,7 @@
           <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -161,9 +161,9 @@
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
-      
+
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="danger" @click="closeData">关闭订单</el-button>
@@ -603,4 +603,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/home_examine.vue

@@ -126,7 +126,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -167,7 +167,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 11 - 11
src/views/supply/engin/components/home_form.vue

@@ -156,7 +156,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
@@ -238,7 +238,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -268,7 +268,7 @@
               <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
             </el-form-item>
           </el-col>
-          
+
           <el-col :xs="24" :sm="12" :lg="6" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
@@ -278,12 +278,12 @@
         </el-row>
       </el-form>
       <div class="table" style="margin: 10px 0 20px;">
-        <el-table 
-          v-loading="dialogTable_listLoading" 
-          :data="dialogTable_dataList" 
-          element-loading-text="Loading" 
-          tooltip-effect="dark" 
-          style="width: 100%" 
+        <el-table
+          v-loading="dialogTable_listLoading"
+          :data="dialogTable_dataList"
+          element-loading-text="Loading"
+          tooltip-effect="dark"
+          style="width: 100%"
           max-height="270">
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
@@ -308,7 +308,7 @@
           </el-pagination>
         </div>
       </div>
-      
+
       <div slot="footer" class="dialog-footer">
         <el-button @click="isShowDialog = false">关 闭</el-button>
       </div>
@@ -761,4 +761,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/home_return.vue

@@ -120,7 +120,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -166,7 +166,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 1 - 1
src/views/supply/engin/engin_list.vue

@@ -96,7 +96,7 @@
             <el-table-column align="center" label="安装地址" prop="installAddress" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表人" prop="createName" min-width="100" show-overflow-tooltip></el-table-column>

+ 151 - 110
src/views/supply/pickup/check.vue

@@ -1,129 +1,145 @@
 <template>
   <div class="app-container">
     
-    <div class="main-title">
-      <div class="title">仓库提货确认</div>
-    </div>
+    <div v-show="!isShowPrint">
+      <div class="main-title">
+        <div class="title">仓库提货确认</div>
+      </div>
 
-    <div>
-      <el-form ref="screenForm" :model="screenForm" label-width="96px" size="small" label-position="right">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货人手机号" prop="phone">
-              <el-input v-model="screenForm.phone" placeholder="请输入提货人手机号"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" @click="getCode" :disabled="!screenForm.phone || countDown != 60">{{countDown == 60 ? getCodeText : '重新获取('+countDown+'s)'}}</el-button>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="8">
-            <el-form-item label="验证码" prop="code">
-              <el-input v-model="screenForm.code" placeholder="请输入验证码"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" :disabled="!screenForm.phone || !screenForm.code" @click="getPickupManInfo">确 认</el-button>
-          </el-col>
-        </el-row>
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="9">
-            <el-form-item label="提货人姓名" prop="name">
-              <el-input v-model="screenForm.name" placeholder="请通过手机验证获取" readonly></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="8">
-            <el-form-item label="提货人身份证" prop="idCard">
-              <el-input v-model="screenForm.idCard" placeholder="请通过手机验证获取" readonly></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" @click="getList">查 询</el-button>
-          </el-col>
-        </el-row>
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="24" :lg="24">
-            <el-form-item prop="orderNum" label-width="0">
-              <el-radio-group v-model="screenForm.status" size="medium">
-                <el-radio-button label="0">未打印</el-radio-button>
-                <el-radio-button label="1">已打印</el-radio-button>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
+      <div>
+        <el-form ref="screenForm" :model="screenForm" label-width="96px" size="small" label-position="right">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="提货人手机号" prop="phone">
+                <el-input v-model="screenForm.phone" placeholder="请输入提货人手机号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" @click="getCode" :disabled="!screenForm.phone || countDown != 60">{{countDown == 60 ? getCodeText : '重新获取('+countDown+'s)'}}</el-button>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="8">
+              <el-form-item label="验证码" prop="code">
+                <el-input v-model="screenForm.code" placeholder="请输入验证码"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" :disabled="!screenForm.phone || !screenForm.code" @click="getPickupManInfo">确 认</el-button>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="9">
+              <el-form-item label="提货人姓名" prop="name">
+                <el-input v-model="screenForm.name" placeholder="请通过手机验证获取" readonly></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="8">
+              <el-form-item label="提货人身份证" prop="idCard">
+                <el-input v-model="screenForm.idCard" placeholder="请通过手机验证获取" readonly></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" @click="getList">查 询</el-button>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="orderNum" label-width="0">
+                <el-radio-group v-model="screenForm.status" size="medium">
+                  <el-radio-button label="0">未打印</el-radio-button>
+                  <el-radio-button label="1">已打印</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
 
-    <div class="main-title">
-      <div class="title">提货单</div>
-    </div>
+      <div class="main-title">
+        <div class="title">提货单</div>
+      </div>
 
-    <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-column align="center" label="状态" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.printNum ? '已打单':'未打单' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickTime | dateToDayFilter }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="发货申请单号" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品大类" prop="mainName" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="提货人/物流公司" prop="takerName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickType == '1' ? scope.row.takerName:scope.row.pickLogistics }}
-            </template>
-          </el-table-column>
-        </el-table>
+      <div class="mymain-container">
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
+            <el-table-column align="center" type="selection" width="55"></el-table-column>
+            <el-table-column align="center" label="状态" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.printNum ? '已打单(' + scope.row.printNum + ')' : '未打单' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickTime | dateToDayFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货申请单号" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品大类" prop="mainName" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="提货人/物流公司" prop="takerName" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickType == '1' ? scope.row.takerName:scope.row.pickLogistics }}
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
       </div>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+
+      <div class="page-footer">
+        <div class="footer" :class="classObj">
+          <el-button type="primary" @click="printData" :disabled="multipleSelection.length < 1">打印发货单</el-button>
+        </div>
       </div>
+
     </div>
 
+    <PickupPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" />
+
   </div>
 </template>
 
 <script>
-import { getPickupList, getCode, getPickupManInfo } from "@/api/supply/pickup";
+import { getPickupList, getCode, getPickupManInfo, addPrint } from "@/api/supply/pickup";
+import PickupPrint from "@/views/supply/pickup/components/pickup_print";
 
 export default {
+  components: {
+    PickupPrint
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -144,6 +160,11 @@ export default {
       getCodeText: '获取验证码',
       countDown: 60,
 			timer: null,
+
+      multipleSelection: [],
+
+      queryItem: {},
+      isShowPrint: false,
     }
   },
 
@@ -225,6 +246,26 @@ export default {
       this.currentPage = val;
       this.getList();
     },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowPrint = false;
+    },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+
+    // 点击打印
+    printData() {
+      if(!item.printNum) {
+        this.queryItem = item;
+        this.isShowPrint = true;
+        // addPrint({ids: item.id}).then(res => {
+
+        // })
+      }
+    },
   }
 }
 </script>

+ 47 - 18
src/views/supply/pickup/components/pickup_form.vue

@@ -83,13 +83,13 @@
       <div class="table">
         <el-table v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
           <el-table-column align="center" type="selection" width="55"></el-table-column>
-          <el-table-column align="center" label="发货申请单" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货申请单" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.orderTime | dateToDayFilter }}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="工程编号" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
@@ -114,9 +114,8 @@
 </template>
 
 <script>
-import { getWarehouseList, getDeliverList, getPickupManList, getPickupCarList, getCompanyList, addPickupBook } from "@/api/supply/pickup";
+import { getWarehouseList, getDeliverList, getPickupManList, getPickupCarList, getCompanyList, addPickupBook, editPickupBook, getDetail } from "@/api/supply/pickup";
 import { getDictList } from "@/api/common";
-import { findElem } from "@/utils/util";
 
 export default {
   name: 'PickupForm',
@@ -178,6 +177,9 @@ export default {
     this.getPickupManList();
     this.getPickupCarList();
     this.getCompanyList();
+    if(this.listItem) {
+      this.getDetail();
+    }
   },
 
   methods: {
@@ -195,6 +197,23 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        let data = res.data;
+        this.mainForm.warehouse = data.correspondId;
+        this.mainForm.date = data.pickTime.slice(0, 10);
+        this.mainForm.timeSlot = Number(data.pickStatus);
+        this.mainForm.pickupWay = String(data.pickType);
+        this.mainForm.pickupMan = data.takerId;
+        this.mainForm.pickupCar = data.takerCarId;
+        this.mainForm.company = data.pickLogistics;
+        this.mainForm.remark = data.remark;
+
+        this.deliverList = data.invoicePickBeans;
+      })
+    },
+
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
@@ -264,19 +283,18 @@ export default {
           if(this.tableSelection.length < 1) {
             return this.$errorMsg('请选择发货申请单');
           }
-
           this.formLoading = true;
-          let takerName = '';
-          if(this.mainForm.pickupMan) {
-            let index = findElem(this.pickupManList, 'id', this.mainForm.pickupMan);
-            takerName = this.pickupManList[index].takerName;
-          }
+
+          let takerName = this.pickupManList.find(o => o.id == this.mainForm.pickupMan).takerName;
+          let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
+
           let orderList = [];
           this.tableSelection.forEach(item => {
             orderList.push(item.invoiceOrderId);
           });
           let params = {
-            stockName: this.mainForm.warehouse,
+            correspondId: this.mainForm.warehouse,
+            correspondName,
             pickTime: this.mainForm.date + ' 00:00:00',
             pickStatus: Number(this.mainForm.timeSlot),
             pickType: Number(this.mainForm.pickupWay),
@@ -291,13 +309,24 @@ export default {
           if(this.mainForm.pickupWay == '2') {
             params.pickLogistics = this.mainForm.company;
           }
-          addPickupBook(params).then(res => {
-            this.$successMsg('提交成功');
-            this.goBack();
-            this.$parent.getList();
-          }).finally(res => {
-            this.formLoading = false;
-          })
+          if(this.listItem) {
+            params.id = this.listItem.id;
+            editPickupBook(params).then(res => {
+              this.$successMsg('提交成功');
+              this.goBack();
+              this.$parent.getList();
+            }).finally(res => {
+              this.formLoading = false;
+            })
+          }else {
+            addPickupBook(params).then(res => {
+              this.$successMsg('提交成功');
+              this.goBack();
+              this.$parent.getList();
+            }).finally(res => {
+              this.formLoading = false;
+            })
+          }
         }
       })
     },

+ 152 - 0
src/views/supply/pickup/components/pickup_print.vue

@@ -0,0 +1,152 @@
+<template>
+  <div class="detail-container">
+    <div id="printMe">
+      <div class="print-table-1">
+        <el-row :gutter="0">
+          <el-col :span="6" class="item">
+            <div class="label">经销商编码:</div>
+            <div class="value">{{detailData.id}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">出库日期:</div>
+            <div class="value">{{detailData.createBy}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">仓库:</div>
+            <div class="value">{{detailData.retreatTime}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">信息密钥:</div>
+            <div class="value">{{detailData.customerNumber}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">经销商:</div>
+            <div class="value">{{detailData.customerName}}</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.retreatDocumentOrder" 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="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货单号" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="仓库名称" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="num" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="无税金额" prop="noTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="税率(%)" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="折扣金额" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="status" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-button @click="goBack">关 闭</el-button>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getDetail } from "@/api/supply/return";
+
+export default {
+  name: 'ReturnDetail',
+  componentName: 'ReturnDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printMe'
+      },
+      detailData: {},
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .print-table-1 {
+    .item {
+      display: flex;
+      .label {
+        width: 120px;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        padding: 0 10px;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+      }
+      .value {
+        flex: 1;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        padding: 0 10px;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        input {
+          border: none;
+          padding: 0;
+        }
+      }
+    }
+  }
+</style>

+ 9 - 4
src/views/supply/pickup/pickup_list.vue

@@ -50,7 +50,7 @@
             <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
           </div>
           <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+            <ExportButton :exUrl="'pick/export'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
@@ -79,9 +79,9 @@
                 {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
+            <el-table-column align="center" label="单据日期" prop="theTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.orderTime | dateToDayFilter }}
+                {{ scope.row.theTime | dateToDayFilter }}
               </template>
             </el-table-column>
             <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
@@ -90,8 +90,13 @@
             <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="提货总数量" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="提货总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="100" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
       </div>

+ 34 - 17
src/views/supply/pickup/statistics.vue

@@ -24,109 +24,126 @@
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日预约出货单</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.pickOrderNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日提货货品种类</div>
-            <div class="num"><span>123</span>(种)</div>
+            <div class="num"><span>{{detailData.pickCategoryNum || 0}}</span>(种)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日预约经销商</div>
-            <div class="num"><span>123</span>(家)</div>
+            <div class="num"><span>{{detailData.pickCustomNum || 0}}</span>(家)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日提货经销商</div>
-            <div class="num"><span>123</span>(家)</div>
+            <div class="num"><span>{{detailData.pickOrderCustomNum || 0}}</span>(家)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库货品种类</div>
-            <div class="num"><span>123</span>(种)</div>
+            <div class="num"><span>{{detailData.pickCategoryNum || 0}}</span>(种)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipOrderNum || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.pickLifeNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.pickLifeTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerPrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerPrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.pickLifePrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
       </el-row>
     </div>
 
-
   </div>
 </template>
 
 <script>
+import { getStatistics } from "@/api/supply/pickup";
+
 export default {
   data() {
     return {
-      screenForm: { // 筛选表单数据
+      screenForm: {
         date: '',
       },
+      detailData: {},
     }
   },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    getDetail() {
+      getStatistics({
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+      }).then(res => {
+        this.detailData = res.data;
+      })
+    }
+  }
 }
 </script>
 

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

@@ -167,7 +167,7 @@
         <el-table-column align="center" label="发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="直调数量" prop="adjustNum" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.adjustNum" size="small" type="number"></el-input>
+            <el-input v-model="scope.row.adjustNum" size="small" type="number" :disabled="!scope.row.isDirectTransfer"></el-input>
           </template>
         </el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
@@ -299,7 +299,7 @@ export default {
       this.$refs.deliverForm.validate((valid) => {
         if (valid) {
           for(let i=0; i<this.goodsList.length; i++) {
-            if(!this.goodsList[i].adjustNum) {
+            if(!this.goodsList[i].adjustNum && this.goodsList[i].isDirectTransfer) {
               this.$errorMsg('请输入直调数量');
               return;
             }
@@ -307,7 +307,7 @@ export default {
           let goodsList = this.goodsList.map((item) => {
             return {
               itemId: item.id,
-              qty: item.adjustNum,
+              qty: item.adjustNum || 0,
             }
           });
           let params = {

+ 2 - 2
src/views/supply/retail/components/retail_form.vue

@@ -411,7 +411,7 @@ export default {
           let oldItem = oldGoodsList[i]
           for(let j = 0; j < newGoodsList.length; j++) {
             let newItem = newGoodsList[j]
-            if(newItem.materialId === oldItem.materialId){
+            if(newItem.id === oldItem.id){
               newGoodsList[j].selected = true;
               break;
             }
@@ -499,7 +499,7 @@ export default {
       for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
         let flag = true;  // 建立标记,判断数据是否重复,true为不重复
         for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+          if(allArr[i].id == newArr[j].id){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }

+ 8 - 7
src/views/supply/sales/components/sales_detail.vue

@@ -10,7 +10,7 @@
         <el-row :gutter="0">
           <el-col :span="8" class="item">
             <div class="label">出库单号</div>
-            <div class="value">{{detailData.retailOrderId}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据日期</div>
@@ -18,7 +18,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据状态</div>
-          <div class="value">{{detailData.status | statusFilter}}</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
@@ -51,7 +51,7 @@
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
 
@@ -66,7 +66,7 @@
           </el-col>
           <el-col :xs="12" :sm="8" :lg="8" class="item">
             <div class="label">审批结果</div>
-            <div class="value">{{detailData.status | statusFilter}}</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :xs="12" :sm="8" :lg="8" class="item">
             <div class="label">审批时间</div>
@@ -99,9 +99,10 @@ export default {
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '待审核', value: 1 },
-        { label: '审核通过', value: 2 },
-        { label: '审核驳回', value: 3 },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
       ];
       let obj = statusList.find(o => o.value == val);
       return obj ? obj.label : ''

+ 56 - 30
src/views/supply/sales/components/sales_examine.vue

@@ -9,7 +9,7 @@
       <el-row :gutter="0">
         <el-col :span="8" class="item">
           <div class="label">出库单号</div>
-          <div class="value">{{detailData.retailOrderId}}</div>
+          <div class="value">{{detailData.id}}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据日期</div>
@@ -17,7 +17,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>
-        <div class="value">{{detailData.status | statusFilter}}</div>
+        <div class="value">{{detailData.examineStatus | statusFilter}}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">仓库</div>
@@ -50,7 +50,7 @@
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>
     </div>
 
@@ -64,13 +64,8 @@
           <div class="value">{{userName}}</div>
         </el-col>
         <el-col :span="12" class="item">
-          <div class="label">审批结果</div>
-          <div class="value">
-            <el-radio-group v-model="examineForm.status">
-              <el-radio :label="true">通过</el-radio>
-              <el-radio :label="false">驳回</el-radio>
-            </el-radio-group>
-          </div>
+          <div class="label">审批日期</div>
+          <div class="value">{{getDate()}}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
@@ -83,12 +78,9 @@
     
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
-        <el-popconfirm
-          title="确定关闭吗?"
-          @onConfirm="goBack"
-          style="margin-left: 10px;"
-        >
+        <el-button type="primary" @click="clickSubmitForm('OK')">审批通过</el-button>
+        <el-button type="warning" @click="clickSubmitForm('FAIL')">审批驳回</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
       </div>
@@ -104,13 +96,24 @@ export default {
   name: 'SalesDetail',
   componentName: 'SalesDetail',
   props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
   data() {
     return {
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
       formLoading: false,
       examineForm: {
-        status: true,
         remark: '',
       }
     }
@@ -133,6 +136,22 @@ export default {
   },
 
   methods: {
+    getDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+          month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+          strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
+
     // 返回列表
     goBack() {
       this.$emit('backListFormExamine');
@@ -146,19 +165,26 @@ export default {
     },
 
     // 提交审批
-    clickSubmitForm() {
-      this.formLoading = true;
-      examineData({
-        id: this.listItem.id,
-        status: this.examineForm.status ? 2 : 3,
-        approvalRemark: this.examineForm.remark,
-      }).then(res => {
-        this.$successMsg('审批成功');
-        this.goBack();
-        this.$parent.getList();
-      }).finally(res => {
-        this.formLoading = false;
-      })
+    clickSubmitForm(val) {
+      this.$confirm('此操作将审批订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          id: this.listItem.id,
+          approvalRemark: this.examineForm.remark,
+          examineStatus: val,
+        };
+        this.formLoading = true;
+        examineData(params).then(res => {
+          this.$successMsg();
+          this.goBack();
+          this.$parent.getList();
+        }).finally(res => {
+          this.formLoading = false;
+        })
+      }).catch(() => {});
     },
   }
 }

+ 13 - 12
src/views/supply/sales/sales_list.vue

@@ -68,14 +68,14 @@
             <!-- <el-button size="small" type="warning" icon="el-icon-close">退单</el-button> -->
           </div>
           <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+            <ExportButton :exUrl="'sale/order/export'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="状态" prop="status" min-width="100" show-overflow-tooltip>
+            <el-table-column align="center" label="状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.status | statusFilter}}
+                {{scope.row.examineStatus | statusFilter}}
               </template>
             </el-table-column>
             <el-table-column align="center" label="开票状态" prop="billStatus" min-width="100" show-overflow-tooltip>
@@ -83,21 +83,21 @@
                 {{scope.row.billStatus | billStatusFilter}}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="出库单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="出库单号" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货单号" prop="orderNo" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单价" prop="price" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-                <el-button type="text" @click="toExamine(scope.row)">审批</el-button>
+                <el-button type="text" @click="toExamine(scope.row)" v-if="scope.row.examineStatus === 'WAIT'">审批</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -165,9 +165,10 @@ export default {
         status: '',
       },
       statusList: [
-        { label: '待审核', value: 1 },
-        { label: '审核通过', value: 2 },
-        { label: '审核驳回', value: 3 },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
       ],
 
       queryItem: {},