Bladeren bron

5.17修改

sakura 1 jaar geleden
bovenliggende
commit
edbbf2eafc

+ 9 - 0
manager-admin/src/api/order.js

@@ -275,3 +275,12 @@ export function outOrderSend(id,param) {
     data:param
   })
 }
+
+/* 发货单详情 /admin/erp/order/getSendOrderDetail*/
+export function getSendOrderDetail(order_id) {
+  return request({
+    url: `/admin/erp/order/getSendOrderDetail/${order_id}`,
+    method: 'get',
+    loading: false
+  })
+}

+ 162 - 126
manager-admin/src/views/layout/components/Navbar.vue

@@ -1,13 +1,22 @@
 <template>
   <div class="navbar-wrap">
-    <el-menu class="navbar" :class="[isFloor && 'tabs-box']" mode="horizontal" background-color="#fff">
+    <el-menu
+      class="navbar"
+      :class="[isFloor && 'tabs-box']"
+      mode="horizontal"
+      background-color="#fff"
+    >
       <div class="navbar-left">
-        <hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger>
-<!--        <breadcrumb class="breadcrumb-container"></breadcrumb>-->
+        <hamburger
+          class="hamburger-container"
+          :toggleClick="toggleSideBar"
+          :isActive="sidebar.opened"
+        ></hamburger>
+        <!--        <breadcrumb class="breadcrumb-container"></breadcrumb>-->
         <!-- <tags-view></tags-view> -->
         <div class="menu_cards">
           <div class="menu_card">
-           <span class="time">{{times}}</span>
+            <span class="time">时间:{{ times }}</span>
             <!-- <div class="dropdown shrink-0">
               <icon-calendar />
             </div>
@@ -36,8 +45,8 @@
                   </button>
               </div>
             </div> -->
-        </div>
-        <div class="menu_card">
+          </div>
+          <div class="menu_card">
             <!-- <div class="dropdown shrink-0">
               <img src="@/assets/img/sun.svg" alt="">
             </div>
@@ -50,16 +59,14 @@
             <div class="dropdown shrink-0">
               <img src="@/assets/img/ideo.svg" alt="">
             </div> -->
+          </div>
         </div>
-        </div>
-
       </div>
 
       <div class="right-menu">
-
-<!--        <el-tooltip effect="dark" content="全屏" placement="bottom">-->
-<!--          <screenfull class="screenfull right-menu-item"></screenfull>-->
-<!--        </el-tooltip>-->
+        <!--        <el-tooltip effect="dark" content="全屏" placement="bottom">-->
+        <!--          <screenfull class="screenfull right-menu-item"></screenfull>-->
+        <!--        </el-tooltip>-->
 
         <el-dropdown class="avatar-container right-menu-item" trigger="click">
           <div class="avatar-wrapper">
@@ -69,9 +76,7 @@
 
           <el-dropdown-menu slot="dropdown">
             <router-link to="/">
-              <el-dropdown-item>
-                首页
-              </el-dropdown-item>
+              <el-dropdown-item> 首页 </el-dropdown-item>
             </router-link>
             <span @click="changePassword">
               <el-dropdown-item>修改密码</el-dropdown-item>
@@ -83,17 +88,36 @@
         </el-dropdown>
       </div>
     </el-menu>
-    <el-dialog title="修改密码" :visible.sync="dialogVisible" width="500px" append-to-body :close-on-click-modal="false"
-      :close-on-press-escape="false">
+    <el-dialog
+      title="修改密码"
+      :visible.sync="dialogVisible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
       <el-form :model="form" :rules="formRules" ref="form" label-width="100px">
         <el-form-item label="原密码" prop="old_passwprd">
-          <el-input v-model="form.old_passwprd" placeholder="不修改则不填"></el-input>
+          <el-input
+            v-model="form.old_passwprd"
+            placeholder="不修改则不填"
+          ></el-input>
         </el-form-item>
         <el-form-item label="新密码" prop="password">
-          <el-input type="password" autocompete="off" v-model="form.password" placeholder="不修改则不填"></el-input>
+          <el-input
+            type="password"
+            autocompete="off"
+            v-model="form.password"
+            placeholder="不修改则不填"
+          ></el-input>
         </el-form-item>
         <el-form-item label="确认密码" prop="rep_password">
-          <el-input type="password" autocompete="off" v-model="form.rep_password" placeholder="不修改则不填"></el-input>
+          <el-input
+            type="password"
+            autocompete="off"
+            v-model="form.rep_password"
+            placeholder="不修改则不填"
+          ></el-input>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -105,23 +129,23 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import Breadcrumb from '@/components/Breadcrumb'
-import Hamburger from '@/components/Hamburger'
-import Screenfull from '@/components/Screenfull'
-import LangSelect from '@/components/LangSelect'
-import ThemePicker from '@/components/ThemePicker'
-import TagsView from './TagsView'
-import IconCalendar from '@/components/icon/icon-calendar.vue';
-import IconEdit from '@/components/icon/icon-edit.vue';
-import IconChatNotification from '@/components/icon/icon-chat-notification.vue';
-import IconSearch from '@/components/icon/icon-search.vue';
-import IconXCircle from '@/components/icon/icon-x-circle.vue';
-import { RegExp } from '~/ui-utils'
-import * as API_Auth from '@/api/auth'
-import * as API_Menus from '@/api/menus'
-import { asyncRouterMap, constantRouterMap } from '@/router'
-import Storage from '@/utils/storage'
+import { mapGetters } from "vuex";
+import Breadcrumb from "@/components/Breadcrumb";
+import Hamburger from "@/components/Hamburger";
+import Screenfull from "@/components/Screenfull";
+import LangSelect from "@/components/LangSelect";
+import ThemePicker from "@/components/ThemePicker";
+import TagsView from "./TagsView";
+import IconCalendar from "@/components/icon/icon-calendar.vue";
+import IconEdit from "@/components/icon/icon-edit.vue";
+import IconChatNotification from "@/components/icon/icon-chat-notification.vue";
+import IconSearch from "@/components/icon/icon-search.vue";
+import IconXCircle from "@/components/icon/icon-x-circle.vue";
+import { RegExp } from "~/ui-utils";
+import * as API_Auth from "@/api/auth";
+import * as API_Menus from "@/api/menus";
+import { asyncRouterMap, constantRouterMap } from "@/router";
+import Storage from "@/utils/storage";
 export default {
   components: {
     Breadcrumb,
@@ -134,78 +158,80 @@ export default {
     IconEdit,
     IconChatNotification,
     IconSearch,
-    IconXCircle
+    IconXCircle,
   },
   data() {
-    const user = this.MixinClone(this.$store.getters.user)
+    const user = this.MixinClone(this.$store.getters.user);
     return {
-      siteType: Storage.getItem('siteType'),
+      siteType: Storage.getItem("siteType"),
       dialogVisible: false,
       form: {
-        old_passwprd: '',
-        password: '',
-        rep_password: ''
+        old_passwprd: "",
+        password: "",
+        rep_password: "",
       },
       formRules: {
-        old_passwprd: [{ required: false, message: '请输入原密码!', trigger: 'blur' }],
+        old_passwprd: [
+          { required: false, message: "请输入原密码!", trigger: "blur" },
+        ],
         password: [
-          { required: false, message: '请输入新密码!', trigger: 'blur' },
+          { required: false, message: "请输入新密码!", trigger: "blur" },
           {
             validator: (rule, value, callback) => {
               if (value && !RegExp.password.test(value)) {
-                callback(new Error('密码应为6-20位英文或数字!'))
+                callback(new Error("密码应为6-20位英文或数字!"));
               } else {
-                callback()
+                callback();
               }
-            }
-          }
+            },
+          },
         ],
         rep_password: [
-          { required: false, message: '请确认您的新密码!', trigger: 'blur' },
+          { required: false, message: "请确认您的新密码!", trigger: "blur" },
           {
             validator: (rule, value, callback) => {
               if (value && this.form.password !== value) {
-                callback(new Error('两次输入不一致!'))
+                callback(new Error("两次输入不一致!"));
               } else {
-                callback()
+                callback();
               }
-            }
-          }
-        ]
+            },
+          },
+        ],
       },
       isFloor: false,
-      times:'',//格式化之后的当前时间
-    }
+      times: "", //格式化之后的当前时间
+    };
   },
   computed: {
-    ...mapGetters(['sidebar', 'user'])
+    ...mapGetters(["sidebar", "user"]),
   },
   watch: {
     form: {
-      handler: function(newVal) {
-        const { old_passwprd, password, rep_password } = newVal
-        const required = !!(old_passwprd || password || rep_password)
-        this.formRules.old_passwprd[0].required = required
-        this.formRules.password[0].required = required
-        this.formRules.rep_password[0].required = required
+      handler: function (newVal) {
+        const { old_passwprd, password, rep_password } = newVal;
+        const required = !!(old_passwprd || password || rep_password);
+        this.formRules.old_passwprd[0].required = required;
+        this.formRules.password[0].required = required;
+        this.formRules.rep_password[0].required = required;
       },
-      deep: true
+      deep: true,
     },
-    dialogVisible: function(newVal) {
+    dialogVisible: function (newVal) {
       if (!newVal) {
-        this.fileList = []
+        this.fileList = [];
       }
     },
     $route() {
-      if (this.$route.path === '/page/pc-decoration/floor') {
-        this.isFloor = true
+      if (this.$route.path === "/page/pc-decoration/floor") {
+        this.isFloor = true;
       } else {
-        this.isFloor = false
+        this.isFloor = false;
       }
-    }
+    },
   },
   created() {
-    this.getTimes()
+    this.getTimes();
   },
   // 在Vue实例销毁前,清除我们的定时器
   beforeDestroy() {
@@ -214,73 +240,83 @@ export default {
     }
   },
   methods: {
-    getTimes(){
+    getTimes() {
       setInterval(this.getTimesInterval, 1000);
     },
-    getTimesInterval:function() {
-      let _this = this;
-      let year = new Date().getFullYear(); //获取当前时间的年份
-      let month = new Date().getMonth() + 1; //获取当前时间的月份
-      let day = new Date().getDate(); //获取当前时间的天数
-      let hours = new Date().getHours(); //获取当前时间的小时
-      let minutes = new Date().getMinutes(); //获取当前时间的分数
-      let seconds = new Date().getSeconds(); //获取当前时间的秒数
-      //当小于 10 的是时候,在前面加 0
-      if (hours < 10) {
-        hours = "0" + hours;
-      }
-      if (minutes < 10) {
-        minutes = "0" + minutes;
-      }
-      if (seconds < 10) {
-        seconds = "0" + seconds;
-      }
-      //拼接格式化当前时间
-      _this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
+    getTimesInterval: function () {
+      let now = new Date();
+      let year = now.getFullYear(); // 获取当前时间的年份
+      let month = now.getMonth() + 1; // 获取当前时间的月份
+      let day = now.getDate(); // 获取当前时间的天数
+      let hours = now.getHours(); // 获取当前时间的小时
+      let minutes = now.getMinutes(); // 获取当前时间的分数
+      let seconds = now.getSeconds(); // 获取当前时间的秒数
+      let weekdays = [
+        "星期天",
+        "星期一",
+        "星期二",
+        "星期三",
+        "星期四",
+        "星期五",
+        "星期六",
+      ];
+      let weekday = weekdays[now.getDay()]; // 获取星期几
+
+      // 当小于 10 的时候,在前面加 0
+      month = month < 10 ? "0" + month : month;
+      day = day < 10 ? "0" + day : day;
+      hours = hours < 10 ? "0" + hours : hours;
+      minutes = minutes < 10 ? "0" + minutes : minutes;
+      seconds = seconds < 10 ? "0" + seconds : seconds;
+
+      // 拼接格式化当前时间
+      this.times = `${year}-${month}-${day} ${hours}:${minutes}:${seconds} ${weekday}`;
     },
     // tab(){
     //   document.querySelector('body').classList.add('dark');
     // },
     /** 提交修改密码表单 */
     submitForm() {
-      this.$refs['form'].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
-          const params = this.MixinClone(this.form)
+          const params = this.MixinClone(this.form);
           if (!params.old_passwprd) {
-            delete params.old_passwprd
-            delete params.password
-            delete params.rep_password
+            delete params.old_passwprd;
+            delete params.password;
+            delete params.rep_password;
           }
           API_Auth.editUserInfo(params).then(() => {
-            this.dialogVisible = false
-            this.$store.dispatch('fedLogoutAction')
-            location.reload()
-          })
+            this.dialogVisible = false;
+            this.$store.dispatch("fedLogoutAction");
+            location.reload();
+          });
         } else {
-          this.$message.error('表单填写有误,请核对!')
+          this.$message.error("表单填写有误,请核对!");
         }
-      })
+      });
     },
     toggleSideBar() {
-      this.$store.dispatch('toggleSideBar')
+      this.$store.dispatch("toggleSideBar");
     },
     changePassword() {
-      this.dialogVisible = true
+      this.dialogVisible = true;
     },
     logout() {
-      this.$confirm('确定退出吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$store.dispatch('logoutAction').then(() => {
-          const route = this.$router.resolve('/login')
-          location.replace(route.href)// 为了重新实例化vue-router对象 避免bug
+      this.$confirm("确定退出吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$store.dispatch("logoutAction").then(() => {
+            const route = this.$router.resolve("/login");
+            location.replace(route.href); // 为了重新实例化vue-router对象 避免bug
+          });
         })
-      }).catch(() => { })
-    }
-  }
-}
+        .catch(() => {});
+    },
+  },
+};
 </script>
 
 <style type="text/scss" lang="scss" scoped>
@@ -326,26 +362,26 @@ export default {
   .hamburger-container {
     padding: 0 10px;
   }
-  .menu_cards{
+  .menu_cards {
     width: 100%;
     display: flex;
     justify-content: space-between;
   }
-  .menu_card{
+  .menu_card {
     display: flex;
-    .dropdown{
+    .dropdown {
       width: 40px;
       height: 40px;
-      margin-left:8px;
-      background-color: rgba(224,230,237,0.4);
+      margin-left: 8px;
+      background-color: rgba(224, 230, 237, 0.4);
       border-radius: 50%;
-      img{
+      img {
         width: 20px;
         height: 20px;
         margin: 10px 10px;
       }
     }
-    .time{
+    .time {
       margin-left: 30px;
     }
   }
@@ -420,7 +456,7 @@ export default {
           width: 40px;
           height: 40px;
           border-radius: 50%;
-          background: #409EFF;
+          background: #409eff;
           font-size: 30px;
           line-height: 1.1;
           text-align: center;

+ 26 - 10
manager-admin/src/views/layout/components/TagsView.vue

@@ -27,7 +27,7 @@
         ></span>
       </router-link>
     </scroll-pane>
-  <!--   <ul class='contextmenu' v-show="visible" :style="{left:left+'px',top:top+'px'}">
+    <!--   <ul class='contextmenu' v-show="visible" :style="{left:left+'px',top:top+'px'}">
       <li @click="closeSelectedTag(selectedTag)">关闭</li>
       <li @click="closeOthersTags">关闭其它</li>
       <li @click="closeAllTags">关闭所有</li>
@@ -48,7 +48,6 @@ export default {
       left: 0,
       selectedTag: {},
       isFloor: false,
-      newTime: "",
     };
   },
   computed: {
@@ -81,34 +80,51 @@ export default {
   },
   mounted() {
     this.addViewTags();
-    this.getNowTime(); //进入页面调用该方法获取当前时间
+    /*  this.getNowTime(); //进入页面调用该方法获取当前时间
     clearInterval(myTimeDisplay); //销毁之前定时器
     var myTimeDisplay = setInterval(() => {
       this.getNowTime(); //每秒更新一次时间
     }, 1000);
+    this.getNowTime(); // 初始化时间
+    setInterval(() => {
+      this.getNowTime(); // 每秒更新时间
+    }, 1000);*/
   },
   methods: {
-    getNowTime() {
+    /* getNowTime() {
       var date = new Date();
+      var weekdays = [
+        "星期天",
+        "星期一",
+        "星期二",
+        "星期三",
+        "星期四",
+        "星期五",
+        "星期六",
+      ];
+      let weekday = weekdays[date.getDay()]; // 获取星期几
       var time =
         date.getFullYear() +
         "-" +
-        (date.getMonth() + 1) +
+        this.addZero(date.getMonth() + 1) + // 月份
         "-" +
-        date.getDate() +
+        this.addZero(date.getDate()) + // 日期
         " " +
-        date.getHours() +
+        this.addZero(date.getHours()) + // 小时
         ":" +
-        date.getMinutes() +
+        this.addZero(date.getMinutes()) + // 分钟
         ":" +
-        date.getSeconds();
+        this.addZero(date.getSeconds()) +
+        " " +
+        weekday; // 在时间字符串中包括星期几
+        console.log(weekday,time);
       this.newTime = time;
     },
     //根据自己的需求,看要不要在时间不大于10的时候在前面补0,如果需要直接this.addZero(date.getMinutes()),其它与之相同,如果不需要删掉addZero()方法即可。
     //小于10的拼接上0字符串
     addZero(s) {
       return s < 10 ? "0" + s : s;
-    },
+    }, */
     generateTitle, // generateTitle by vue-i18n
     generateRoute() {
       if (this.$route.name) {

+ 311 - 100
manager-admin/src/views/stock/goodsExchange/addInventory.vue

@@ -9,21 +9,28 @@
       class="change-form"
     >
       <el-form-item label="订单" prop="order_id" class="change-form-item">
-        <el-input
-          v-model="goodsExchangeAddForm.order_id"
-          :disabled="type === 'detail' || type === 'audit'"
-          ref="order"
-          @blur="blurUsername()"
-        >
-        </el-input>
+        <span>
+          <el-input
+            v-model="goodsExchangeAddForm.order_id"
+            :disabled="type === 'detail' || type === 'audit'"
+            ref="order"
+          >
+          </el-input>
+          <el-button @click="blurUsername()">搜索</el-button>
+          <el-button @click="orderBtn">订单列表</el-button>
+        </span>
       </el-form-item>
-      <el-form-item prop="warehouse_id" label="入库仓库" class="change-form-item">
+      <el-form-item
+        prop="warehouse_id"
+        label="入库仓库"
+        class="change-form-item"
+      >
         <el-select
           v-model="goodsExchangeAddForm.warehouse_id"
           clearable
           :disabled="type === 'detail' || type === 'audit'"
         >
-          <!-- @change="handleChangeWareHouse" -->
+          <!--@blur="" @change="handleChangeWareHouse" -->
           <el-option
             v-for="item in warehouseList"
             :key="item.id"
@@ -105,35 +112,33 @@
             </el-table-column>
             <el-table-column label="条码">
               <template slot-scope="scope">
-                <!-- {{ scope.row.bar_code }} -->
                 <span v-if="id">{{ scope.row.product_vo.bar_code }}</span>
-              <span v-else>{{ scope.row.bar_code }}</span>
+                <span v-else>{{ scope.row.bar_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="序列号">
               <template slot-scope="scope">
-                <!-- {{ scope.row.sn_code }} -->
                 <span v-if="id">{{ scope.row.product_vo.sn_code }}</span>
-              <span v-else>{{ scope.row.sn_code }}</span>
+                <span v-else>{{ scope.row.sn_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="规格型号" v-if="id">
               <template slot-scope="scope">
-                {{ scope.row.product_vo.spec_name.join('/') }}
+                {{ scope.row.product_vo.spec_name.join("/") }}
               </template>
             </el-table-column>
             <el-table-column label="规格型号" v-else>
               <template slot-scope="scope">
-                {{ scope.row.spec_name.join('/') }}
+                {{ scope.row.spec_name.join("/") }}
               </template>
             </el-table-column>
             <el-table-column label="单位">
               <template slot-scope="scope">
-              <span v-if="id">{{ scope.row.product_vo.unit }}</span>
-              <span v-else>{{ scope.row.unit }}</span>
+                <span v-if="id">{{ scope.row.product_vo.unit }}</span>
+                <span v-else>{{ scope.row.unit }}</span>
               </template>
             </el-table-column>
-           <!--  <el-table-column label="订单数量">
+            <!--  <el-table-column label="订单数量">
 
             </el-table-column> -->
             <el-table-column label="入库数量">
@@ -166,10 +171,7 @@
                   size="mini"
                   type="danger"
                   @click="
-                    goodsExchangeAddForm.product_list.splice(
-                      scope.$index,
-                      1
-                    )
+                    goodsExchangeAddForm.product_list.splice(scope.$index, 1)
                   "
                   >删除</el-button
                 >
@@ -269,30 +271,110 @@
         <el-table-column type="selection" width="55" />
         <el-table-column prop="" label="商品编号">
           <template slot-scope="scope">
-            {{scope.row.goods_vo.sn}}
+            {{ scope.row.goods_vo.sn }}
           </template>
         </el-table-column>
-        <el-table-column prop="bar_code" label="商品条码">
-           </el-table-column>
+        <el-table-column prop="bar_code" label="商品条码"> </el-table-column>
         <el-table-column prop="bar_code" label="序列号"></el-table-column>
         <el-table-column prop="" label="商品名称">
           <template slot-scope="scope">
-            {{scope.row.goods_vo.name}}
+            {{ scope.row.goods_vo.name }}
           </template>
         </el-table-column>
         <el-table-column prop="goods_style" label="规格型号">
           <template slot-scope="scope">
-            {{scope.row.spec_name.join('/')}}
+            {{ scope.row.spec_name.join("/") }}
           </template>
         </el-table-column>
         <el-table-column prop="unit" label="单位"> </el-table-column>
         <!-- <el-table-column prop="product_list.stock_num" label="库存数量"> </el-table-column> -->
       </el-table>
+      <!-- <el-pagination
+        slot="pagination"
+        @size-change="handlePageSizeChange"
+        @current-change="handlePageCurrentChange"
+        :current-page="goodsData.page_no"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="goodsData.page_size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="goodsData.data_total"
+      >
+      </el-pagination> -->
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeGoosData">取 消</el-button>
         <el-button type="primary" @click="submitGoosData()">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="订单列表"
+      :visible.sync="orderVisible"
+      width="1000px"
+      @close="closeGoosData"
+    >
+      <el-table
+        :data="orderList.data"
+        border
+        style="width: 100%"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" width="55" />
+        <el-table-column prop="" label="订单编号">
+          <template slot-scope="scope">
+            {{ scope.row.sn }}
+          </template>
+        </el-table-column>
+<!--         <el-table-column prop="member_id" label="客户">
+          <template slot-scope="scope">{{
+            memberType(scope.row.member_id)
+          }}</template>
+        </el-table-column>
+ -->        <el-table-column prop="order_time" label="下单时间">
+          <template slot-scope="scope">{{
+            scope.row.order_time | unixToDate
+          }}</template>
+        </el-table-column>
+        <el-table-column prop="" label="仓库名称">
+          <template slot-scope="scope">
+            {{ warehouseName(scope.row.warehouse_id) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="" label="配送方式">
+          <template slot-scope="scope">{{
+            deliveryType(scope.row.send_type)
+          }}</template>
+        </el-table-column>
+        <!-- <el-table-column prop="pay_type" label="付款方式">
+          <template slot-scope="scope">{{
+            payType(scope.row.pay_type)
+          }}</template>
+        </el-table-column> -->
+        <el-table-column prop="" label="实付金额">
+          <template slot-scope="scope">{{
+            "¥" + scope.row.pay_price
+          }}</template>
+        </el-table-column>
+        <!-- <el-table-column prop="" label="订单状态">
+          <template slot-scope="scope">
+            {{ typeName(scope.row.status) }}
+          </template>
+        </el-table-column> -->
+      </el-table>
+      <el-pagination
+
+        @size-change="handlePageSizeChange"
+        @current-change="handlePageCurrentChange"
+        :current-page="orderList.page_no"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="orderList.page_size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="orderList.data_total"
+      >
+      </el-pagination>
+      <span slot="footer" class="dialog-footer">
+        <el-button  @click="closeOrder">取 消</el-button>
+        <el-button type="primary">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -306,6 +388,7 @@ import * as API_Erp from "@/api/erp";
 import * as API_Auth from "@/api/auth";
 import * as API_order from "@/api/order";
 import * as API_Goods from "@/api/goods";
+import * as API_CollectingAccount from "@/api/collectingAccount";
 export default {
   name: "goodsExchangeAdd",
   data() {
@@ -321,8 +404,13 @@ export default {
       }
     };
     return {
+      //分页
+      params: {
+        page_no: 1,
+        page_size: 10,
+      },
       typeList: [
-     /*    {
+        /*    {
           real_name: "采购入库",
           id: "采购入库",
         },
@@ -427,6 +515,18 @@ export default {
       goodsData: [],
       // 暂存已勾选商品
       goodsList: [],
+      //订单列表
+      orderVisible: false,
+      deliveryTypeList: [
+        {
+          code: "express",
+          name: "快递配送",
+        },
+        {
+          code: "self_pick",
+          name: "门店自提",
+        },
+      ],
     };
   },
   mounted() {
@@ -481,29 +581,122 @@ export default {
     ...mapGetters(["user"]),
   },
   methods: {
-    /* 入库类型回显 */
+    orderBtn() {
+      API_order.getOrderList(this.params).then((res) => {
+        this.orderList = res;
+        this.orderVisible = true;
+      });
+    },
+    closeOrder(){
+      this.orderVisible = false;
+    },
+     /** 分页大小发生改变 */
+     handlePageSizeChange(size) {
+      this.params.page_size = size;
+     API_order.getOrderList(this.params).then((res) => {
+        this.orderList = res;
+      });
+    },
+    /** 分页页数发生改变 */
+    handlePageCurrentChange(page) {
+      this.params.page_no = page;
+     API_order.getOrderList(this.params).then((res) => {
+        this.orderList = res;
+      });
+    },
+    /* 订单客户信息 */
+    memberType(val) {
+      let name = "";
+      API_BasicSetting.customer(this.params).then((response) => {
+        response.data.map((el) => {
+          if (el.id == val) {
+            return (name = el.name);
+          }
+        });
+        return name;
+      });
+    },
+    //获取仓库名称
+    warehouseName(val) {
+      let name = "";
+      this.warehouseList.map((el) => {
+        if (el.id == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
+    },
+    //配送方式名称
+    deliveryType(val) {
+      let name = "";
+      this.deliveryTypeList.map((el) => {
+        if (el.code == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
+    },
+    //获取付款方式
+    payType(val) {
+      let name = "";
+      API_CollectingAccount.getList({
+        page_no: 1,
+        page_size: -1,
+        enable_flag: true,
+      }).then((response) => {
+        response.data.map((el) => {
+          if (el.id == val) {
+            return (name = el.name);
+          }
+        });
+        return name;
+      });
+    },
+    //获取订单状态大小写转换.toUpperCase()
+    typeName(val) {
+      let name = "";
+      this.$nextTick(() => {
+        API_Setting.getPage({ dictType: "order_status" }).then((res) => {
+          res.data.map((el) => {
+            if (el.value == val) {
+              name = el.label;
+              console.log(name);
+              return name;
+            }
+          });
+        });
 
+      });
+    },
     // 根据条码 序列号查询商品
-    blurCode(){
-      if(this.scanGoodsForm.bar_code!==undefined || this.scanGoodsForm.sn_code!==undefined){
+    blurCode() {
+      if (
+        this.scanGoodsForm.bar_code !== undefined ||
+        this.scanGoodsForm.sn_code !== undefined
+      ) {
         // 通过列表查询商品详细信息
-        API_Goods.getGoodsList({barcode:this.scanGoodsForm.bar_code,sncode:this.scanGoodsForm.sn_code}).then(res=>{
+        API_Goods.getGoodsList({
+          barcode: this.scanGoodsForm.bar_code,
+          sncode: this.scanGoodsForm.sn_code,
+        }).then((res) => {
           console.log(res);
-          this.goodsExchangeAddForm.contract_product_list=res.data
-          this.scanDialogVisible=false
-        })
+          this.goodsExchangeAddForm.contract_product_list = res.data;
+          this.scanDialogVisible = false;
+        });
       }
     },
     // 查询订单编号
-    blurUsername(){
-      if(this.goodsExchangeAddForm.sn!==undefined){
-        API_order.getOrderList({sn:this.goodsExchangeAddForm.order_id}).then(res=>{
-          console.log(res.data);
-          if(res.data.length!==0) return
-          this.goodsExchangeAddForm.order_id= Number(res.data[0].id)
-          this.goodsExchangeAddForm.contract_product_list=res.data
-        })
-      }/* else{
+    blurUsername() {
+      if (this.goodsExchangeAddForm.sn !== undefined) {
+        API_order.getOrderList({ sn: this.goodsExchangeAddForm.order_id }).then(
+          (res) => {
+            console.log(res.data);
+            if (res.data.length !== 0) return;
+            this.goodsExchangeAddForm.order_id = Number(res.data[0].id);
+            this.goodsExchangeAddForm.contract_product_list = res.data;
+          }
+        );
+      } /* else{
         this.$message.error("请填写订单编号")
       } */
     },
@@ -539,10 +732,9 @@ export default {
           console.log(res);
 
          }) */
-         this.goodsExchangeAddForm.product_list = this.goodsList;
-         console.log(this.goodsExchangeAddForm.product_list);
-          this.goodsVisible = false;
-
+        this.goodsExchangeAddForm.product_list = this.goodsList;
+        console.log(this.goodsExchangeAddForm.product_list);
+        this.goodsVisible = false;
       } else {
         this.$message.error("请选择商品信息");
       }
@@ -658,20 +850,22 @@ export default {
       API_BasicSetting.getWarehouseListAll().then((response) => {
         this.warehouseList = response;
       });
-      API_Setting.getPage({dictType:"warehouse_entry_type"}).then(res=>{
-        this.typeList=res.data
-      })
+      API_Setting.getPage({ dictType: "warehouse_entry_type" }).then((res) => {
+        this.typeList = res.data;
+      });
     },
     //保存
-    savegoodsExchangeAddForm(){
+    savegoodsExchangeAddForm() {
       this.$refs["goodsExchangeAddForm"].validate((valid) => {
         if (valid) {
           const { id } = this.goodsExchangeAddForm;
           const params = this.MixinClone(this.goodsExchangeAddForm);
           params.handled_by = this.deptListAll;
-          API_order.getOrderList({sn:this.goodsExchangeAddForm.sn}).then(res=>{
-              params.order_id= Number(res.data[0].id)
-            })
+          API_order.getOrderList({ sn: this.goodsExchangeAddForm.sn }).then(
+            (res) => {
+              params.order_id = Number(res.data[0].id);
+            }
+          );
           params.staff_name = this.goodsExchangeAddForm.distribution_name;
           if (params.warehouse_id) {
             params.warehouse_name = this.warehouseList.find(
@@ -685,22 +879,27 @@ export default {
           }
           params.change_time = Math.floor(params.change_time / 1000);
           //类型
-          params.save_or_submit="save"
+          params.save_or_submit = "save";
           if (!params.product_list.length) {
             this.$message.error("请选择商品!");
             return;
           }
           if (this.$route.name === "editInventory") {
-            API_GoodsExchange.editWarehouseEntry(id,params).then((response) => {
-              this.$message.success("修改成功!");
-              const { callback } = this.$route.params;
-              if (typeof callback === "function") callback();
-              this.$store.dispatch("delCurrentViews", {
-                view: this.$route,
-                $router: this.$router,
-              });
-              this.$router.push({ name: "goodsExchange",params: { type: "second" }, });
-            });
+            API_GoodsExchange.editWarehouseEntry(id, params).then(
+              (response) => {
+                this.$message.success("修改成功!");
+                const { callback } = this.$route.params;
+                if (typeof callback === "function") callback();
+                this.$store.dispatch("delCurrentViews", {
+                  view: this.$route,
+                  $router: this.$router,
+                });
+                this.$router.push({
+                  name: "goodsExchange",
+                  params: { type: "second" },
+                });
+              }
+            );
           } else if (this.$route.name === "addInventory") {
             // 新增入库
             API_GoodsExchange.warehouseEntry(params).then(() => {
@@ -711,7 +910,10 @@ export default {
                 view: this.$route,
                 $router: this.$router,
               });
-              this.$router.push({ name: "goodsExchange",params: { type: "second" }, });
+              this.$router.push({
+                name: "goodsExchange",
+                params: { type: "second" },
+              });
             });
           }
         }
@@ -724,10 +926,12 @@ export default {
           const { id } = this.goodsExchangeAddForm;
           const params = this.MixinClone(this.goodsExchangeAddForm);
           params.handled_by = this.deptListAll;
-          API_order.getOrderList({sn:this.goodsExchangeAddForm.sn}).then(res=>{
+          API_order.getOrderList({ sn: this.goodsExchangeAddForm.sn }).then(
+            (res) => {
               console.log(res.data);
-              params.order_id= Number(res.data[0].id)
-            })
+              params.order_id = Number(res.data[0].id);
+            }
+          );
           params.staff_name = this.goodsExchangeAddForm.distribution_name;
           if (params.warehouse_id) {
             params.warehouse_name = this.warehouseList.find(
@@ -740,13 +944,13 @@ export default {
             ).real_name;
           }
           params.change_time = Math.floor(params.change_time / 1000);
-          params.save_or_submit="submit"
+          params.save_or_submit = "submit";
           if (!params.product_list.length) {
             this.$message.error("请选择商品!");
             return;
           }
-         /* */ if (this.$route.name === "editInventory") {
-          /* params.contract_product_list.map(el=>{
+          /* */ if (this.$route.name === "editInventory") {
+            /* params.contract_product_list.map(el=>{
             el.product_id=el.id
             el.goods_id=el.id
           })
@@ -754,16 +958,21 @@ export default {
             el.product_id=el.id
             el.goods_id=el.id
           }) */
-            API_GoodsExchange.editWarehouseEntry(id,params).then((response) => {
-              this.$message.success("修改成功!");
-              const { callback } = this.$route.params;
-              if (typeof callback === "function") callback();
-              this.$store.dispatch("delCurrentViews", {
-                view: this.$route,
-                $router: this.$router,
-              });
-              this.$router.push({ name: "goodsExchange",params: { type: "second" }, });
-            });
+            API_GoodsExchange.editWarehouseEntry(id, params).then(
+              (response) => {
+                this.$message.success("修改成功!");
+                const { callback } = this.$route.params;
+                if (typeof callback === "function") callback();
+                this.$store.dispatch("delCurrentViews", {
+                  view: this.$route,
+                  $router: this.$router,
+                });
+                this.$router.push({
+                  name: "goodsExchange",
+                  params: { type: "second" },
+                });
+              }
+            );
           } else if (this.$route.name === "addInventory") {
             // 新增入库
             API_GoodsExchange.warehouseEntry(params).then(() => {
@@ -774,7 +983,10 @@ export default {
                 view: this.$route,
                 $router: this.$router,
               });
-              this.$router.push({ name: "goodsExchange",params: { type: "second" }, });
+              this.$router.push({
+                name: "goodsExchange",
+                params: { type: "second" },
+              });
             });
           }
         }
@@ -817,24 +1029,24 @@ export default {
     // 选择出库单
     async handleSelectWarehouseEntryBatch() {
       if (!this.goodsExchangeAddForm.warehouse_id) {
-        this.$message.error('请先选择仓库!')
-        return
+        this.$message.error("请先选择仓库!");
+        return;
       }
-      API_GoodsExchange.getGoodsInfo().then((res) => {
-        let item={}
-        res.map(el=>{
-          item.sn=el.goods_vo.sn
-          item.name=el.goods_vo.name
+      API_GoodsExchange.getGoodsInfo(this.params).then((res) => {
+        let item = {};
+        res.map((el) => {
+          item.sn = el.goods_vo.sn;
+          item.name = el.goods_vo.name;
           /* item. */
-          return item
-        })
+          return item;
+        });
         this.goodsData = res;
         this.goodsVisible = true;
       });
-      /*// if (!this.goodsExchangeAddForm.warehouse_id) {
-      //   this.$message.error('请先选择仓库!')
-      //   return
-      // }
+      /* if (!this.goodsExchangeAddForm.warehouse_id) {
+          this.$message.error('请先选择仓库!')
+          return
+        }
        const goodsData = await this.$EnwarehouseEntryBatch({
         goodsApi: "/admin/erp/goods",
         warehouseList: this.warehouseList,
@@ -850,7 +1062,6 @@ export default {
       this.goodsExchangeAddForm.warehouse_id = goodsData.warehouse_id;
       this.goodsExchangeAddForm.product_list = goodsData.purchasePlans.map(
         (item) => {
-          //
           item.amount = item.entry_price;
           item.product_sn = item.product_sn;
           item.product_name = item.product_name;
@@ -927,7 +1138,7 @@ export default {
           );
           this.goodsExchangeAddForm.distribution_name = response.staff_name;
           this.goodsExchangeAddForm.product_list =
-            response.product_list/* .map((item) => {
+            response.product_list; /* .map((item) => {
               //change_list
               item.name=item.goods_do.name
               item.sn=item.goods_do.sn
@@ -939,7 +1150,7 @@ export default {
               item.warehouse_entry_sn = item.stock_sn;
               return item;
             }); */
-         /*  this.goodsExchangeAddForm.return_list = response.return_list.map(
+          /*  this.goodsExchangeAddForm.return_list = response.return_list.map(
             (item) => {
               item.product_price = item.amount;
               item.product_specification = item.specification;

+ 14 - 18
manager-admin/src/views/stock/goodsExchange/goodsExchangeAdd.vue

@@ -154,26 +154,26 @@
           >
             <el-table-column label="商品编号">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.sn }}
+                <span v-if="id">{{ scope.row.goods_vo.sn }}</span>
+                <span v-else>{{ scope.row.good_vo.sn }}</span>
               </template>
             </el-table-column>
             <el-table-column label="商品名称">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.name }}
+                <span v-if="id">{{ scope.row.goods_vo.name }}</span>
+                <span v-else>{{ scope.row.good_vo.name }}</span>
               </template>
             </el-table-column>
             <el-table-column label="条码">
               <template slot-scope="scope">
-                <!-- {{ scope.row.bar_code }} -->
                 <span v-if="id">{{ scope.row.product_vo.bar_code }}</span>
-                <span v-else>{{ scope.row.bar_code }}</span>
+                <span v-else>{{ scope.row.product_vo.bar_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="序列号">
               <template slot-scope="scope">
-                <!-- {{ scope.row.sn_code }} -->
                 <span v-if="id">{{ scope.row.product_vo.sn_code }}</span>
-                <span v-else>{{ scope.row.sn_code }}</span>
+                <span v-else>{{ scope.row.product_vo.sn_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="规格型号" v-if="id">
@@ -183,13 +183,13 @@
             </el-table-column>
             <el-table-column label="规格型号" v-else>
               <template slot-scope="scope">
-                {{ scope.row.spec_name.join("/") }}
+                {{ scope.row.product_vo.spec_name.join("/") }}
               </template>
             </el-table-column>
             <el-table-column label="单位">
               <template slot-scope="scope">
                 <span v-if="id">{{ scope.row.product_vo.unit }}</span>
-                <span v-else>{{ scope.row.unit }}</span>
+                <span v-else>{{ scope.row.product_vo.unit }}</span>
               </template>
             </el-table-column>
             <el-table-column label="出库数量">
@@ -208,7 +208,7 @@
                 {{ scope.row.usable_stock }}
               </template>
             </el-table-column>
-            <el-table-column label="差异">
+            <el-table-column label="剩余数量">
               <template slot-scope="scope">
                 <!-- 入库减去库存  -->
                 {{ scope.row.usable_stock - scope.row.out_num || 0 }}
@@ -502,7 +502,6 @@ export default {
             return el;
           }
         });
-        console.log(this.typeList);
       });
     },
     /*//商品对应字段
@@ -538,9 +537,7 @@ export default {
     toSearch() {
       API_GoodsExchange.getGoodsInfo({
         barcode: this.scanGoodsForm.bar_code,
-      }).then((res) => {
-        console.log(res);
-      });
+      }).then((res) => {});
     },
     // 扫码入库
     scanCode() {
@@ -668,9 +665,9 @@ export default {
             this.$message.error("请选择商品!");
             return;
           }
-          params.product_list.map((el) => {
+          /* params.product_list.map((el) => {
             return (el.product_id = el.id);
-          });
+          }); */
           if (this.$route.name === "goodsExchangeEdit") {
             API_GoodsExchange.editWarehouseOut(id, params).then((response) => {
               this.$message.success("修改成功!");
@@ -724,9 +721,9 @@ export default {
             this.$message.error("请选择商品!");
             return;
           }
-          params.product_list.map((el) => {
+          /* params.product_list.map((el) => {
             return (el.product_id = el.id);
-          });
+          }); */
           if (this.$route.name === "goodsExchangeEdit") {
             API_GoodsExchange.editWarehouseOut(id, params).then((response) => {
               this.$message.success("修改成功!");
@@ -739,7 +736,6 @@ export default {
               this.$router.push({ name: "goodsExchange" });
             });
           } else if (this.$route.name === "goodsExchangeAdd") {
-            console.log(params);
             // 新增入库
             API_GoodsExchange.warehouseOut(params).then(() => {
               this.$message.success("添加成功!");

+ 0 - 1
manager-admin/src/views/stock/goodsInventory/goodsInventory.vue

@@ -390,7 +390,6 @@ export default {
       API_GoodsInventory.getGoodsInventoryList(this.params).then(response => {
         this.loading = false
         this.tableData = response
-        console.log(this.tableData);
       }).catch(() => { this.loading = false })
     }
   }

+ 9 - 9
manager-admin/src/views/stock/goodsInventory/goodsInventoryAdd.vue

@@ -54,35 +54,37 @@
             :header-cell-style="{ textAlign: 'center' }" style="width: 100%; margin-top: 20px;">
             <el-table-column label="商品编号">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.sn }}
+                <span v-if="id"> {{ scope.row.goods_vo.sn }}</span>
+                <span v-else>{{ scope.row.good_vo.sn }}</span>
               </template>
             </el-table-column>
             <el-table-column label="商品名称">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.name }}
+                <span v-if="id">{{ scope.row.goods_vo.name }}</span>
+                <span v-else>{{ scope.row.good_vo.name }}</span>
               </template>
             </el-table-column>
             <el-table-column label="条码">
               <template slot-scope="scope">
-                <span v-if="!id"> {{ scope.row.bar_code }}</span>
+                <span v-if="!id"> {{ scope.row.product_vo.bar_code }}</span>
               <span v-else> {{ scope.row.product_vo.bar_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="序列号">
               <template slot-scope="scope">
-                <span v-if="!id"> {{ scope.row.sn_code }}</span>
+                <span v-if="!id"> {{ scope.row.product_vo.sn_code }}</span>
               <span v-else> {{ scope.row.product_vo.sn_code }}</span>
               </template>
             </el-table-column>
             <el-table-column label="规格型号">
               <template slot-scope="scope">
-                <span v-if="!id">{{ scope.row.spec_name.join("/") }}</span>
+                <span v-if="!id">{{ scope.row.product_vo.spec_name.join("/") }}</span>
               <span v-else>{{ scope.row.product_vo.spec_name.join("/") }}</span>
               </template>
             </el-table-column>
             <el-table-column label="单位">
               <template slot-scope="scope">
-                <span v-if="!id"> {{ scope.row.unit }}</span>
+                <span v-if="!id"> {{ scope.row.product_vo.unit }}</span>
               <span v-else> {{ scope.row.product_vo.unit }}</span>
               </template>
             </el-table-column>
@@ -302,9 +304,9 @@ export default {
               inventory_num: item.inventory_num * 1,
               product_name: item.product_name,
               product_sn: item.product_sn,
+              product_id:item.product_id,
               specification: item.product_specification,
               unit: item.product_unit,
-              product_id: item.id,
               remark: item.remark
             }
             return query
@@ -355,7 +357,6 @@ export default {
         }
         return query
       })
-      console.log(goodsData);
       this.goodsInventoryAddForm.product_list = goodsData.purchasePlans
       /* this.getlistProductLendNum(ProductLendNum, goodsData.purchasePlans) */
     },
@@ -388,7 +389,6 @@ export default {
     /** 获取详情页面数据 */
     GET_goodsInventoryAddDetail() {
       API_GoodsInventory.getGoodsInventoryInfo(this.id).then(response => {
-        console.log(response);
         /* response.product_list.map(el => {
             el.allow_sn=el.goods_vo.allow_sn
             el.bar_code=el.goods_vo.bar_code

+ 8 - 8
manager-admin/src/views/stock/goodsInventoryLoss/goodsInventoryLossAdd.vue

@@ -55,25 +55,27 @@
                 {{ scope.row.stock_sn }}
               </template>
             </el-table-column> -->
-            <el-table-column label="商品编号">
+          <el-table-column label="商品编号">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.sn }}
+                <span v-if="id"> {{ scope.row.goods_vo.sn }}</span>
+                <span v-else>{{ scope.row.good_vo.sn }}</span>
               </template>
             </el-table-column>
             <el-table-column label="商品名称">
               <template slot-scope="scope">
-                {{ scope.row.goods_vo.name }}
+                <span v-if="id">{{ scope.row.goods_vo.name }}</span>
+                <span v-else>{{ scope.row.good_vo.name }}</span>
               </template>
             </el-table-column>
             <el-table-column label="规格型号">
               <template slot-scope="scope">
-                <span v-if="!id">{{ scope.row.spec_name.join("/") }}</span>
+                <span v-if="!id">{{ scope.row.product_vo.spec_name.join("/") }}</span>
               <span v-else>{{ scope.row.product_vo.spec_name.join("/") }}</span>
               </template>
             </el-table-column>
             <el-table-column label="单位">
               <template slot-scope="scope">
-                <span v-if="!id"> {{ scope.row.unit }}</span>
+                <span v-if="!id"> {{ scope.row.product_vo.unit }}</span>
               <span v-else> {{ scope.row.product_vo.unit }}</span>
               </template>
             </el-table-column>
@@ -304,7 +306,7 @@ export default {
           params.product_list = params.product_list.map(item => {
             const query = {
               report_num:item.report_num,
-              product_id: item.id,
+              product_id: item.product_id,
             }
             return query
           })
@@ -347,7 +349,6 @@ export default {
         purchasePlanApiParams: { warehouse_id: this.goodsInventoryAddForm.warehouse_id }
       })
       this.goodsInventoryAddForm.warehouse_id = goodsData.warehouse_id
-      console.log(goodsData);
       this.goodsInventoryAddForm.product_list = goodsData.purchasePlans
      /*  .map(item => {
         const query = {
@@ -369,7 +370,6 @@ export default {
         }
         return query
       }) */
-      console.log(this.goodsInventoryAddForm.product_list);
     },
     /** 获取部门 */
     GET_DeptList() {

+ 14 - 10
manager-admin/src/views/stock/goodsUnderstockAdd.vue

@@ -63,9 +63,9 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="备注" prop="remark" >
+      <el-form-item label="备注" prop="remark">
         <el-input
-        :disabled="type === 'detail'"
+          :disabled="type === 'detail'"
           type="textarea"
           :rows="2"
           placeholder="请输入内容"
@@ -101,35 +101,39 @@
         >
           <el-table-column label="商品编号">
             <template slot-scope="scope">
-              {{ scope.row.goods_vo.sn }}
+              <span v-if="id"> {{ scope.row.goods_vo.sn }}</span>
+              <span v-else>{{ scope.row.good_vo.sn }}</span>
             </template>
           </el-table-column>
           <el-table-column label="商品名称">
             <template slot-scope="scope">
-              {{ scope.row.goods_vo.name }}
+              <span v-if="id">{{ scope.row.goods_vo.name }}</span>
+              <span v-else>{{ scope.row.good_vo.name }}</span>
             </template>
           </el-table-column>
           <el-table-column label="条码">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.bar_code }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.bar_code }}</span>
               <span v-else> {{ scope.row.product_vo.bar_code }}</span>
             </template>
           </el-table-column>
           <el-table-column label="序列号">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.sn_code }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.sn_code }}</span>
               <span v-else> {{ scope.row.product_vo.sn_code }}</span>
             </template>
           </el-table-column>
           <el-table-column label="规格型号">
             <template slot-scope="scope">
-              <span v-if="!id">{{ scope.row.spec_name.join("/") }}</span>
+              <span v-if="!id">{{
+                scope.row.product_vo.spec_name.join("/")
+              }}</span>
               <span v-else>{{ scope.row.product_vo.spec_name.join("/") }}</span>
             </template>
           </el-table-column>
           <el-table-column label="单位">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.unit }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.unit }}</span>
               <span v-else> {{ scope.row.product_vo.unit }}</span>
             </template>
           </el-table-column>
@@ -241,7 +245,7 @@ export default {
       this.GoodsTransferForm.dept_id = this.user.dept_id;
       /* this.$set(this.GoodsTransferForm, "transfer_time", new Date().getTime()); */
     } else if (this.$route.name === "goodsUnderstockDetail") {
-      this.id=this.$route.params.id
+      this.id = this.$route.params.id;
       this.type = "detail";
     }
     if (this.$route.params.id) {
@@ -330,7 +334,7 @@ export default {
             const query = {
               num: item.num,
               use_able_num: Number(item.usable_stock),
-              product_id: item.id,
+              product_id: item.product_id,
             };
             return query;
           });

+ 97 - 82
manager-admin/src/views/stock/order.vue

@@ -53,7 +53,10 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="订单编号">
-             <el-input v-model="advancedForm.sn" placeholder="请输入订单编号"></el-input>
+              <el-input
+                v-model="advancedForm.sn"
+                placeholder="请输入订单编号"
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -129,18 +132,16 @@
         </div> -->
       </div>
       <template slot="table-columns">
-        <el-table-column
-          type="selection"
-          width="55"
-
-        />
+        <el-table-column type="selection" width="55" />
         <el-table-column prop="sn" label="订单编号">
           <template slot-scope="scope">
             {{ scope.row.sn }}
           </template>
         </el-table-column>
         <el-table-column label="客户">
-          <template slot-scope="scope">{{ memberType(scope.row.member_id) }}</template>
+          <template slot-scope="scope">{{
+            memberType(scope.row.member_id)
+          }}</template>
         </el-table-column>
         <el-table-column label="下单时间">
           <template slot-scope="scope">{{
@@ -149,14 +150,18 @@
         </el-table-column>
         <el-table-column prop="warehouse_id" label="仓库名称">
           <template slot-scope="scope">
-            {{warehouseName(scope.row.warehouse_id) }}
+            {{ warehouseName(scope.row.warehouse_id) }}
           </template>
         </el-table-column>
         <el-table-column prop="send_type" label="配送方式">
-          <template slot-scope="scope">{{ deliveryType(scope.row.send_type) }}</template>
+          <template slot-scope="scope">{{
+            deliveryType(scope.row.send_type)
+          }}</template>
         </el-table-column>
         <el-table-column prop="pay_type" label="付款方式">
-          <template slot-scope="scope">{{payType(scope.row.pay_type)  }}</template>
+          <template slot-scope="scope">{{
+            payType(scope.row.pay_type)
+          }}</template>
         </el-table-column>
         <el-table-column prop="status" label="实付金额">
           <template slot-scope="scope">{{
@@ -165,7 +170,7 @@
         </el-table-column>
         <el-table-column prop="status" label="订单状态">
           <template slot-scope="scope">
-            {{typeName(scope.row.status)  }}
+            {{ typeName(scope.row.status) }}
           </template>
         </el-table-column>
         <!-- <el-table-column prop="status" label="订单状态">
@@ -173,15 +178,22 @@
         </el-table-column> -->
         <el-table-column label="操作" width="250">
           <template slot-scope="scope">
-            <el-button size="mini"
-                       @click="handleAudit(scope.row)">查看</el-button>
-             <el-button size="mini" type="success"
-             v-if="scope.row.status==='TO_BE_COMMIT'"
-                       @click="handleSubmit(scope.row.id)">确认</el-button>
-           <!-- <el-button size="mini" type="danger" v-if="scope.row.allowable.withdraw && checkPermission(['order:withdraw'])"
+            <el-button size="mini" @click="handleAudit(scope.row)"
+              >查看</el-button
+            >
+            <el-button
+              size="mini"
+              type="success"
+              v-if="scope.row.status === 'TO_BE_COMMIT'"
+              @click="handleSubmit(scope.row.id)"
+              >确认</el-button
+            >
+            <!-- <el-button size="mini" type="danger" v-if="scope.row.allowable.withdraw && checkPermission(['order:withdraw'])"
                        @click="handleWithdraw(scope.row.id)">撤回</el-button> -->
-            <el-button size="mini" @click="handleEdit(scope.row)"
-            v-if="scope.row.status==='TO_BE_COMMIT'"
+            <el-button
+              size="mini"
+              @click="handleEdit(scope.row)"
+              v-if="scope.row.status === 'TO_BE_COMMIT'"
               >编辑</el-button
             >
             <!-- <el-button size="mini" type="primary" v-if="scope.row.allowable.payment && checkPermission(['order:payment'])"
@@ -208,8 +220,8 @@
 <script>
 import * as API_order from "@/api/order";
 import Storage from "@/utils/storage";
-import * as API_BasicSetting from '@/api/basicSetting'
-import * as API_Setting from '@/api/setting'
+import * as API_BasicSetting from "@/api/basicSetting";
+import * as API_Setting from "@/api/setting";
 import * as API_CollectingAccount from "@/api/collectingAccount";
 export default {
   name: "orderList",
@@ -241,7 +253,7 @@ export default {
 
       accessToken: Storage.getItem("seller_access_token"),
       multipleSelection: [],
-      orderType:[],
+      orderType: [],
       collectingAccountList: [], // 支付方式列表
       deliveryTypeList: [
         {
@@ -253,13 +265,13 @@ export default {
           name: "门店自提",
         },
       ],
-      customerList:[],
+      customerList: [],
     };
   },
   mounted() {
     this.GET_OrderList();
-    this.GET_WarehouseList()
-    this.GET_CollectingAccountList()
+    this.GET_WarehouseList();
+    this.GET_CollectingAccountList();
     this.GET_CustomerList();
   },
   activated() {
@@ -281,17 +293,17 @@ export default {
     next();
   },
   methods: {
-    memberType(val){
-      let name=''
-      this.customerList.map(el=>{
-       if(el.id==val) {
-        return name=el.name
-       }
-      })
-      return name
+    memberType(val) {
+      let name = "";
+      this.customerList.map((el) => {
+        if (el.id == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
     },
-     //获取客户列表
-     GET_CustomerList() {
+    //获取客户列表
+    GET_CustomerList() {
       API_BasicSetting.customer(this.params)
         .then((response) => {
           this.customerList = response.data;
@@ -299,27 +311,27 @@ export default {
         .catch(() => {});
     },
     //配送方式查看
-    deliveryType(val){
-      let name=''
-      this.deliveryTypeList.map(el=>{
-       if(el.code==val) {
-        return name=el.name
-       }
-      })
-      return name
+    deliveryType(val) {
+      let name = "";
+      this.deliveryTypeList.map((el) => {
+        if (el.code == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
     },
     //获取付款方式
-    payType(val){
-      let name=''
-      this.collectingAccountList.map(el=>{
-       if(el.id==val) {
-        return name=el.name
-       }
-      })
-      return name
+    payType(val) {
+      let name = "";
+      this.collectingAccountList.map((el) => {
+        if (el.id == val) {
+          return (name = el.name);
+        }
+      });
+      return name;
     },
-     /** 获取支付方式列表 */
-     GET_CollectingAccountList() {
+    /** 获取支付方式列表 */
+    GET_CollectingAccountList() {
       API_CollectingAccount.getList({
         page_no: 1,
         page_size: -1,
@@ -329,24 +341,27 @@ export default {
       });
     },
     //获取订单状态大小写转换.toUpperCase()
-    typeName(val){
-      let name=''
-      this.orderType.map(el=>{
-       if(el.value==val) {
-        return name=el.label
-       }
-      })
-      return name
+    typeName(val) {
+      let name = "";
+      this.orderType.map((el) => {
+        if (el.value == val) {
+          return (name = el.label);
+        }
+      });
+      return name;
     },
     //获取仓库名称
-    warehouseName(val){
-      let name=''
-      this.warehouseList.map(el=>{
-       if(el.id==val) {
-        return name=el.name
-       }
-      })
-      return name
+    warehouseName(val) {
+      let name = [];
+      this.warehouseList.map((el) => {
+        val.map((e) => {
+          if (el.id == e) {
+            return name.push(el.name)
+          }
+        });
+      });
+
+      return name.join('/');
     },
     batchOutbound() {
       if (this.multipleSelection.length === 0) {
@@ -360,14 +375,14 @@ export default {
         params: { orderIds: orderIds },
       });
     },
-      /** 获取仓库 */
-      GET_WarehouseList() {
-      API_BasicSetting.getWarehouseListAll().then(response => {
-        this.warehouseList = response
-      })
-      API_Setting.getPage({dictType:"order_status"}).then(res=>{
-        this.orderType=res.data
-      })
+    /** 获取仓库 */
+    GET_WarehouseList() {
+      API_BasicSetting.getWarehouseListAll().then((response) => {
+        this.warehouseList = response;
+      });
+      API_Setting.getPage({ dictType: "order_status" }).then((res) => {
+        this.orderType = res.data;
+      });
     },
     /** 计算高度 */
     countTableHeight() {
@@ -385,7 +400,7 @@ export default {
       });
     },
     /** 是否可以出库 */
-   /*  canWarehouseOut(row) {
+    /*  canWarehouseOut(row) {
       return row.allowable.warehouse_out;
     }, */
 
@@ -489,13 +504,13 @@ export default {
 </script>
 
 <style type="text/scss" lang="scss" scoped>
-.btn{
+.btn {
   display: flex;
-    justify-content: flex-end;
+  justify-content: flex-end;
   padding: 30px 20px 5px;
   border-radius: 5px;
   background-color: #fff;
-  .el-button{
+  .el-button {
     width: 100px;
   }
 }
@@ -512,7 +527,7 @@ export default {
       }
     }
   }
-  .el-button{
+  .el-button {
     margin-top: -19px;
     margin-left: 20px;
   }

+ 62 - 19
manager-admin/src/views/stock/orderAdd.vue

@@ -104,15 +104,24 @@
             :rules="rules.pay_price"
           >
             <span>{{ "¥" + price }}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="10">
+          <el-form-item
+            label="实付金额:"
+            prop="pay_price"
+            :rules="rules.pay_price"
+          >
+          <!-- @input="validateNumber" -->
             <span
               >折扣:<el-input
                 placeholder="请输入"
                 v-model="discount"
-                onKeyUp="value=value.replace(/^((0\.[1-9]{1})|(([1-9]{1})(\.\d{1})?))$/,'')"
+
                 style="width: 70px"
               ></el-input>
             </span>
-            <span>实付金额:</span>
+            <span>折后金额:</span>
             <el-input
               v-model="OrderForm.real_price"
               placeholder="请输入"
@@ -162,6 +171,7 @@
             <el-select
               @change="cleanGoodsList"
               v-model="OrderForm.warehouse_id"
+              multiple
               clearable
             >
               <el-option
@@ -231,37 +241,42 @@
           style="width: 95%"
         >
           <el-table-column type="selection" width="40" align="center" />
+          <el-table-column label="仓库名称">
+            <template slot-scope="scope">
+              {{ warehouseName(scope.row.warehouse_id) }}
+            </template>
+          </el-table-column>
           <el-table-column label="商品编号">
             <template slot-scope="scope">
-              {{ scope.row.goods_vo.sn }}
+              {{ scope.row.good_vo.sn }}
             </template>
           </el-table-column>
           <el-table-column label="商品名称">
             <template slot-scope="scope">
-              {{ scope.row.goods_vo.name }}
+              {{ scope.row.good_vo.name }}
             </template>
           </el-table-column>
           <el-table-column label="条码">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.bar_code }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.bar_code }}</span>
               <span v-else> {{ scope.row.product_vo.bar_code }}</span>
             </template>
           </el-table-column>
           <el-table-column label="序列号">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.sn_code }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.sn_code }}</span>
               <span v-else> {{ scope.row.product_vo.sn_code }}</span>
             </template>
           </el-table-column>
           <el-table-column label="规格型号">
             <template slot-scope="scope">
-              <span v-if="!id">{{ scope.row.spec_name.join("/") }}</span>
+              <span v-if="!id">{{ scope.row.product_vo.spec_name.join("/") }}</span>
               <span v-else>{{ scope.row.product_vo.spec_name.join("/") }}</span>
             </template>
           </el-table-column>
           <el-table-column label="单位">
             <template slot-scope="scope">
-              <span v-if="!id"> {{ scope.row.unit }}</span>
+              <span v-if="!id"> {{ scope.row.product_vo.unit }}</span>
               <span v-else> {{ scope.row.product_vo.unit }}</span>
             </template>
           </el-table-column>
@@ -409,6 +424,7 @@
           :loading="formLoading"
           >确认并保存</el-button
         >
+        <el-button @click="printIng" :disabled="false" v-if="isDetail">打印</el-button>
         <!-- <el-button type="primary" :disabled="false" @click="handleAudit(true)" v-if="isDetail && checkPermission(['order:audit']) && OrderForm.allowable.audit">审核通过</el-button>
       <el-button type="danger" :disabled="false" @click="handleAudit(false)" v-if="isDetail && checkPermission(['order:audit']) && OrderForm.allowable.audit">审核驳回</el-button> -->
         <el-button @click="roBack()" :disabled="false">返回</el-button>
@@ -536,7 +552,7 @@ export default {
     return {
       brcode: false,
       options: regionData,
-      selectedOptions: [""],
+      selectedOptions: [],
       warehouseList: [], // 仓库列表
       memberList: [], // 会员列表
       marketingList: [], // 销售经理列表
@@ -561,6 +577,7 @@ export default {
         //详细信息
         address: "",
         province_city_area_address: "",
+        warehouse_id:[],
       },
       formLoading: false,
       isDetail: undefined,
@@ -762,6 +779,22 @@ export default {
     this.GET_CustomerList();
   },
   methods: {
+    // 打印功能
+    printIng() {},
+  /*   validateNumber(){
+      const regex = '/^(?:[0-9]|10(?:\.0{1,2})?)$/';
+     return regex.test(this.discount)
+    }, */
+    //获取仓库名称
+    warehouseName(val){
+      let name=''
+      this.warehouseList.map(el=>{
+       if(el.id==val) {
+        return name=el.name
+       }
+      })
+      return name
+    },
     /** dialog打开后重置form表单校验结果 */
     handleDialogOpen() {
       setTimeout(() => {
@@ -882,15 +915,22 @@ export default {
     },
     // 选择批次商品
     async handleSelectGoods() {
-      if (!this.OrderForm.warehouse_id) {
-        this.$message.error("请先选择仓库!");
+      if(!this.OrderForm.type){
+        this.$message.error("请选择订单类型!");
+        return
+      }
+      if (this.OrderForm.warehouse_id.length==0) {
+        this.$message.error("请选择仓库!");
         return;
       }
-
+      let warehouse_ids=this.OrderForm.warehouse_id.join(',')
+      console.log(this.OrderForm.warehouse_id);
       const goodsData = await this.$EnPickerGoods({
-        goodsApi: `/admin/erp/warehouseOut/getGoodByWarehouse/${this.OrderForm.warehouse_id}/${this.OrderForm.type}`,
+        goodsApi:`/admin/erp/warehouseOut/getGoodByWarehouse/warehouseIdAndOrderType/${this.OrderForm.type}/${warehouse_ids}`,
+       // goodsApi: `/admin/erp/warehouseOut/getGoodByWarehouse/warehouseIdAndOrderType`,
         selectedIds: this.OrderForm.product_list.map((item) => item.product_id),
-        goodsApiParams: { order_type: this.OrderForm.type },
+        //goodsApiParams: { order_type: this.OrderForm.type,warehouse_ids:arr },
+
       });
 
       this.OrderForm.product_list = goodsData;
@@ -1032,7 +1072,7 @@ export default {
       this.OrderForm.province_city_area_address = loc + this.OrderForm.address;
       const params = this.MixinClone(this.OrderForm);
       params.product_list = params.product_list.map((el) => {
-        el.product_id = el.id;
+        el.product_stock_id = el.id;
         el.id = "";
         return el;
       });
@@ -1096,7 +1136,7 @@ export default {
       this.OrderForm.province_city_area_address = loc + this.OrderForm.address;
       const params = this.MixinClone(this.OrderForm);
       params.product_list = params.product_list.map((el) => {
-        el.product_id = el.id;
+        el.product_stock_id = el.id;
         el.id = "";
         return el;
       });
@@ -1173,8 +1213,11 @@ export default {
     GET_OrderDetail() {
       API_Order.getOrderDetail(this.id).then((response) => {
         /**/ this.price = response.price;
-        response.product_list = response.item_list; /* .map((el) => {
-          el.allow_sn = el.goods_vo.allow_sn;
+        response.product_list = response.item_list.map(el=>{
+          el.good_vo=el.goods_vo
+          return el
+        }); /* .map((el) => {
+          el.allow_sn = el.good_vo.allow_sn;
           el.bar_code = el.goods_vo.bar_code;
           el.brand_id = el.goods_vo.brand_id;
           el.brand_name = el.goods_vo.brand_name;
@@ -1248,7 +1291,7 @@ export default {
           return total;
         } else {
           this.OrderForm.product_list.map((item) => {
-            total += item.price * item.num;
+            total += item.product_vo.price * item.num;
           });
           return total;
         }

+ 246 - 80
manager-admin/src/views/stock/orderOutbound.vue

@@ -13,7 +13,7 @@
               <el-form-item label="预约类型:" prop="appointment_type">
                 <el-select
                   v-model="deliveryForms.appointment_type"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                 >
                   <el-option
                     v-for="(item, index) in appointmentList"
@@ -34,7 +34,7 @@
                   v-model="deliveryForms.appointment_time"
                   type="datetime"
                   placeholder="选择日期时间"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   value-format="yyyy-MM-dd HH:mm:ss"
                 ></el-date-picker>
               </el-form-item>
@@ -51,7 +51,7 @@
                   :minlength="1"
                   :maxlength="20"
                   placeholder="请输入发货人姓名"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                 ></el-input>
               </el-form-item>
             </el-col>
@@ -61,7 +61,7 @@
                   v-model="deliveryForms.sender.phone"
                   :minlength="1"
                   :maxlength="20"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入手机号"
                 ></el-input> </el-form-item
             ></el-col>
@@ -71,13 +71,13 @@
                   size="large"
                   :options="options"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   v-model="selectedOptions"
                   @change="sendHandleChange"
                 >
                 </el-cascader>
                 <el-input
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   v-model="deliveryForms.sender.address"
                   placeholder="请输入"
                 ></el-input> </el-form-item
@@ -116,7 +116,7 @@
                   v-model="deliveryForms.receiver.name"
                   :minlength="1"
                   :maxlength="20"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入收货人姓名"
                 ></el-input>
               </el-form-item>
@@ -127,7 +127,7 @@
                   v-model="deliveryForms.receiver.phone"
                   :minlength="1"
                   :maxlength="20"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入手机号"
                 ></el-input> </el-form-item
             ></el-col>
@@ -137,7 +137,7 @@
                   size="large"
                   :options="options"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   v-model="receiverOptions"
                   @change="receiverChange"
                 >
@@ -145,7 +145,7 @@
                 <el-input
                   v-model="deliveryForms.receiver.address"
                   size="medium"
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入"
                 ></el-input> </el-form-item
             ></el-col>
@@ -211,7 +211,7 @@
             </el-table-column>
             <el-table-column label="库存数量">
               <template slot-scope="scope">
-                {{ scope.row.usable_stock }}
+                {{ scope.row.use_able_stock }}
               </template>
             </el-table-column>
           </el-table>
@@ -222,13 +222,16 @@
             <el-col :span="8">
               <el-form-item label="物品总重量:" prop="total_weight">
                 <el-input
-                  v-model="deliveryForms.total_weight"
+                  v-model.number="deliveryForms.total_weight"
                   :minlength="1"
                   :maxlength="20"
+                  type="number"
+                  max="50"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入物品总重量"
-                ></el-input>
+                  ><template slot="append">KG</template></el-input
+                >
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -238,9 +241,9 @@
                   :minlength="1"
                   :maxlength="20"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入物品总体积"
-                ></el-input>
+                ><template slot="append">m³</template></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -250,9 +253,10 @@
                   :minlength="1"
                   :maxlength="20"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   placeholder="请输入物品价格"
-                ></el-input>
+                  ><template slot="append">元</template></el-input
+                >
               </el-form-item>
             </el-col>
             <el-col :span="16">
@@ -261,7 +265,7 @@
                   v-model="deliveryForms.remark"
                   type="textarea"
                   clearable
-                  :disabled="outType == 'check'"
+                  :disabled="disabledType"
                   :autosize="{ minRows: 2, maxRows: 4 }"
                   placeholder="请输入备注"
                 ></el-input>
@@ -282,6 +286,7 @@
                 <el-button
                   @click="obtainOrder"
                   v-if="kdnCode == '' || kdnCode == undefined"
+                  :disabled="btnType"
                   >获取单号</el-button
                 >
               </el-form-item></el-col
@@ -289,7 +294,142 @@
           </el-row>
         </el-form>
       </div>
-
+      <div v-if="outType !== undefined &&(JSON.stringify(deliveryForms.create_order_fail)!=='{}'||JSON.stringify(deliveryForms.create_order_success)!=='{}') ">
+        <h3>物流状态:</h3>
+        <div class="steps-wrap" v-if="JSON.stringify(deliveryForms.create_order_fail)!=='{}'">
+          <el-steps class="steps" direction="vertical" process-status="finish">
+            <el-step
+              icon="el-icon-error"
+              :title="
+                deliveryForms.create_order_fail.orderStatus == 600
+                  ? '下单失败'
+                  : ''
+              "
+            >
+              <div slot="description">
+                <p class="row-remark">
+                  {{ deliveryForms.create_order_fail.remark }}
+                </p>
+                <p class="row-time">
+                  {{
+                    (deliveryForms.create_order_fail.requestTime / 1000)
+                      | unixToDate
+                  }}
+                </p>
+              </div>
+            </el-step>
+          </el-steps>
+        </div>
+        <div class="steps-wrap" v-else>
+          <el-steps
+            class="steps"
+            direction="vertical"
+            process-status="finish"
+            :active="0"
+          >
+            <el-step
+              icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.sign_in)!=='{}'"
+              :title="deliveryForms.sign_in.orderStatus == 402 ? '退回' : ''"
+            >
+              <div slot="description">
+                <p class="row-remark">{{ deliveryForms.sign_in.remark }}</p>
+                <p class="row-time">
+                  {{ (deliveryForms.sign_in.requestTime / 1000) | unixToDate }}
+                </p>
+              </div>
+            </el-step>
+            <el-step
+            icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.sign_in)!=='{}'"
+              :title="deliveryForms.sign_in.orderStatus == 401 ? '签收' : ''"
+            >
+              <div slot="description">
+                <p class="row-remark">{{ deliveryForms.sign_in.remark }}</p>
+                <p class="row-time">
+                  {{ (deliveryForms.sign_in.requestTime / 1000) | unixToDate }}
+                </p>
+              </div>
+            </el-step>
+            <el-step
+              icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.user_sending)!=='{}'"
+              :title="
+                deliveryForms.user_sending.orderStatus == 300 ? '配送中' : ''
+              "
+            >
+              <div slot="description">
+                <p class="row-remark">
+                  {{ deliveryForms.user_sending.remark }}
+                </p>
+                <p class="row-time">
+                  {{
+                    (deliveryForms.user_sending.requestTime / 1000) | unixToDate
+                  }}
+                </p>
+              </div>
+            </el-step>
+            <el-step
+              icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.user_arrives)!=='{}'"
+              :title="
+                deliveryForms.user_arrives.orderStatus == 202 ? '已取件' : ''
+              "
+            >
+              <div slot="description">
+                <p class="row-remark">
+                  {{ deliveryForms.user_arrives.remark }}
+                </p>
+                <p class="row-time">
+                  {{
+                    (deliveryForms.user_arrives.requestTime / 1000) | unixToDate
+                  }}
+                </p>
+              </div>
+            </el-step>
+            <el-step
+              icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.user_take_order)!=='{}'"
+              :title="
+                deliveryForms.user_take_order.orderStatus == 201 ? '已接单' : ''
+              "
+            >
+              <div slot="description">
+                <p class="row-remark">
+                  {{ deliveryForms.user_take_order.remark }}
+                </p>
+                <p class="row-time">
+                  {{
+                    (deliveryForms.user_take_order.requestTime / 1000)
+                      | unixToDate
+                  }}
+                </p>
+              </div>
+            </el-step>
+            <el-step
+              icon="el-icon-success"
+              v-if="JSON.stringify(deliveryForms.create_order_success)!=='{}'"
+              :title="
+                deliveryForms.create_order_success.orderStatus == 100
+                  ? '待接单'
+                  : ''
+              "
+            >
+              <div slot="description">
+                <p class="row-remark">
+                  {{ deliveryForms.create_order_success.remark }}
+                </p>
+                <p class="row-time">
+                  {{
+                    (deliveryForms.create_order_success.requestTime / 1000)
+                      | unixToDate
+                  }}
+                </p>
+              </div>
+            </el-step>
+          </el-steps>
+        </div>
+      </div>
       <!--  <el-divider></el-divider>
       <el-form
         :model="deliveryForms"
@@ -394,6 +534,8 @@ export default {
   name: "orderOutbound",
   data() {
     return {
+      btnType:false,
+      disabledType:false,
       // 列表loading状态
       loading: false,
       appointmentList: [
@@ -415,7 +557,10 @@ export default {
       adminList: [],
       kdnCode: "",
       deliveryForms: {
+        remark: "",
+        declared_value: "",
         appointment_type: "",
+        total_weight: "",
         //发货人
         sender: {
           name: "",
@@ -481,6 +626,13 @@ export default {
         },
         total_weight: [
           { required: true, message: "请输入物品总重量", trigger: "blur" },
+          /**/ {
+            type: "number",
+            min: 0,
+            max: 50,
+            message: "物品总重量不能超过50kg",
+            trigger: "blur",
+          },
         ],
         total_volume: [
           { required: true, message: "请输入物品总体积", trigger: "blur" },
@@ -490,8 +642,9 @@ export default {
         ],
       },
       outType: "",
-      send_address:'',
-      receive_address:''
+      send_address: "",
+      receive_address: "",
+      detailData: [], // 物流详情
       /* nameToCodeMap:{} */
     };
   },
@@ -517,7 +670,6 @@ export default {
     this.GET_WarehouseOutDetail();
     this.GET_AdministratorList();
     this.outType = this.$route.params.type;
-    console.log(this.outType);
     /* this.generateMap(regionData); */
   },
   methods: {
@@ -529,7 +681,7 @@ export default {
         codeToText[this.receiverOptions[1]];
       this.deliveryForms.receiver.area_name =
         codeToText[this.receiverOptions[2]];
-        this.receive_address=val.join(",")
+      this.receive_address = val.join(",");
     },
     /* 发货地址 */
     sendHandleChange(val) {
@@ -537,12 +689,13 @@ export default {
         codeToText[this.selectedOptions[0]];
       this.deliveryForms.sender.city_name = codeToText[this.selectedOptions[1]];
       this.deliveryForms.sender.area_name = codeToText[this.selectedOptions[2]];
-      this.send_address=val.join(",")
+      this.send_address = val.join(",");
     },
 
     obtainOrder() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+          this.btnType=true
           const params = this.MixinClone(this.deliveryForms);
           //发货详细地址
           params.receiver.province_city_area_address =
@@ -572,10 +725,13 @@ export default {
           params.total_weight = Number(params.total_weight);
           params.total_volume = Number(params.total_volume);
           params.declared_value = Number(params.declared_value);
-          //
+          //地址
+          params.send_address=this.send_address;
+          params.receive_address=this.receive_address;
           params.order_code = this.id;
           API_order.getKdShip(this.id, params).then((res) => {
             this.kdnCode = res;
+            this.btnType=false
           });
         } else {
           console.log("error submit!!");
@@ -597,10 +753,14 @@ export default {
       });
     },
     saveErpWarehouseOut() {
-      API_order.outOrderSend(this.id,{send_address:this.send_address,receive_address:this.receive_address}).then((res) => {
+      API_order.outOrderSend(this.id, ).then((res) => {
         this.$router.push({ name: "warehouseOut" });
       });
       return;
+      /* {
+        send_address: this.send_address,
+        receive_address: this.receive_address,
+      } */
       API_order.addErpWarehouseOut({
         order_list: this.orderOutboundInfo.order_list,
         warehouse_consignee_id: this.orderOutboundInfo.warehouse_consignee_id,
@@ -655,47 +815,13 @@ export default {
     },
     /** 获取发货单详情*/
     GET_WarehouseOutDetail() {
-      API_order.getOrderDetail(this.id).then((res) => {
-        res.product_list = res.item_list; /* .map((el) => {
-          el.allow_sn = el.goods_vo.allow_sn;
-          el.bar_code = el.goods_vo.bar_code;
-          el.brand_id = el.goods_vo.brand_id;
-          el.brand_name = el.goods_vo.brand_name;
-          el.category_id = el.goods_vo.category_id;
-          el.category_ids = el.goods_vo.category_ids;
-          el.category_name = el.goods_vo.category_name;
-          el.cost_price = el.goods_vo.cost_price;
-          el.create_time = el.goods_vo.create_time;
-          el.creator = el.goods_vo.creator;
-          el.description = el.goods_vo.description;
-          el.en_name = el.goods_vo.en_name;
-          el.freight_template_id = el.goods_vo.freight_template_id;
-          el.goods_style = el.goods_vo.goods_style;
-          el.goods_unit = el.goods_vo.goods_unit;
-          el.goods_unit = el.goods_vo.goods_unit;
-          el.have_spec = el.goods_vo.have_spec;
-          el.hire_or_sail = el.goods_vo.hire_or_sail;
-          el.id = el.goods_vo.id;
-          el.image = el.goods_vo.image;
-          el.image_list = el.goods_vo.image_list;
-          el.label_names = el.goods_vo.label_names;
-          el.market_enable = el.goods_vo.market_enable;
-          el.mkt_price = el.goods_vo.mkt_price;
-          el.name = el.goods_vo.name;
-          el.params_list = el.goods_vo.params_list;
-          el.price = el.goods_vo.price;
-          el.sn = el.goods_vo.sn;
-          el.sn_code = el.goods_vo.sn_code;
-          el.sort = el.goods_vo.sort;
-          el.update_time = el.goods_vo.update_time;
-          el.updater = el.goods_vo.updater;
-          el.usable_stock = el.goods_vo.usable_stock;
-          el.video = el.goods_vo.video;
-          return el;
-        }); */
-        this.product_list = res.item_list;
-        console.log(this.outType);
-        if (this.outType !== undefined) {
+      API_order.getSendOrderDetail(this.id).then((res) => {
+        res.product_list = res.order_item_vos;
+        this.product_list = res.order_item_vos;
+        console.log(res.kdn_order_code==undefined);
+
+        if (this.outType !== undefined ||res.kdn_order_code!==undefined) {
+          this.disabledType=true
           this.deliveryForms.appointment_type = res.appointment_type;
           this.deliveryForms.appointment_time = res.appointment_time;
           this.deliveryForms.sender.name = res.sender_name;
@@ -704,23 +830,46 @@ export default {
           this.deliveryForms.receiver.name = res.receiver_name;
           this.deliveryForms.receiver.phone = res.receiver_phone;
           this.deliveryForms.receiver.address = res.receiver_address;
-          /* this.selectedOptions.push(this.findCode(res.sender_province_name));
-          this.selectedOptions.push(this.findCode(res.sender_city_name));
-          this.selectedOptions.push(this.findCode(res.sender_area_name));
-          this.receiverOptions.push(this.findCode(res.receiver_province_name));
-          this.receiverOptions.push(this.findCode(res.receiver_city_name));
-          this.receiverOptions.push(this.findCode(res.receiver_area_name)); */
           this.deliveryForms.total_volume = res.total_volume;
-          /* this.deliveryForms.declared_value = res.real_price; */
+          this.deliveryForms.declared_value = res.order_vo.real_price;
           this.deliveryForms.remark = res.remark;
           this.kdnCode = res.kdn_order_code;
+          if (
+            JSON.stringify(res.create_order_fail)=='{}' ||
+            JSON.stringify(res.create_order_success)=='{}' ||
+            JSON.stringify(res.user_take_order)=='{}' ||
+             JSON.stringify(res.user_arrives)=='{}' ||
+             JSON.stringify(res.user_sending)=='{}' ||
+             JSON.stringify(res.order_fee)=='{}' ||
+             JSON.stringify(res.sign_in)=='{}'
+          ) {
+             /* let arr =[]
+            arr.push(res.create_order_fail)
+            arr.push(res.create_order_success)
+            arr.push(res.user_take_order)
+            arr.push(res.user_arrives)
+            arr.push(res.user_sending)
+            arr.push(res.order_fee)
+            arr.push(res.sign_in)
+            console.log(arr);*/
+            this.deliveryForms.create_order_fail = res.create_order_fail;
+            this.deliveryForms.create_order_success = res.create_order_success;
+            this.deliveryForms.user_take_order = res.user_take_order;
+            this.deliveryForms.user_arrives = res.user_arrives;
+            this.deliveryForms.user_sending = res.user_sending;
+            this.deliveryForms.order_fee = res.order_fee;
+            this.deliveryForms.sign_in = res.sign_in;
+          }
         }
-        this.deliveryForms.total_weight = res.item_list.map(el=>{
-          return Number(el.product_vo.weight*el.num)
+        res.order_item_vos.map((el) => {
+          this.deliveryForms.total_weight = Number(el.product_vo.weight * el.num);
         });
-        this.deliveryForms.declared_value =Number(res.real_price)
-        this.selectedOptions=res.send_address.split(',')
-        this.receiverOptions=res.receive_address.split(',')
+        this.deliveryForms.declared_value = Number(res.order_vo.real_price);
+        if (res.send_address && res.receiver_address) {
+          this.selectedOptions = res.send_address.split(",");
+          this.receiverOptions = res.receive_address.split(",");
+        }
+
         console.log(this.deliveryForms);
         /* this.deliveryForms.sender=res.sender_province_name */
       });
@@ -819,5 +968,22 @@ export default {
     width: 300px;
   }
 }
+/* 覆盖步骤条的数字为圆点 */
+/deep/.el-steps__icon {
+  background-color: #409eff; /* 蓝色背景 */
+  color: #409eff; /* 蓝色文字,与背景同色,使数字不可见 */
+}
+
+/* 调整圆点的大小 */
+/deep/.el-steps__icon-inner {
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  background-color: white; /* 白色圆点 */
+  transform: translate(-50%, -50%);
+  position: absolute;
+  top: 50%;
+  left: 50%;
+}
 </style>
 

+ 24 - 16
manager-admin/src/views/stock/warehouseOut.vue

@@ -87,37 +87,37 @@
         <el-table-column prop="sn" label="订单编号" />
         <el-table-column prop="" label="出库单编号">
           <template slot-scope="scope">
-            {{ scope.row.warehouseOutId }}
+            {{ scope.row.order_vo.warehouse_out_id }}
           </template>
         </el-table-column>
         <el-table-column label="客户">
           <template slot-scope="scope">
-            {{ memberType(scope.row.member_id) }}
+            {{ memberType(scope.row.order_vo.member_id) }}
           </template>
         </el-table-column>
         <el-table-column prop="order_time" label="下单时间">
           <template slot-scope="scope">{{
-            scope.row.order_time | unixToDate
+            scope.row.order_vo.order_time | unixToDate
           }}</template>
         </el-table-column>
         <el-table-column prop="warehouse_name" label="仓库名称">
           <template slot-scope="scope">
-            {{ warehouseName(scope.row.warehouse_id) }}
+            {{ warehouseName(scope.row.order_vo.warehouse_id) }}
           </template>
         </el-table-column>
         <el-table-column prop="" label="配送方式">
           <template slot-scope="scope">{{
-            deliveryType(scope.row.send_type)
+            deliveryType(scope.row.order_vo.send_type)
           }}</template>
         </el-table-column>
         <!--        <el-table-column prop="distribution_name" label="销售经理" />-->
         <el-table-column prop="" label="付款方式">
           <template slot-scope="scope">
-            {{ deliveryType(scope.row.send_type) }}
+            {{ deliveryType(scope.row.order_vo.send_type) }}
           </template>
         </el-table-column>
         <!--        <el-table-column prop="audit_by" label="审核人" />-->
-        <el-table-column prop="status" label="订单状态">
+        <el-table-column prop="status" label="状态">
           <template slot-scope="scope">{{
             typeName(scope.row.status)
           }}</template>
@@ -127,8 +127,14 @@
         </el-table-column> -->
         <el-table-column label="操作" width="250">
           <template slot-scope="scope">
-              <el-button size="mini" v-if="scope.row.status!=='TO_BE_SEND'" type="success"
-             @click="handleAuditDialog(scope.row)">查看</el-button> <!---->
+            <el-button
+              size="mini"
+              v-if="scope.row.status !== 'TO_BE_SEND'"
+              type="success"
+              @click="handleAuditDialog(scope.row)"
+              >查看</el-button
+            >
+            <!---->
             <!--  <el-button size="mini" v-if="scope.row.allowable.ship && checkPermission(['warehouseOut:send'])" type="success"
               @click="handleSendWarehouseOut(scope.row)">发货</el-button> -->
             <el-button
@@ -452,13 +458,15 @@ export default {
     },
     //获取仓库名称
     warehouseName(val) {
-      let name = "";
+      let name = [];
       this.warehouseList.map((el) => {
-        if (el.id == val) {
-          return (name = el.name);
-        }
+        val.map((e) => {
+          if (el.id == e) {
+            return name.push(el.name);
+          }
+        });
       });
-      return name;
+      return name.join("/");
     },
     //获取订单状态大小写转换.toUpperCase()
     typeName(val) {
@@ -491,7 +499,7 @@ export default {
     handleAuditDialog(row) {
       this.$router.push({
         name: "orderOutboundAdd",
-        params: { id: row.id ,type:'check'},
+        params: { id: row.id, type: "check" },
       });
     },
     /** 审核提交 */
@@ -548,7 +556,7 @@ export default {
       API_Setting.getDeptList().then((response) => {
         this.deptList = Foundation.buildTree(response, "0");
       });
-      API_Setting.getPage({ dictType: "order_status" }).then((res) => {
+      API_Setting.getPage({ dictType: "Sale_order_send_status" }).then((res) => {
         this.orderType = res.data;
       });
     },

+ 5 - 3
ui-components/PickerGoods/src/defaultOptions.js

@@ -49,9 +49,11 @@ export const data = {
 }
 
 // 一般列
+
 export const generalColumns = [
-  { label: '商品编号', prop: 'goods_vo.sn' },
-  { label: '商品名称', prop: 'goods_vo.name' },
-  { label: '规格型号', prop: 'spec_name' },
+  { label: '仓库名称', prop: 'warehouse_vo.name' },
+  { label: '商品编号', prop: 'good_vo.sn' },
+  { label: '商品名称', prop: 'good_vo.name' },
+  { label: '规格型号', prop: 'product_vo.spec_name' },
   { label: '库存数量', prop: 'usable_stock' }
 ]

+ 8 - 3
ui-components/PickerGoods/src/main.vue

@@ -21,7 +21,11 @@
         </el-table-column>
         <el-table-column v-else type="selection" label="选择" width="55" :selectable="checkDisable" reserve-selection
           align="center" />
-        <el-table-column v-for="column in columns" :key="column.label" align="center" v-bind="column" />
+        <el-table-column v-for="column in columns" :key="column.label" align="center" v-bind="column">
+         <!--  <template slot-scope="scope" v-if="scope.row.warehouse_id">
+            {{ scope.row.warehouse_id }}
+          </template> -->
+        </el-table-column>
       </el-table>
       <div class="purchasePlan-picker__tools">
         <div class="tools">
@@ -147,14 +151,15 @@ export default {
     async getGoodsList() {
       this.loading = true
       const params = JSON.parse(JSON.stringify(this.purchasePlanParams))
-      console.log(params);
+      //params.order_type=this.goodsApiParams.order_type
+      //params.warehouse_ids=this.goodsApiParams.warehouse_ids.join(',')
+      //console.log(warehouse_ids.typeOf());
       request({
         url: this.goodsApi,
         method: 'get',
         loading: false,
         params: {
           ...params,
-          ...this.purchasePlanApiParams,
         }
       }).then(response => {
         this.loading = false

+ 6 - 6
ui-components/PickerWarehouseEntryBatch/src/defaultOptions.js

@@ -62,12 +62,12 @@ export const data = {
 // 一般列
 export const generalColumns = [
   // { label: '仓库名称', prop: 'warehouse_entry_id' },
-  { label: '商品编号', prop: 'goods_vo.sn' },
+  { label: '商品编号', prop: 'good_vo.sn' },
   // { label: '库位号',   prop: 'code'},
-  { label: '商品条码', prop: 'bar_code' },
-  { label: '序列号',   prop: 'sn_code'},
-  { label: '商品名称', prop: 'goods_vo.name' },
-  { label: '规格型号', prop: 'spec_name' },
-  { label: '单位', prop: 'unit' },
+  { label: '商品条码', prop: 'product_vo.bar_code' },
+  { label: '序列号',   prop: 'product_vo.sn_code'},
+  { label: '商品名称', prop: 'good_vo.name' },
+  { label: '规格型号', prop: 'product_vo.spec_name' },
+  { label: '单位', prop: 'product_vo.unit' },
   { label: '库存数量', prop: 'usable_stock' }
 ]

+ 1 - 1
ui-domain/api.js

@@ -9,7 +9,7 @@
 module.exports = {
   // 开发环境 192.168.8.107:9999 apidoc.raycos.net
   dev: {
-    admin: window.__ENV__.API_ADMIN || 'http://192.168.8.107:9999'
+    admin: window.__ENV__.API_ADMIN || 'http://192.168.100.106:9999'
   },
   // 测试环境
   test: {