戴艳蓉 3 years ago
parent
commit
fb8eaea6e8
31 changed files with 1212 additions and 413 deletions
  1. 2 0
      src/components/globalComponents/show-content/index.js
  2. 60 0
      src/components/globalComponents/show-content/main.vue
  3. 0 0
      src/components/globalComponents/show-content/展示详情字段
  4. 162 0
      src/views/purchaseIn/purchaseOrder copy/columns.js
  5. 1 1
      src/views/purchaseIn/purchaseOrder copy/components/columns-table.js
  6. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/columns.js
  7. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/purchase-order-addEdit.vue
  8. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/purchase-order-addedit-model.vue
  9. 9 28
      src/views/purchaseIn/purchaseOrder copy/components/purchase-order-in-table.vue
  10. 2 0
      src/views/purchaseIn/purchaseOrder copy/components/rules.js
  11. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/workDiff-table.vue
  12. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-addEdit-form.vue
  13. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-check-form.vue
  14. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-error-model.vue
  15. 2 2
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-model.vue
  16. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-record-form.vue
  17. 0 0
      src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-return-form.vue
  18. 314 0
      src/views/purchaseIn/purchaseOrder copy/detail.vue
  19. 436 0
      src/views/purchaseIn/purchaseOrder copy/index.vue
  20. 0 0
      src/views/purchaseIn/purchaseOrder copy/采购单管理
  21. 0 2
      src/views/purchaseIn/purchaseOrder/components/columns.js
  22. 103 0
      src/views/purchaseIn/purchaseOrder/components/order-addEdit.vue
  23. 4 1
      src/views/purchaseIn/purchaseOrder/components/order-addedit-model.vue
  24. 1 1
      src/views/purchaseIn/purchaseOrder/components/order-in-table.vue
  25. 19 19
      src/views/purchaseIn/purchaseOrder/detail.vue
  26. 0 227
      src/views/purchaseIn/wsmInOrder/components/purchase-order-addEdit.vue
  27. 86 116
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-addEdit-form.vue
  28. 1 1
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-check-form.vue
  29. 5 7
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-model.vue
  30. 1 1
      src/views/purchaseIn/wsmInOrder/components/wsm-in-order-record-form.vue
  31. 4 7
      src/views/purchaseIn/wsmInOrder/detail.vue

+ 2 - 0
src/components/globalComponents/show-content/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 60 - 0
src/components/globalComponents/show-content/main.vue

@@ -0,0 +1,60 @@
+<template>
+  <el-row class="show-content-row">
+    <template v-for="(colu, index) in columns">
+      <el-col
+        :span="12"
+        class="show-content-col"
+        v-if="sitem[colu.prop]"
+        :key="colu + index"
+      >
+        <div class="label">{{ colu.label }}:</div>
+        <div class="name">{{ sitem[colu.prop] }}</div>
+      </el-col>
+    </template>
+  </el-row>
+</template>
+
+<script>
+import asyncRequest from "@/apis/components/all-organize";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "show-content",
+  mixins: [resToken],
+  props: [
+    "columns",
+    "sitem",
+    "newTime",
+  
+  ],
+  /**
+   * 属性集合
+   * @param {Object}        sitem             : 组件大小            必填
+   * @param {Array}         columns           : 选中值              必填
+   * @param {String}        newTime           : 时间戳              必填
+   */
+  data() {
+    return {
+    
+    };
+  },
+   watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  mounted() {
+   
+  },
+  methods: {
+    initForm(){
+      console.log(1234);
+    }
+   
+  },
+};
+</script>
+
+<style>
+</style>

+ 0 - 0
src/components/globalComponents/show-content/展示详情字段


+ 162 - 0
src/views/purchaseIn/purchaseOrder copy/columns.js

@@ -0,0 +1,162 @@
+export default [
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
+  {
+    prop: "cgdNo",
+    label: "采购单编号",
+    width: "155px",
+  },
+  {
+    prop: "bkcode",
+    label: "备库单编号",
+    width: "155px",
+  },
+  {
+    prop: "supplierNo",
+    label: "采购供应商编号",
+    width: "145px",
+  },
+  {
+    prop: "supplier_name",
+    label: "采购供应商名称",
+    width: "155px",
+  },
+  
+  {
+    prop: "wsm_supplierNo",
+    label: "仓库公司编号",
+    width: "145px",
+  },
+  {
+    prop: "wsm_supplier",
+    label: "仓库公司名称",
+    width: "155px",
+  },
+  {
+    prop: "wsm_code",
+    label: "仓库编号",
+    width: "172px",
+  },
+  {
+    prop: "wsm_name",
+    label: "仓库名称",
+    width: "80px",
+  },
+  {
+    prop: "good_code",
+    label: "商品属性编号",
+    width: "145px",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    'min-width': "145px",
+  },
+  
+  {
+    prop: "cgder",
+    label: "采购员",
+    width: "60px",
+  },
+  // 
+  // {
+  //   prop: "apply_name",
+  //   label: "申请人",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "sendtime",
+  //   label: "发货时间",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "send_num",
+  //   label: "发货数量",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "post_company",
+  //   label: "物流公司",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "post_code",
+  //   label: "物流单号",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "post_fee",
+  //   label: "物流费用",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "wsm_num",
+  //   label: "入库数量",
+  //   width: "60px",
+  // },
+  //  {
+  //   prop: "error_num",
+  //   label: "异常数量",
+  //   width: "60px",
+  // },
+  // {
+  //   prop: "check_name",
+  //   label: "验货人",
+  //   width: "60px",
+  // },
+  // 
+  {
+    prop: "good_price",
+    label: "单价",
+    width: "110px",
+  },
+  {
+    prop: "good_num",
+    label: "数量",
+    width: "110px",
+  },
+  {
+    prop: "total_fee",
+    label: "总货款",
+    width: "120px",
+  },
+  {
+    prop: "send_num",
+    label: "已发货数量",
+    width: "110px",
+  },
+  {
+    prop: "wsend_num",
+    label: "未发货数量",
+    width: "105px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "110px",
+  },
+  {
+    prop: "lasttime",
+    label: "预计最晚入库时间",
+    width: "145px",
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "145px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]

+ 1 - 1
src/views/purchaseIn/wsmInOrder/components/columns-table.js → src/views/purchaseIn/purchaseOrder copy/components/columns-table.js

@@ -55,7 +55,7 @@ export default {
   columns: [
     // 表格 - 列参数
     {
-      prop: "post_name",
+      prop: "post_company",
       label: "快递公司",
       width: "125",
       show: true,

+ 0 - 0
src/views/purchaseIn/wsmInOrder/components/columns.js → src/views/purchaseIn/purchaseOrder copy/components/columns.js


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/purchase-order-addEdit.vue → src/views/purchaseIn/purchaseOrder copy/components/purchase-order-addEdit.vue


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/purchase-order-addedit-model.vue → src/views/purchaseIn/purchaseOrder copy/components/purchase-order-addedit-model.vue


+ 9 - 28
src/views/purchaseIn/wsmInOrder/components/purchase-order-in-table.vue → src/views/purchaseIn/purchaseOrder copy/components/purchase-order-in-table.vue

@@ -42,7 +42,7 @@
                 <i
                   class="el-icon-circle-plus-outline tb-icon"
                   style="color: #63cbe7"
-                  @click="openModal('add', '028')"
+                  @click="openModal()"
                 ></i>
               </el-tooltip>
             </template>
@@ -56,7 +56,9 @@
                 <i
                   class="el-icon-view tb-icon"
                   @click="
-                    routeGoto('stockInDetail', { id: scope.row.wsm_in_code })
+                    routeGoto('wsmInOrderDetail', {
+                      id: scope.row.wsm_in_code,
+                    })
                   "
                 ></i>
               </el-tooltip>
@@ -65,10 +67,8 @@
         </el-table>
       </el-form>
       <wsm-in-order-model
-        :id="modelId"
         :show-model="showModel"
-        :btn_code="btn_code"
-        :modelSitem="modelSitem"
+        :sitem="modelSitem"
         @refresh="(showModel = false), $emit('refresh')"
         @cancel="showModel = false"
       />
@@ -79,12 +79,12 @@
 import asyncRequest from "@/apis/service/stock/allot/detail";
 import resToken from "@/mixins/resToken";
 import config from "./columns-table"; //表格列参数
-import wsmInOrderModel from "./wsm-in-order-model.vue";
+// import wsmInOrderModel from "./wsm-in-order-model";
 export default {
   name: "allot",
   props: ["id", "sitem", "newTime"],
   mixins: [resToken],
-  components: { wsmInOrderModel },
+  // components: { wsmInOrderModel },
   computed: {
     powers() {
       let tran =
@@ -144,27 +144,8 @@ export default {
         }
       });
     },
-    openModal(code, btn_code) {
-      this.btn_code = btn_code;
-      this.modelId = code;
-      const {
-        wsm_contactor,
-        wsm_mobile,
-        wsm_addr,
-        addr_code,
-        wsend_num,
-        cgdNo,
-        wsm_code,
-      } = this.sitem;
-      this.modelSitem = {
-        wsm_contactor,
-        wsm_mobile,
-        wsm_addr,
-        addr_code,
-        cgdNo,
-        wsm_code,
-        wsend_num,
-      };
+    openModal() {
+      this.modelSitem=this.sitem;
       this.showModel = true;
     },
     async submitForm() {

+ 2 - 0
src/views/purchaseIn/wsmInOrder/components/rules.js → src/views/purchaseIn/purchaseOrder copy/components/rules.js

@@ -9,6 +9,8 @@ const validatePrice = (rule, value, callback) => {
     } else {
         if (isnumber2(value)) {
             callback();
+        } else if (isnumber(value)) {
+            callback();
         } else {
             callback(new Error("仅支持整数或两位小数!"))
         }

+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/workDiff-table.vue → src/views/purchaseIn/purchaseOrder copy/components/workDiff-table.vue


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-addEdit-form.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-addEdit-form.vue


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-check-form.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-check-form.vue


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-error-model.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-error-model.vue


+ 2 - 2
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-model.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-model.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-    :title="title"
+    :title="'新建备货入库单'"
     :center="true"
     align="left"
     top="5vh"
@@ -17,7 +17,7 @@
       <el-row :gutter="10">
         <el-col :span="24">
           <wsm-in-order-addEdit-form
-            v-if="newTime !== ''"
+            v-if="showModelThis"
             :id="id"
             :newTime="newTime"
             :sitem="sitem"

+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-record-form.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-record-form.vue


+ 0 - 0
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-return-form.vue → src/views/purchaseIn/purchaseOrder copy/components/wsm-in-order-return-form.vue


+ 314 - 0
src/views/purchaseIn/purchaseOrder copy/detail.vue

@@ -0,0 +1,314 @@
+<template>
+  <div class="purchaseOrderDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <p>{{ status }}---{{ powers }}</p>
+      <!-- class="detail-page-title" -->
+      <div style="height: 70px; padding: 20px 0 0 0">
+        <span class="title">采购单编号:{{ queryId }}</span>
+
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          plain
+          style="margin: 0 0 0 12px"
+          class="fr"
+          :size="'mini'"
+          v-if="
+            status !== '' &&
+            status !== '5' &&
+            powers.some((item) => item == '015')
+          "
+          >作废该条信息</el-button
+        >
+        <el-button
+          @click="statusConfirm('0', '取消发货')"
+          class="fr"
+          :size="'mini'"
+          style="margin: 0 0 0 12px"
+          v-if="status === '1' && powers.some((item) => item == '027')"
+          >取消入库</el-button
+        >
+        <el-button
+          type="primary"
+          class="fr"
+          style="margin: 0 0 0 12px"
+          :size="'mini'"
+          @click="statusConfirm('1', '开始入库')"
+          v-if="status === '0' && powers.some((item) => item == '026')"
+          >开始入库
+        </el-button>
+        <el-button
+          type="primary"
+          :size="'mini'"
+          class="fr"
+          style="margin: 0 0 0 12px"
+          @click="addForm"
+          v-if="status === '0' && powers.some((item) => item == '007')"
+          >修改采购反馈
+        </el-button>
+
+        <el-button
+          type="primary"
+          :size="'mini'"
+          class="fr"
+          v-if="
+            (status === '1' || status === '2') &&
+            powers.some((item) => item == '007')
+          "
+          style="margin: 0 0 0 12px"
+          @click="diffAdd = true"
+          >填写总工差</el-button
+        >
+        <el-button
+          type="primary"
+          :size="'mini'"
+          class="fr"
+          style="margin: 0 0 0 12px"
+          @click="purchaseReturnAdd = true"
+          >新建采购单退货</el-button
+        >
+      </div>
+      <status-bar
+        v-if="newTime !== ''"
+        :newTime="newTime"
+        :options="statusOptions"
+        :status="status"
+      />
+      <el-collapse v-model="activeNames">
+        <el-collapse-item title="采购单信息" name="1">
+          <purchase-order-addEdit
+            style="padding: 0 0 20px 0"
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+          <!-- <work-diff-table></work-diff-table> -->
+        </el-collapse-item>
+        <el-collapse-item title="备货入库单" name="2">
+          <purchase-order-in-table
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+        </el-collapse-item>
+        <el-collapse-item title="审批记录" name="10">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'CGD'"
+            :orderCode="orderCode"
+          />
+        </el-collapse-item>
+      </el-collapse>
+      <diff-order-add
+        :sitem="sitem"
+        :show-model="diffAdd"
+        @refresh="initData"
+        @cancel="diffAdd = false"
+      />
+      <!-- 采购单退货弹窗 -->
+      <purchase-return-add
+        :sitem="sitem"
+        :show-model="purchaseReturnAdd"
+        @refresh="initData"
+        @cancel="purchaseReturnAdd = false"
+      />
+      <purchase-order-addedit-model
+        :id="modelId"
+        :show-model="showModel"
+        :sitem="detailSitem"
+        @refresh="refresh"
+        @cancel="showModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
+import purchaseOrderAddEdit from "./components/purchase-order-addEdit";
+import purchaseOrderInTable from "./components/purchase-order-in-table";
+import diffOrderAdd from "@/views/purchaseIn/purchaseDiffOrder/addEditModel";
+// import WorkDiffTable from "./components/workDiff-table.vue";
+import purchaseOrderAddeditModel from "./components/purchase-order-addedit-model";
+import PurchaseReturnAdd from "@/views/purchaseIn/purchaseReturn/addEdit.vue"; //采购单退货弹窗
+export default {
+  name: "purchaseOrderDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    purchaseOrderAddEdit,
+    purchaseOrderInTable,
+    diffOrderAdd,
+    purchaseOrderAddeditModel,
+    // WorkDiffTable,
+    PurchaseReturnAdd, //采购单退货弹窗
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "purchaseOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      detailSitem: null,
+      modelId: "",
+      showModel: false,
+
+      isMetal: false,
+      finishStatus: "finish",
+      activeNames: ["0", "1", "2", "3", "4", "5", "10"],
+      sitem: null,
+      statusOptions: [
+        { value: "0", label: "待同意开始入库" },
+        { value: "1", label: "待入库" },
+        { value: "2", label: "部分入库" },
+        { value: "3", label: "入库完成" },
+      ],
+      statusList: [
+        {
+          code: "0",
+          label: "待同意发货",
+        },
+        {
+          code: "1",
+          label: "待发货",
+        },
+        {
+          code: "2",
+          label: "部分发货",
+        },
+        {
+          code: "3",
+          label: "发货完成",
+        },
+      ],
+      status: "",
+      newTime: "",
+      loading: false,
+      queryId: "",
+      diffAdd: false,
+      orderCode: "",
+      purchaseReturnAdd: false, //采购单退货弹窗
+    };
+  },
+  mounted() {
+    this.queryId = this.$route.query.id;
+    this.initData();
+  },
+  methods: {
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    addForm() {
+      this.detailSitem = this.sitem;
+      this.modelId = this.id;
+      this.showModel = true;
+    },
+    openModal() {
+      this.diffAdd = true;
+      this.purchaseReturnAdd = true;
+    },
+    async examForm(e) {
+      if (!this.loading) {
+        let type = e.state === "1" ? "2" : "0";
+        await this.setStatus(type, "提交入库方审核", e.remark);
+      }
+    },
+    async initData() {
+      this.loading = true;
+      const res = await asyncRequest.detail({ cgdNo: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        const { status, can } = this.sitem;
+        this.status = status;
+        this.orderCode = res.data.cgdNo;
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.queryId });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("check", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message, remark) {
+      let model = {
+        cgdNo: this.sitem.cgdNo,
+        remark: remark || "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        await this.initData();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrderDetail {
+}
+</style>
+   
+   

+ 436 - 0
src/views/purchaseIn/purchaseOrder copy/index.vue

@@ -0,0 +1,436 @@
+<template>
+  <div class="purchaseOrder pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="4" style="width: 150px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="采购单状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusOptions"
+                    :key="'status' + item.code"
+                    :label="item.label"
+                    :value="item.code"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="4" style="width: 370px; padding: 0 0 0 10px">
+                <search-supplier
+                  :size="searchSize"
+                  :value="wsm_supplierNo"
+                  :placeholder="'入库公司名称'"
+                  :disabled="false"
+                  :isDetail="false"
+                  @searchChange="supplierChange"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
+                <search-stock
+                  :size="searchSize"
+                  :value="wsm_code"
+                  :placeholder="'入库仓库名称'"
+                  :disabled="false"
+                  :isDetail="false"
+                  :isRelation="true"
+                  :companyCode="parmValue.wsm_supplierNo"
+                  @searchChange="stockChange"
+                />
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="4" style="width: 120px">
+                <el-dropdown @command="handleClick($event)" :size="searchSize">
+                  <el-button :size="searchSize" style="width: 120px">
+                    {{ sselect }}
+                    <i
+                      class="el-icon-arrow-down el-icon--right"
+                      :size="searchSize"
+                    ></i>
+                  </el-button>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item
+                      v-for="item in options"
+                      :key="item"
+                      :command="item"
+                      >{{ item }}</el-dropdown-item
+                    >
+                  </el-dropdown-menu>
+                </el-dropdown>
+              </el-col>
+              <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
+                <period-date-picker
+                  :type="1"
+                  :width="'135px'"
+                  :size="searchSize"
+                  :start="timeOBJ.start"
+                  :end="timeOBJ.end"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+              <el-col :span="6" style="width: 400px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  placeholder="编号"
+                  v-model="input"
+                  :size="searchSize"
+                  class="input-with-select"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-select
+                    v-model="select"
+                    style="width: 125px"
+                    slot="prepend"
+                    placeholder="请选择"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option label="采购单编号" value="1"></el-option>
+                    <el-option label="入库单编号" value="2"></el-option>
+                    <el-option label="备库编号" value="3"></el-option>
+                    <el-option label="商品属性编号" value="4"></el-option>
+                    <el-option label="产品名称" value="5"></el-option>
+                    <el-option label="申请人" value="6"></el-option>
+                    <el-option label="采购供应商编号" value="7"></el-option>
+                  </el-select>
+                  <el-button
+                    slot="append"
+                    @click="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                    icon="el-icon-search"
+                  ></el-button>
+                </el-input>
+              </el-col>
+
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (
+                statusOptions.find((item) => item.code == scope.row.status) ||
+                {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="routeGoto('purchaseOrderDetail', { id: scope.row.cgdNo })"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+
+import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
+import columns from "./columns"; //表格列参数
+import { mapGetters } from "vuex";
+
+export default {
+  name: "purchaseOrder",
+  mixins: [mixinPage, resToken],
+  components: {},
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "purchaseOrder"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      sitem: null,
+      select: "1",
+      input: "",
+      timeOBJ: {
+        start: "", //起始时间
+        end: "", // 结束时间
+      },
+      options: ["创建时间", "最晚入库时间"],
+      sselect: "创建时间",
+      // 状态
+      statusOptions: [
+        {
+          code: "0",
+          label: "待同意发货",
+        },
+        {
+          code: "1",
+          label: "待发货",
+        },
+        {
+          code: "2",
+          label: "部分发货",
+        },
+        {
+          code: "3",
+          label: "发货完成",
+        },
+      ],
+
+      loading: false,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      wsm_code: [],
+      wsm_supplierNo: [],
+      parmValue: {
+        bk_code: "", // 备库编码
+        wsm_in_code: "", // 入库单号
+        cgdNo: "", // 采购单编码
+        apply_name: "", // 申请人
+        good_name: "", // 产品名称
+        good_code: "", // 产品属性编号
+
+        status: "", //状态
+
+        wsm_code: "", //入货仓库编码
+        start: "", //新建起始时间
+        end: "", // 新建结束时间
+        last_start: "", //最后入库时间开始
+        last_end: "", //最后入库时间结束
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "",
+        wsm_supplierNo: "",
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.sselect = "创建时间";
+      this.select = "1";
+      this.input = "";
+      this.wsm_code = [];
+      this.wsm_supplierNo = [];
+      this.timeOBJ = {
+        start: "", //起始时间
+        end: "", // 结束时间
+      };
+      this.parmValue = {
+        bk_code: "", // 备库编码
+        wsm_in_code: "", // 入库单号
+        cgdNo: "", // 采购单编码
+        apply_name: "", // 申请人
+        good_name: "", // 产品名称
+        good_code: "", // 产品属性编号
+        status: "", //状态
+        wsm_code: "", //入货仓库编码
+        start: "", //新建起始时间
+        end: "", // 新建结束时间
+        last_start: "", //最后入库时间开始
+        last_end: "", //最后入库时间结束
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+    async handleClick(e) {
+      this.sselect = e;
+      this.parmValue.start = e === "创建时间" ? this.timeOBJ.start : "";
+      this.parmValue.end = e === "创建时间" ? this.timeOBJ.end : "";
+      this.parmValue.last_start = e !== "创建时间" ? this.timeOBJ.start : "";
+      this.parmValue.last_end = e !== "创建时间" ? this.timeOBJ.end : "";
+      if (
+        !(
+          (this.timeOBJ.start !== "" && this.timeOBJ.end === "") ||
+          (this.timeOBJ.start === "" && this.timeOBJ.end !== "")
+        )
+      ) {
+        this.parmValue.page = 1;
+        this.pageInfo.curr = 1;
+        await this.searchList();
+      }
+    },
+    async supplierChange(e) {
+      if (e && e.id) {
+        this.parmValue.wsm_supplierNo = e.code;
+        this.wsm_supplierNo = [e.code];
+      } else {
+        this.parmValue.wsm_supplierNo = "";
+        this.wsm_supplierNo = [];
+      }
+      this.parmValue.wsm_code = "";
+      this.wsm_code = [];
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async stockChange(e) {
+      if (e && e.id) {
+        this.parmValue.wsm_code = e.code;
+        this.wsm_code = [e.code];
+      } else {
+        this.parmValue.wsm_code = "";
+        this.wsm_code = [];
+      }
+
+      console.log(e);
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async searchList() {
+      this.loading = true;
+      this.parmValue.cgdNo = this.select === "1" ? this.input : ""; // 采购单编码
+      this.parmValue.wsm_in_code = this.select === "2" ? this.input : ""; // 入库单号
+      this.parmValue.bk_code = this.select === "3" ? this.input : ""; // 备库编码
+      this.parmValue.good_code = this.select === "4" ? this.input : ""; // 产品属性编号
+      this.parmValue.good_name = this.select === "5" ? this.input : ""; // 产品名称
+      this.parmValue.apply_name = this.select === "6" ? this.input : ""; // 申请人
+      this.parmValue.supplierNo = this.select === "7" ? this.input : ""; // 采购供应商编号
+      // this.wsm_supplierNo = [];
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    // 时间
+    async handleTime(e) {
+      if (e.startTime !== "") {
+        this.timeOBJ.start = e.startTime;
+      } else {
+        this.timeOBJ.start = "";
+      }
+      if (e.endTime !== "") {
+        this.timeOBJ.end = e.endTime;
+      } else {
+        this.timeOBJ.end = "";
+      }
+      await this.handleClick(this.sselect);
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+</style>
+   

+ 0 - 0
src/views/purchaseIn/purchaseOrder copy/采购单管理


+ 0 - 2
src/views/purchaseIn/purchaseOrder/components/columns.js

@@ -3,12 +3,10 @@ export default  [
     {
       prop: "cgdNo",
       label: "采购单编号",
-      // _noset_: true,
     },
     {
       prop: "bkcode",
       label: "备库单编号",
-      // _noset_: true,
     },
     {
       prop: "cgder",

+ 103 - 0
src/views/purchaseIn/purchaseOrder/components/order-addEdit.vue

@@ -0,0 +1,103 @@
+<template>
+
+    <el-row class="purchaseOrderDetail-addForm">
+      <el-col
+        :span="12"
+        class="purchaseOrderDetail-addForm-el-col"
+        v-for="(colu, index) in columns"
+        :key="colu + index"
+      >
+        <div class="label">{{ colu.label }}:</div>
+        <div class="name">{{ sitem[colu.prop] }}</div>
+      </el-col>
+    </el-row>
+
+</template>
+   <script>
+// import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
+
+import columns from "./columns";
+export default {
+  name: "addEdit",
+  props: ["id", "sitem", "newTime"],
+  data() {
+    return {
+      columns: columns,
+      status: "",
+      loading: false,
+
+      isDisabled: false,
+      detailSitem: null,
+      loading: false,
+      modelId: "",
+      sitem: null,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  methods: {
+    
+   
+
+    async initForm() {
+      this.loading = true;
+      if (this.id === "add") {
+        this.status = "";
+      } else {
+        const { status, can } = this.sitem;
+        this.sitem.goods_class = "";
+        this.status = status || "";
+        can.forEach((v, i) => {
+          this.sitem.goods_class += i === 0 ? v.name : "/" + v.name;
+        });
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.purchaseOrderDetail-addForm {
+  border-top: 1px solid #ebeef5 !important;
+  border-left: 1px solid #ebeef5 !important;
+  .purchaseOrderDetail-addForm-el-col {
+    display: flex;
+    align-items: stretch;
+    //
+    border-right: 1px solid #ebeef5 !important;
+    .label {
+      width: 145px;
+      line-height: 40px;
+      text-align: right;
+      background: #fafafa !important;
+      font-weight: 400 !important;
+      color: #909399 !important;
+      font-size: 12px !important;
+      border-bottom: 1px solid #ebeef5 !important;
+      border-right: 1px solid #ebeef5 !important;
+    }
+    .name {
+      width: calc(100% - 145px);
+      text-align: left;
+      line-height: 40px;
+      font-size: 12px !important;
+      border-bottom: 1px solid #ebeef5 !important;
+      padding: 0 0 0 12px !important;
+      color: #606266 !important;
+    }
+  }
+}
+</style>
+   

+ 4 - 1
src/views/purchaseIn/wsmInOrder/components/purchase-order-addedit-model.vue → src/views/purchaseIn/purchaseOrder/components/order-addedit-model.vue

@@ -346,12 +346,13 @@ export default {
             good_num,
             supplier_name,
             lasttime,
+            cgdNo
           } = this.sitem;
           this.good_price = good_price || "0";
           this.supplierName = supplier_name;
           this.lasttime = lasttime || "";
           this.ruleForm = {
-            cgdNo: this.id,
+            cgdNo: cgdNo||"",
             nake_fee: nake_fee || "0", //裸价
             wsm_code: wsm_code || "", //仓库
             cgder_id: "",
@@ -381,6 +382,8 @@ export default {
           this.loading = true;
           const item = JSON.parse(JSON.stringify(this.ruleForm));
           item.supplierNo = item.supplierNo.toString();
+
+          console.log(item);
           const res = await asyncRequest.update(item);
           this.loading = false;
           if (res && res.code === 0) {

+ 1 - 1
src/views/purchaseIn/purchaseOrder/components/purchase-order-in-table.vue → src/views/purchaseIn/purchaseOrder/components/order-in-table.vue

@@ -79,7 +79,7 @@
 import asyncRequest from "@/apis/service/stock/allot/detail";
 import resToken from "@/mixins/resToken";
 import config from "./columns-table"; //表格列参数
-import wsmInOrderModel from "./wsm-in-order-model.vue";
+import wsmInOrderModel from "@/views/purchaseIn/wsmInOrder/components/wsm-in-order-model";
 export default {
   name: "allot",
   props: ["id", "sitem", "newTime"],

+ 19 - 19
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -36,7 +36,7 @@
           class="fr"
           style="margin: 0 0 0 12px"
           :size="'mini'"
-          @click="statusConfirm('1', '开始发货')"
+          @click="statusConfirm('1', '开始入库')"
           v-if="status === '0' && powers.some((item) => item == '026')"
           >开始入库
         </el-button>
@@ -79,7 +79,7 @@
       />
       <el-collapse v-model="activeNames">
         <el-collapse-item title="采购单信息" name="1">
-          <purchase-order-addEdit
+          <order-addEdit
             style="padding: 0 0 20px 0"
             :newTime="newTime"
             v-if="newTime !== ''"
@@ -90,7 +90,7 @@
           <!-- <work-diff-table></work-diff-table> -->
         </el-collapse-item>
         <el-collapse-item title="备货入库单" name="2">
-          <purchase-order-in-table
+          <order-in-table
             :newTime="newTime"
             v-if="newTime !== ''"
             :sitem="sitem"
@@ -107,20 +107,20 @@
           />
         </el-collapse-item>
       </el-collapse>
-      <diff-order-add
+      <!-- <diff-order-add
         :sitem="sitem"
         :show-model="diffAdd"
         @refresh="initData"
         @cancel="diffAdd = false"
-      />
+      /> -->
       <!-- 采购单退货弹窗 -->
-      <purchase-return-add
+      <!-- <return-add
         :sitem="sitem"
         :show-model="purchaseReturnAdd"
         @refresh="initData"
         @cancel="purchaseReturnAdd = false"
-      />
-      <purchase-order-addedit-model
+      /> -->
+      <order-addedit-model
         :id="modelId"
         :show-model="showModel"
         :sitem="detailSitem"
@@ -137,22 +137,22 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
-import purchaseOrderAddEdit from "./components/purchase-order-addEdit";
-import purchaseOrderInTable from "./components/purchase-order-in-table";
-import diffOrderAdd from "@/views/purchaseIn/purchaseDiffOrder/addEditModel";
+import orderAddEdit from "./components/order-addEdit";
+import orderInTable from "./components/order-in-table";
+// import diffOrderAdd from "@/views/purchaseIn/purchaseDiffOrder/addEditModel";
 // import WorkDiffTable from "./components/workDiff-table.vue";
-import purchaseOrderAddeditModel from "./components/purchase-order-addedit-model";
-import PurchaseReturnAdd from "@/views/purchaseIn/purchaseReturn/addEdit.vue"; //采购单退货弹窗
+import orderAddeditModel from "./components/order-addedit-model";
+// import PurchaseReturnAdd from "@/views/purchaseIn/purchaseReturn/addEdit"; //采购单退货弹窗
 export default {
   name: "purchaseOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
-    purchaseOrderAddEdit,
-    purchaseOrderInTable,
-    diffOrderAdd,
-    purchaseOrderAddeditModel,
+    orderAddEdit,
+    orderInTable,
+    // diffOrderAdd,
+    orderAddeditModel,
     // WorkDiffTable,
-    PurchaseReturnAdd, //采购单退货弹窗
+    // PurchaseReturnAdd, //采购单退货弹窗
   },
   computed: {
     powers() {
@@ -296,7 +296,7 @@ export default {
           title: message + "成功!",
           message: "",
         });
-        await this.initData;
+        await this.initData();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {

+ 0 - 227
src/views/purchaseIn/wsmInOrder/components/purchase-order-addEdit.vue

@@ -1,227 +0,0 @@
-<template>
-  <div>
-    <div class="tr">
-      <el-button
-        type="primary"
-        :size="'mini'"
-        @click="addForm"
-        v-if="status === '0' && powers.some((item) => item == '007')"
-        >修改
-      </el-button>
-      <el-button
-        type="primary"
-        plain
-        :size="'mini'"
-        @click="statusConfirm('1', '开始发货')"
-        v-if="status === '0' && powers.some((item) => item == '026')"
-        >开始发货
-      </el-button>
-
-      <el-button
-        @click="statusConfirm('0', '取消发货')"
-        plain
-        :size="'mini'"
-        v-if="status === '1' && powers.some((item) => item == '027')"
-        >取消发货</el-button
-      >
-      <el-button
-        @click="statusConfirm('-1', '作废该条信息')"
-        type="danger"
-        plain
-        :size="'mini'"
-        v-if="
-          status !== '' &&
-          status !== '5' &&
-          powers.some((item) => item == '015')
-        "
-        >作废该条信息</el-button
-      >
-    </div>
-
-    <el-row class="purchaseOrderDetail-addForm">
-      <el-col
-        :span="12"
-        class="purchaseOrderDetail-addForm-el-col"
-        v-for="(colu, index) in columns"
-        :key="colu + index"
-      >
-        <div class="label">{{ colu.label }}:</div>
-        <div class="name">{{ sitem[colu.prop] }}</div>
-      </el-col>
-    </el-row>
-    <purchase-order-addedit-model
-      :id="modelId"
-      :show-model="showModel"
-      :sitem="detailSitem"
-      @refresh="refresh"
-      @cancel="showModel = false"
-    />
-  </div>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
-import resToken from "@/mixins/resToken";
-import purchaseOrderAddeditModel from "./purchase-order-addedit-model";
-import columns from "./columns";
-export default {
-  name: "addEdit",
-  props: ["id", "sitem", "newTime"],
-  mixins: [resToken],
-  components: { purchaseOrderAddeditModel },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "purchaseOrderDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      columns: columns,
-      status: "",
-      loading: false,
-
-      isDisabled: false,
-      detailSitem: null,
-      loading: false,
-      modelId: "",
-      sitem: null,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    
-    addForm() {
-      this.detailSitem = this.sitem;
-      this.modelId = this.id;
-      this.showModel = true;
-    },
-
-    async initForm() {
-      this.loading = true;
-      if (this.id === "add") {
-        this.status = "";
-      } else {
-        const { status, can } = this.sitem;
-        this.sitem.goods_class = "";
-        this.status = status || "";
-        can.forEach((v, i) => {
-          this.sitem.goods_class += i === 0 ? v.name : "/" + v.name;
-        });
-      }
-      this.loading = false;
-    },
-    refresh() {
-      this.showModelThis = false;
-      this.$emit("refresh");
-    },
-
-    async statusConfirm(status, message) {
-      await this.$confirm(`确定要${message}?`, {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          if (status === "-1") {
-            await this.deleteById(message);
-          } else {
-            await this.setStatus(status, message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-
-    async deleteById(message) {
-      const res = await asyncRequest.delete({ id: this.queryId });
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: message + "成功!",
-          message: "",
-        });
-
-        this.routeGoto("check", {});
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-
-    async setStatus(status, message, remark) {
-      let model = {
-        cgdNo: this.sitem.cgdNo,
-        remark: remark || "",
-        status: status,
-      };
-      const res = await asyncRequest.status(model);
-      this.loading = false;
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: message + "成功!",
-          message: "",
-        });
-        this.refresh();
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.purchaseOrderDetail-addForm {
-  border-top: 1px solid #ebeef5 !important;
-  border-left: 1px solid #ebeef5 !important;
-  .purchaseOrderDetail-addForm-el-col {
-    display: flex;
-    align-items: stretch;
-    //
-    border-right: 1px solid #ebeef5 !important;
-    .label {
-      width: 145px;
-      line-height: 40px;
-      text-align: right;
-      background: #fafafa !important;
-      font-weight: 400 !important;
-      color: #909399 !important;
-      font-size: 12px !important;
-      border-bottom: 1px solid #ebeef5 !important;
-      border-right: 1px solid #ebeef5 !important;
-    }
-    .name {
-      width: calc(100% - 145px);
-      text-align: left;
-      line-height: 40px;
-      font-size: 12px !important;
-      border-bottom: 1px solid #ebeef5 !important;
-      padding: 0 0 0 12px !important;
-      color: #606266 !important;
-    }
-  }
-}
-</style>
-   

+ 86 - 116
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-addEdit-form.vue

@@ -5,74 +5,43 @@
     :rules="rules"
     status-icon
     ref="ruleForm"
-    label-width="100px"
+    label-width="85px"
     class="demo-ruleForm"
   >
     <el-row>
-      <el-col :span="24" v-if="id === 'add'">
-        <el-col :span="24">
-          <el-divider>收货信息:</el-divider>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收货人" :size="'mini'">
-            <el-input
-              placeholder="收货人"
-              disabled
-              v-model="ruleForm.wsm_contactor"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="12">
-          <el-form-item label="联系电话" :size="'mini'">
-            <el-input
-              placeholder="联系电话"
-              disabled
-              v-model="ruleForm.wsm_mobile"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="24">
-          <el-form-item label="收货地址" :size="'mini'">
-            <el-input
-              placeholder="收货地址"
-              disabled
-              v-model="ruleForm.wsm_addr"
-              maxlength="100"
-            >
-            </el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="24">
-          <el-divider>入库单信息:</el-divider>
-        </el-col>
+      <el-col :span="id === 'add' ? 24 : 12">
+        <el-form-item label="可入库总数" prop="wsend_num">
+          <el-input
+            disabled
+            placeholder="可入库总数"
+            v-model="ruleForm.wsend_num"
+            maxlength="100"
+          />
+        </el-form-item>
       </el-col>
-
-      <el-col :span="12">
-        <el-form-item label="物流公司" prop="post_name">
-          <!-- <el-input
-            placeholder="物流公司"
+      <el-col :span="id === 'add' ? 24 : 12">
+        <el-form-item label="入库数量" prop="send_num">
+          <el-input
             :disabled="id !== 'add'"
-            v-model="ruleForm.post_company"
+            placeholder="入库数量"
+            v-model="ruleForm.send_num"
             maxlength="100"
-          >
-          </el-input> -->
-          <!-- :disabled="!(status == '2' && powers.some((item) => item == '021'))" -->
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="id === 'add' ? 24 : 12">
+        <el-form-item label="物流公司" prop="post_company">
           <search-express
             :disabled="id !== 'add'"
-            :value="ruleForm.post_name"
-            :placeholder="'请输入物流公司'"
+            :value="ruleForm.post_company"
+            :placeholder="'物流公司'"
             :names="''"
             :is-detail="false"
             @searchChange="handleCompany"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="12">
+      <el-col :span="id === 'add' ? 24 : 12">
         <el-form-item label="物流单号" prop="post_code">
           <el-input
             :disabled="id !== 'add'"
@@ -82,7 +51,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="12">
+      <el-col :span="id === 'add' ? 24 : 12">
         <el-form-item label="物流费用" prop="post_fee">
           <el-input
             :disabled="id !== 'add'"
@@ -94,7 +63,7 @@
           </el-input>
         </el-form-item>
       </el-col>
-      <el-col :span="12">
+      <el-col :span="id === 'add' ? 24 : 12">
         <el-form-item label="发货时间" prop="post_time">
           <el-date-picker
             :disabled="id !== 'add'"
@@ -109,31 +78,10 @@
           </el-date-picker>
         </el-form-item>
       </el-col>
-      <el-col :span="12" v-if="id === 'add'">
-        <el-form-item label="未发货总量">
-          <el-input
-            placeholder="未发货总量"
-            disabled
-            v-model="ruleForm.wsend_num"
-            maxlength="100"
-          >
-          </el-input>
-        </el-form-item>
-      </el-col>
-      <el-col :span="12" v-if="id === 'add'">
-        <el-form-item label="发货数量" prop="send_num">
-          <el-input
-            placeholder="发货数量"
-            :disabled="id !== 'add'"
-            v-model="ruleForm.send_num"
-            maxlength="100"
-          >
-          </el-input>
-        </el-form-item>
-      </el-col>
-
       <el-col :span="24" style="text-align: right" v-if="id === 'add'">
-        <el-button type="primary" @click="submitForm">保 存 </el-button>
+        <el-button type="primary" :size="'mini'" @click="submitForm"
+          >保 存
+        </el-button>
       </el-col>
     </el-row>
   </el-form>
@@ -151,7 +99,9 @@ export default {
       if (value === "") {
         callback(new Error("不能为空!"));
       } else {
-        if (isnumber2(value)) {
+        if (isnumber(value)) {
+          callback();
+        } else if (isnumber2(value)) {
           callback();
         } else {
           callback(new Error("仅支持整数或两位小数!"));
@@ -189,7 +139,7 @@ export default {
         wsm_addr: "",
         cgdNo: "",
         wsm_code: "",
-        post_name: [],
+        post_company: [],
         post_code: "",
         post_fee: "",
         post_time: "",
@@ -202,7 +152,7 @@ export default {
           validator: validateWeight,
           trigger: "blur",
         },
-        post_name: {
+        post_company: {
           type: "array",
           required: true,
           trigger: "change",
@@ -237,8 +187,6 @@ export default {
     this.initForm();
   },
   methods: {
-    
-
     async initForm() {
       this.loading = true;
       await this.resetForm();
@@ -251,30 +199,56 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          const { post_company, post_code, post_fee, sendtime, send_num } =
-            this.sitem;
-          const {
-            wsm_mobile,
-            wsm_contactor,
-            wsm_addr,
-            wsend_num,
-            cgdNo,
-            wsm_code,
-          } = this.modelSitem;
-          this.ruleForm = {
-            wsm_mobile,
-            wsm_contactor,
-            wsm_addr,
-            wsend_num,
-            cgdNo: cgdNo || "",
-            wsm_code: wsm_code || "",
-            post_name: [post_company] || [],
-            post_code: post_code || "",
-            post_fee: post_fee || "",
-            post_time: sendtime || "",
-            send_num: send_num || "",
-            status: "1",
-          };
+          if (this.id === "add") {
+            const {
+              post_company,
+              post_code,
+              post_fee,
+              sendtime,
+              cgdNo,
+              wsm_code,
+              send_num,
+              wsend_num,
+            } = this.sitem;
+            this.ruleForm = {
+              // wsm_mobile,
+              // wsm_contactor,
+              // wsm_addr,
+              wsend_num: wsend_num || "",
+              cgdNo: cgdNo || "",
+              wsm_code: wsm_code || "",
+              post_company: post_company ? [post_company] : [],
+              post_code: post_code || "",
+              post_fee: post_fee || "",
+              post_time: sendtime || "",
+              send_num: send_num || "",
+              status: "1",
+            };
+          }
+          console.log(this.sitem);
+
+          // const {
+          //   wsm_mobile,
+          //   wsm_contactor,
+          //   wsm_addr,
+          //   wsend_num,
+          //   cgdNo,
+          //   wsm_code,
+          // } = this.modelSitem;
+          // this.ruleForm = {
+          //   wsm_mobile,
+          //   wsm_contactor,
+          //   wsm_addr,
+          //   wsend_num,
+          //   cgdNo: cgdNo || "",
+          //   wsm_code: wsm_code || "",
+          //   post_company: [post_company] || [],
+          //   post_code: post_code || "",
+          //   post_fee: post_fee || "",
+          //   post_time: sendtime || "",
+          //   send_num: send_num || "",
+          //   status: "1",
+          // };
         }
       });
     },
@@ -284,7 +258,7 @@ export default {
         if (valid) {
           this.loading = true;
           let model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.post_name = model.post_name.toString();
+          model.post_company = model.post_company.toString();
 
           const res = await asyncRequest.orderinadd(model);
           this.loading = false;
@@ -307,12 +281,8 @@ export default {
     },
     handleCompany(e) {
       console.log(e);
-      if (e && e.code) {
-        this.ruleForm.post_name = [e.shortName];
-        this.ruleForm.page = 1;
-      }
-      console.log(this.ruleForm.express_company);
-      this.$refs.ruleForm.validateField("post_name");
+      this.ruleForm.post_company = e && e.code ? [e.label] : [];
+      this.$refs.ruleForm.validateField("post_company");
     },
   },
 };

+ 1 - 1
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-check-form.vue

@@ -137,7 +137,7 @@ export default {
     powers() {
       let tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "stockInDetail"
+          (item) => item.menu_route == "wsmInOrderDetail"
         ) || {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;

+ 5 - 7
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-model.vue

@@ -1,10 +1,10 @@
 <template>
   <el-dialog
-    :title="title"
+    :title="'新建备货入库单'"
     :center="true"
     align="left"
     top="5vh"
-    width="1040px"
+    width="500px"
     @close="showModelThis = false"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"
@@ -17,14 +17,12 @@
       <el-row :gutter="10">
         <el-col :span="24">
           <wsm-in-order-addEdit-form
-            v-if="newTime !== ''"
-            :id="id"
+            v-if="showModelThis"
+            :id="'add'"
             :newTime="newTime"
-            :modelSitem="modelSitem"
             :sitem="sitem"
             @refresh="(showModelThis = false), $emit('refresh')"
           />
-     
         </el-col>
       </el-row>
     </el-card>
@@ -37,7 +35,7 @@ import wsmInOrderAddEditForm from "./wsm-in-order-addEdit-form";
 
 export default {
   name: "purchaseOrder",
-  props: ["showModel", "id", "btn_code", "modelSitem"],
+  props: ["showModel", "id",  "sitem"],
   components: { wsmInOrderAddEditForm},
   mixins: [resToken],
   data() {

+ 1 - 1
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-record-form.vue

@@ -145,7 +145,7 @@ export default {
     powers() {
       let tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "stockInDetail"
+          (item) => item.menu_route == "wsmInOrderDetail"
         ) || {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;

+ 4 - 7
src/views/purchaseIn/wsmInOrder/detail.vue

@@ -4,7 +4,7 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      {{ status }}
+      {{ status }}---{{ powers}}
       <status-bar
         v-if="newTime !== ''"
         :newTime="newTime"
@@ -36,20 +36,17 @@
         <el-collapse-item
           title="入库验收"
           name="2"
-          v-if="status !== '' && status !== '0'"
         >
           <wsm-in-order-record-form
             v-if="newTime !== ''"
             :id="queryId"
             :newTime="newTime"
-            :modelSitem="{}"
             :sitem="sitem"
             @refresh="initData()"
           />
         </el-collapse-item>
         <el-collapse-item
           title="入库验收审核"
-          v-if="status !== '' && status !== '0' && status !== '1'"
           name="3"
         >
           <wsm-in-order-check-form
@@ -140,9 +137,9 @@ export default {
       sitem: null,
       status: "",
       statusOptions: [
-        { value: "0", label: "取消" },
-        { value: "1", label: "发起" },
-        { value: "2", label: "反馈物流费" },
+        // { value: "0", label: "取消" },
+        { value: "1", label: "入库验收" },
+        { value: "2", label: "入库验收审核" },
         { value: "3", label: "同意下单" },
         { value: "4", label: "发货中" },
         { value: "5", label: "已发货" },