Browse Source

一些静态页修改

cz 2 years ago
parent
commit
9c7d2ed2c5
26 changed files with 3896 additions and 70 deletions
  1. 33 0
      src/api/inbound-outbound/salesOutbound.js
  2. 53 0
      src/api/order-management/order/JDorder.js
  3. 336 0
      src/components/inbound-outbound/addInbound.vue
  4. 239 0
      src/components/inbound-outbound/addOutbound.vue
  5. 104 0
      src/router/page/index.js
  6. 266 0
      src/views/inbound-outbound/JDoutbound/index.vue
  7. 0 0
      src/views/inbound-outbound/cgInbound.vue
  8. 272 0
      src/views/inbound-outbound/cgInbound/index.vue
  9. 332 0
      src/views/inbound-outbound/inbound/qualityTesting.vue
  10. 270 0
      src/views/inbound-outbound/salesOutbound/addOutbound.vue
  11. 267 0
      src/views/inbound-outbound/salesOutbound/index.vue
  12. 268 0
      src/views/inventory-management/check/index.vue
  13. 214 0
      src/views/inventory-management/check/sendCheck.vue
  14. 202 0
      src/views/inventory-management/query/index.vue
  15. 356 0
      src/views/order-management/order/JDorder.vue
  16. 149 30
      src/views/order-management/order/addOrder.vue
  17. 24 12
      src/views/order-management/order/index.vue
  18. 23 1
      src/views/product-material/material/addMaterial.vue
  19. 13 0
      src/views/product-material/product/addProduct.vue
  20. 1 0
      src/views/product-material/product/index.vue
  21. 21 8
      src/views/product-material/spu/addSpu.vue
  22. 17 5
      src/views/product-material/spu/index.vue
  23. 6 6
      src/views/purchase-management/purchase/addPurchase.vue
  24. 15 8
      src/views/purchase-management/purchase/index.vue
  25. 265 0
      src/views/purchase-management/settlement/purchaseSettlement.vue
  26. 150 0
      src/views/purchase-management/settlement/sendPurchaseSettlement.vue

+ 33 - 0
src/api/inbound-outbound/salesOutbound.js

@@ -0,0 +1,33 @@
+import request from '@/router/axios'
+
+// 销售出库列表 
+export function salesOrderList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderSales/issuePage',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+
+// 查询订单明细
+export function getOrderDetails(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderDetails/listByOrderSalesId',
+    method: 'post',
+    data: data,
+  })
+}
+
+// 出库 
+export function salesOutbound(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderSales/issue',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+

+ 53 - 0
src/api/order-management/order/JDorder.js

@@ -0,0 +1,53 @@
+import request from '@/router/axios'
+
+// 订单列表 
+export function JDorderList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderJd/page',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+
+// 添加JDorder 
+export function JDorderAdd(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderJd/add',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+// 编辑JDorder 
+export function JDorderEdit(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderJd/edit',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+
+
+// JDorder导入
+export function excelImport(data = {}) {
+  return request({
+    url: '/api/victoriatourist/orderJd/excelImport',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+// JDorder 
+export function excelImportList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/excelImportLog/page',
+    method: 'post',
+    data: data,
+  })
+}

+ 336 - 0
src/components/inbound-outbound/addInbound.vue

@@ -0,0 +1,336 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="inboundType === 10 ? formRules : formRules1"
+        label-width="100px"
+      >
+        <el-form-item label-width="0px" v-if="inboundType === 20">
+          <el-button type="primary" @click="handleAddProduct">
+            添加物品</el-button
+          >
+        </el-form-item>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="物流单号" prop="id" v-if="inboundType === 10">
+              <el-select
+                v-model="form.id"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+                @change="handleChange"
+              >
+                <el-option
+                  v-for="item in selectList"
+                  :key="item.id"
+                  :label="item.code"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="收获仓库" prop="id" v-if="inboundType === 20">
+              <el-select
+                v-model="form.id"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+                @change="handleChangeWarehouse"
+              >
+                <el-option
+                  v-for="item in warehouseSelectList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                  <span style="float: left">{{
+                    `${item.name}(${dictDataEcho(
+                      item.type,
+                      warehouseTypeList
+                    )})`
+                  }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item v-if="inboundType === 10">
+          <el-table :data="form.changeDetailsList">
+            <el-table-column label="申购单号" prop="applyPurchaseCode">
+            </el-table-column>
+            <el-table-column label="物品编码" prop="productCode">
+            </el-table-column>
+            <el-table-column label="物品名称" prop="productName">
+            </el-table-column>
+            <el-table-column label="物品类型" prop="productType">
+            </el-table-column>
+            <el-table-column label="收货仓库" prop="warehouseName">
+            </el-table-column>
+            <el-table-column label="申购数量" prop="applyPurchaseQuantity">
+            </el-table-column>
+            <el-table-column label="发货数量" prop="shipmentQuantity">
+            </el-table-column>
+            <el-table-column label="到货数量" prop="changeQuantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="
+                    'changeDetailsList.' + scope.$index + '.changeQuantity'
+                  "
+                  :rules="formRules.changeQuantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.changeQuantity"
+                    :placeholder="$t('pleaseInput')"
+                    size="mini"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+        <el-form-item v-if="inboundType === 20">
+          <el-table :data="form.changeDetailsList">
+            <el-table-column label="物品编码" prop="productCode">
+            </el-table-column>
+            <el-table-column label="物品名称" prop="productName">
+            </el-table-column>
+            <el-table-column label="物品类型" prop="productType">
+            </el-table-column>
+            <el-table-column label="收货仓库" prop="warehouseName">
+            </el-table-column>
+            <el-table-column label="仓库现有库存" prop="applyPurchaseQuantity">
+            </el-table-column>
+
+            <el-table-column label="入库数量" prop="changeQuantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="
+                    'changeDetailsList.' + scope.$index + '.changeQuantity'
+                  "
+                  :rules="formRules1.changeQuantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.changeQuantity"
+                    :placeholder="$t('pleaseInput')"
+                    size="mini"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column
+              :label="$t('operation')"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="deleteRow(scope.$index)">{{
+                  $t("delete")
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+
+    <el-dialog
+      :title="$t('goodsSelect')"
+      v-if="selectDialog"
+      :visible.sync="selectDialog"
+      width="80%"
+      top="60px"
+    >
+      <selectProduct @select="handleSelect"></selectProduct>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+import selectProduct from "@/components/select-product/index.vue";
+
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+
+export default {
+  name: "addInbound",
+  components: { labelTitle, selectProduct },
+  props: {
+    // 入库类型  10 采购入库  20 手动入库
+    inboundType: {
+      type: Number,
+      default: () => 10,
+    },
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    warehouseSelectList: {
+      type: Array,
+      default: () => [],
+    },
+    warehouseTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      selectLit: [],
+      loading: false,
+      formRules: {
+        id: [
+          {
+            required: true,
+            message: "请选择物流单号",
+            trigger: "change",
+          },
+        ],
+        changeQuantity: [
+          {
+            required: true,
+            message: "请输入到货数量",
+            trigger: "blur",
+          },
+        ],
+      },
+      formRules1: {
+        id: [
+          {
+            required: true,
+            message: "请选择收货仓库",
+            trigger: "change",
+          },
+        ],
+        changeQuantity: [
+          {
+            required: true,
+            message: "请输入入库数量",
+            trigger: "blur",
+          },
+        ],
+      },
+      selectDialog: false,
+      warehouseName: "",
+    };
+  },
+  created() {
+    this.getSelectList();
+  },
+  methods: {
+    getSelectList() {
+      this.loading = true;
+      API.saleOrdersList().then(
+        (res) => {
+          this.selectLit = res.data.data.records;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("saleOrdersList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          if (this.inboundType === 10) {
+            this.form.changeDetailsList = this.form.changeDetailsList.map(
+              (x) => ({
+                businessId: this.form.id,
+                goodsId: x.id,
+                warehouseId: x.warehouseId,
+                changeQuantity: x.changeQuantity,
+              })
+            );
+          } else if (this.inboundType === 20) {
+            this.form.changeDetailsList = this.form.changeDetailsList.map(
+              (x) => ({
+                goodsId: x.goodsId,
+                warehouseId: this.form.id,
+                changeQuantity: x.changeQuantity,
+              })
+            );
+          }
+          delete this.form.id;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+    handleChange(id) {
+      this.loading = true;
+      API.inboundDetails({ id }).then(
+        (res) => {
+          this.form.changeDetailsList = res.data.data.map((x) => ({
+            ...x,
+            changeQuantity: "",
+          }));
+          this.loading = false;
+        },
+        (err) => {
+          console.log("inboundDetails: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleChangeWarehouse(id) {
+      const current = this.warehouseSelectList.find((x) => x.id === id);
+      if (current) {
+        this.warehouseName = current.name;
+      }
+      this.form.changeDetailsList = [];
+    },
+    handleAddProduct() {
+      if (!this.form.id) return this.msgInfo("请先选择收获仓库");
+      this.selectDialog = true;
+    },
+    handleSelect(row) {
+      const flag = this.form.changeDetailsList.some(
+        (x) => x.goodsId === row.id
+      );
+      if (flag) return this.msgInfo("该物品已经选择");
+      const product = {
+        productCode: row.code,
+        productName: row.name,
+        productType: row.type,
+        warehouseName: this.warehouseName,
+        goodsId: row.id,
+        changeQuantity: "",
+      };
+      this.form.changeDetailsList.push(product);
+    },
+    deleteRow(index) {
+      this.form.changeDetailsList.splice(index, 1);
+      this.msgSuccess(this.$t("deleteSuccess"));
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>

+ 239 - 0
src/components/inbound-outbound/addOutbound.vue

@@ -0,0 +1,239 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-row :gutter="10">
+          <el-col :span="8">
+            <el-form-item label="客户名称" prop="customerName" required>
+              <el-input v-model="form.customerName" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="订单类型" required>
+              <el-select
+                v-model="form.type"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+                disabled
+              >
+                <el-option
+                  v-for="item in orderTypeList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="仓库名称" prop="warehouseId">
+              <el-select
+                v-model="form.warehouseId"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in warehouseSelectList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                  <span style="float: left">{{
+                    `${item.name}(${dictDataEcho(
+                      item.type,
+                      warehouseTypeList
+                    )})`
+                  }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div style="margin-bottom: 20px">
+          <labelTitle content="订单明细"></labelTitle>
+        </div>
+        <el-form-item>
+          <el-table :data="form.orderDetailsList">
+            <el-table-column label="产品编码" prop="productCode">
+            </el-table-column>
+            <el-table-column label="产品名称" prop="productName">
+            </el-table-column>
+            <el-table-column label="规格" prop="name"> </el-table-column>
+            <el-table-column label="待出库" prop="notIssuedQuantity">
+            </el-table-column>
+            <el-table-column label="本次出库" prop="changeQuantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="'orderDetailsList.' + scope.$index + '.changeQuantity'"
+                  :rules="formRules.changeQuantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.changeQuantity"
+                    :placeholder="$t('pleaseInput')"
+                    size="mini"
+                    @change="(val) => handleChange(val, scope.$index)"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              :label="$t('operation')"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="deleteRow(scope.$index)">{{
+                  $t("delete")
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+        <div style="margin-bottom: 20px">
+          <labelTitle content="物流信息"></labelTitle>
+        </div>
+        <el-row :gutter="10">
+          <el-col :span="6">
+            <el-form-item label="物流/快递公司">
+              <el-select
+                v-model="form.id"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in orderTypeList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item
+              label="物流/快递单号"
+              prop="logisticsCompanyCode"
+              required
+            >
+              <el-input
+                v-model="form.logisticsCompanyCode"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "addOutbound",
+  components: { labelTitle },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    orderTypeList: {
+      type: Array,
+      default: () => [],
+    },
+    warehouseSelectList: {
+      type: Array,
+      default: () => [],
+    },
+    warehouseTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+      loading: false,
+      formRules: {
+        changeQuantity: [
+          {
+            required: true,
+            message: "请输入本次出库数量",
+            trigger: "blur",
+          },
+        ],
+        warehouseId: [
+          {
+            required: true,
+            message: "请选择仓库",
+            trigger: "change",
+          },
+        ],
+        planArrivalTime: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.askArrivalTime"),
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+    handleChange(val, index) {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>

+ 104 - 0
src/router/page/index.js

@@ -294,6 +294,19 @@ export default [
     ],
   },
   {
+    path: '/purchase-management/settlement',
+    component: Layout,
+    redirect: '/purchase-management/settlement/purchaseSettlement',
+    children: [
+      {
+        path: 'purchaseSettlement',
+        name: '采购结算',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/purchase-management/settlement/purchaseSettlement'),
+        props: true,
+      },
+    ],
+  },
+  {
     path: '/order-management/order',
     component: Layout,
     redirect: '/order-management/order/index',
@@ -307,6 +320,45 @@ export default [
     ],
   },
   {
+    path: '/order-management/order',
+    component: Layout,
+    redirect: '/order-management/order/JDorder',
+    children: [
+      {
+        path: 'JDorder',
+        name: '京东订单',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/order-management/order/JDorder'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/inventory-management/query',
+    component: Layout,
+    redirect: '/inventory-management/query/index',
+    children: [
+      {
+        path: 'index',
+        name: '库存查询',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inventory-management/query/index'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/inventory-management/check',
+    component: Layout,
+    redirect: '/inventory-management/check/index',
+    children: [
+      {
+        path: 'index',
+        name: '库存盘点',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inventory-management/check/index'),
+        props: true,
+      },
+    ],
+  },
+  {
     path: '/inbound-outbound/inbound',
     component: Layout,
     redirect: '/inbound-outbound/inbound/index',
@@ -320,6 +372,32 @@ export default [
     ],
   },
   {
+    path: '/inbound-outbound/cgInbound',
+    component: Layout,
+    redirect: '/inbound-outbound/cgInbound/index',
+    children: [
+      {
+        path: 'index',
+        name: '采购入库',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inbound-outbound/cgInbound/index'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/inbound-outbound/inbound',
+    component: Layout,
+    redirect: '/inbound-outbound/inbound/qualityTesting',
+    children: [
+      {
+        path: 'qualityTesting',
+        name: '入库质检',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inbound-outbound/inbound/qualityTesting'),
+        props: true,
+      },
+    ],
+  },
+  {
     path: '/inbound-outbound/outbound',
     component: Layout,
     redirect: '/inbound-outbound/outbound/index',
@@ -332,6 +410,32 @@ export default [
       },
     ],
   },
+  {
+    path: '/inbound-outbound/salesOutbound',
+    component: Layout,
+    redirect: '/inbound-outbound/salesOutbound/index',
+    children: [
+      {
+        path: 'index',
+        name: '销售订单出库',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inbound-outbound/salesOutbound/index'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/inbound-outbound/JDoutbound',
+    component: Layout,
+    redirect: '/inbound-outbound/JDoutbound/index',
+    children: [
+      {
+        path: 'index',
+        name: '京东订单出库',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inbound-outbound/JDoutbound/index'),
+        props: true,
+      },
+    ],
+  },
 
   {
     path: '/equipment',

+ 266 - 0
src/views/inbound-outbound/JDoutbound/index.vue

@@ -0,0 +1,266 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import byTable from "@/components/by-table/index.js";
+// import addOutbound from "./addOutbound.vue";
+
+// import * as API from "@/api/inbound-outbound/outbound/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+  },
+  data() {
+    return {
+      productTypeList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "合并出库",
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "配送中心",
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      titleText: "京东订单出库",
+      open: false,
+      form: {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [{}],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    const list = businessDictData.find(
+      (item) => item.code === "productType"
+    ).children;
+    this.selectConfig[0].data = list.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+    this.productTypeList = list;
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.titleText = "add";
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.titleText = "edit";
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addCustomer.loading = true;
+        this.$refs.addCustomer.countryChange(this.form.countryId);
+        this.$refs.addCustomer.provinceChange(this.form.provinceId);
+        this.$refs.addCustomer.loading = false;
+      });
+    },
+    handleSubmit() {
+      if (!this.form.id) {
+        API.outboundAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.outboundEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundEdit: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column type="selection" width="50" align="center">
+        </el-table-column>
+        <el-table-column label="订单编号" align="center" prop="code" />
+        <el-table-column label="配送中心" align="center" prop="name" />
+        <el-table-column
+          label="京东仓库"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column label="收货人" align="center" prop="contacts" />
+        <el-table-column label="详细地址" align="center" prop="phone" />
+
+        <el-table-column :label="$t('operation')" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleEdit(scope.row)"
+              >{{ $t("edit") }}
+            </el-button>
+            <el-button type="text" @click="handleDelete(scope.row)"
+              >{{ $t("delete") }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <!-- <add-outbound
+        :form="form"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addOutbound"
+      ></add-outbound> -->
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 0 - 0
src/views/inbound-outbound/cgInbound.vue


+ 272 - 0
src/views/inbound-outbound/cgInbound/index.vue

@@ -0,0 +1,272 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+import addInbound from "@/components/inbound-outbound/addInbound.vue";
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+
+export default {
+  components: {
+    test,
+    query,
+    addInbound,
+  },
+  data() {
+    return {
+      warehouseTypeList: [],
+      warehouseSelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "采购入库",
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+            {
+              name: "入库质检",
+              methodsText: "add",
+              type: "defualt",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "收获仓库",
+          prop: "type",
+          data: [],
+        },
+        {
+          label: "入库状态",
+          prop: "type",
+          data: [
+            { label: "已完成", value: "1" },
+            { label: "未完成", value: "2" },
+          ],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      inboundType: 10, // 入库类型  10 采购入库  20 手动入库
+      titleText: "",
+      open: false,
+      form: {
+        id: "",
+        changeDetailsList: [],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+    this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.titleText = "edit";
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addInbound.loading = true;
+        this.$refs.addInbound.countryChange(this.form.countryId);
+        this.$refs.addInbound.provinceChange(this.form.provinceId);
+        this.$refs.addInbound.loading = false;
+      });
+    },
+    handleSubmit() {
+      API.purchaseAdd(this.form).then(
+        () => {
+          this.msgSuccess(this.$t("addSuccess"));
+          this.$refs.addInbound.loading = false;
+          this.open = false;
+          this.getList();
+        },
+        (err) => {
+          console.log("purchaseAdd: " + err);
+          this.$refs.addInbound.loading = false;
+        }
+      );
+      // if (this.inboundType === 10) {
+
+      // } else {
+      //   API.manualAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.open = false;
+      //       this.$refs.addInbound.loading = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("manualAdd: " + err);
+      //       this.$refs.addInbound.loading = false;
+      //     }
+      //   );
+      // }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="采购单号" align="center" prop="code" />
+        <el-table-column label="申购数量" align="center" prop="name" />
+        <el-table-column label="已入库数量" align="center" />
+        <el-table-column label="未入库数量" align="center" prop="contacts" />
+        <el-table-column label="收获仓库" align="center" prop="phone" />
+        <el-table-column label="入库日期" align="center" prop="phone" />
+        <el-table-column label="申购人" align="center" prop="phone" />
+
+        <el-table-column label="入库状态" align="center" prop="phone" />
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      title="采购入库"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <add-inbound
+        :form="form"
+        :warehouseSelectList="warehouseSelectList"
+        :warehouseTypeList="warehouseTypeList"
+        :inboundType="inboundType"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addInbound"
+      ></add-inbound>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 332 - 0
src/views/inbound-outbound/inbound/qualityTesting.vue

@@ -0,0 +1,332 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+import byTable from "@/components/by-table/index.js";
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+  },
+  data() {
+    return {
+      warehouseTypeList: [],
+      warehouseSelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "返回上级",
+              methodsText: "back",
+              type: "primary",
+              back: () => {
+                this.handleBack();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "收获仓库",
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [{}],
+      loading: false,
+      inboundType: null, // 入库类型  10 采购入库  20 手动入库
+      titleText: "质检",
+      open: false,
+      form: {
+        id: "",
+        changeDetailsList: [],
+      },
+      formConfig: {
+        code: {
+          label: "物品编码",
+          type: "select",
+          span: 3,
+        },
+        name: {
+          label: "物品名称",
+          type: "select",
+        },
+        num: {
+          label: "质检数量",
+          type: "input",
+          span: 3,
+        },
+        type: {
+          label: "质检结论",
+          type: "select",
+          span: 3,
+        },
+        otherButton: {
+          align: "center",
+          list: [
+            {
+              name: this.$t("cancelText"),
+              methodsText: "cancel",
+              cancel: () => {
+                this.open = false;
+              },
+            },
+            {
+              name: this.$t("submitText"),
+              methodsText: "submit",
+              type: "primary",
+              submit: () => {
+                this.handleSubmit();
+              },
+            },
+          ],
+        },
+      },
+      formRules: {
+        code: [
+          {
+            required: true,
+            message: "请选择物品编码",
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message: "请选择物品名称",
+            trigger: "change",
+          },
+        ],
+        num: [
+          {
+            required: true,
+            message: "请输入质检数量",
+            trigger: "blur",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message: "请选择质检结论",
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+    this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd(type) {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+
+      this.inboundType = type;
+      this.open = true;
+    },
+    startQuality(row) {
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+
+        changeDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addInbound.loading = true;
+        this.$refs.addInbound.countryChange(this.form.countryId);
+        this.$refs.addInbound.provinceChange(this.form.provinceId);
+        this.$refs.addInbound.loading = false;
+      });
+    },
+    handleSubmit() {
+      // if (this.inboundType === 10) {
+      //   API.purchaseAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.$refs.addInbound.loading = false;
+      //       this.open = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("purchaseAdd: " + err);
+      //       this.$refs.addInbound.loading = false;
+      //     }
+      //   );
+      // } else {
+      //   API.manualAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.open = false;
+      //       this.$refs.addInbound.loading = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("manualAdd: " + err);
+      //       this.$refs.addInbound.loading = false;
+      //     }
+      //   );
+      // }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="申购单号" align="center" prop="code" />
+        <el-table-column label="物品编码" align="center" prop="name" />
+        <el-table-column label="物品名称" align="center" />
+        <el-table-column label="到货数量" align="center" prop="contacts" />
+        <el-table-column label="到货数量" align="center" prop="phone" />
+        <el-table-column label="到货日期" align="center" prop="phone" />
+        <el-table-column label="收获仓库" align="center" prop="phone" />
+        <el-table-column label="入库类型" align="center" prop="phone" />
+        <el-table-column label="质检人" align="center" prop="phone" />
+        <el-table-column label="质检日期" align="center" prop="phone" />
+        <el-table-column label="质检数量" align="center" prop="phone" />
+        <el-table-column label="质检结论" align="center" prop="phone" />
+        <el-table-column label="质检说明" align="center" prop="phone" />
+        <el-table-column :label="$t('operation')" align="center" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" @click="startQuality(scope.row)">
+              开始质检
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="50%"
+      top="60px"
+    >
+      <test
+        ref="test"
+        v-model="form"
+        :form-config="formConfig"
+        :insideRules="formRules"
+      ></test>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 270 - 0
src/views/inbound-outbound/salesOutbound/addOutbound.vue

@@ -0,0 +1,270 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="销售订单" prop="receiptWarehouseId">
+              <el-select
+                v-model="form.receiptWarehouseId"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in subscribeTypeList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="8">
+            <el-form-item
+              :label="$t('purchase_management.subscribe.askArrivalTime')"
+              prop="planArrivalTime"
+            >
+              <el-date-picker
+                v-model="form.planArrivalTime"
+                type="datetime"
+                :placeholder="$t('pleaseSelect')"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                style="width: 100%"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item
+              :label="$t('purchase_management.subscribe.subscribeDescription')"
+              prop="cause"
+            >
+              <el-input
+                v-model="form.cause"
+                :placeholder="$t('pleaseInput')"
+                type="textarea"
+                rows="4"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div style="margin-bottom: 20px">
+          <labelTitle
+            :content="$t('purchase_management.subscribe.subscribeDetails')"
+          ></labelTitle>
+        </div>
+        <el-form-item label-width="0px">
+          <el-button @click="selectDialog = true">
+            {{ $t("select") }}</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-table :data="form.goodsId">
+            <el-table-column
+              :label="$t('purchase_management.subscribe.goodCode')"
+              prop="code"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.subscribe.goodName')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.subscribe.goodType')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.subscribe.unit')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.subscribe.stock')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.subscribe.subscribeQuantity')"
+              prop="name"
+            >
+              <template slot-scope="scope">
+                <el-form-item label-width="0px" prop="aa">
+                  <el-input> </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              :label="$t('operation')"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="deleteRow(scope.$index)">{{
+                  $t("delete")
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "addCustomer",
+  components: { labelTitle },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+
+      loading: false,
+      formRules: {
+        receiptWarehouseId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.harvestWarehouse"),
+            trigger: "change",
+          },
+        ],
+        planArrivalTime: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.askArrivalTime"),
+            trigger: "change",
+          },
+        ],
+        countryId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.country"),
+            trigger: "change",
+          },
+        ],
+        provinceId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.province"),
+            trigger: "change",
+          },
+        ],
+        cityId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.city"),
+            trigger: "change",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.subscribe.subscribeType"),
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.subscribe.subscribeName"),
+            trigger: "blur",
+          },
+        ],
+        contacts: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.subscribe.contacts"),
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.subscribe.contactNumber"),
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>

+ 267 - 0
src/views/inbound-outbound/salesOutbound/index.vue

@@ -0,0 +1,267 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import addOutbound from "@/components/inbound-outbound/addOutbound.vue";
+
+import * as API from "@/api/inbound-outbound/salesOutbound.js";
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+
+export default {
+  components: {
+    test,
+    query,
+    addOutbound,
+  },
+  data() {
+    return {
+      orderTypeList: [],
+      warehouseTypeList: [],
+      warehouseSelectList: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        type: "",
+        status: "",
+        code: "",
+        customerName: "",
+        minAmountMoney: "",
+        maxAmountMoney: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+      },
+      selectConfig: [
+        {
+          label: "订单类型",
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [],
+      total: 0,
+      loading: false,
+      titleText: "销售订单出库",
+      open: false,
+      form: {
+        orderId: "",
+        warehouseId: "",
+        logisticsCode: "",
+        logisticsCompanyCode: "",
+        orderDetailsList: [],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+
+    this.orderTypeList = businessDictData.find(
+      (item) => item.code === "orderType"
+    ).children;
+    this.selectConfig[0].data = this.orderTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+    });
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.salesOrderList(this.queryParams).then(
+        (res) => {
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("salesOrderList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleOutbound(row) {
+      this.open = true;
+      this.$nextTick(() => {
+        this.$refs.addOutbound.loading = true;
+        API.getOrderDetails({ orderId: row.id }).then(
+          (res) => {
+            const productDetailsList = res.data.data.map((x) => ({
+              productCode: x.productCode,
+              productName: x.productName,
+              notIssuedQuantity: x.notIssuedQuantity,
+              changeQuantity: "",
+              productId: x.productId,
+              orderDetailsId: x.id,
+            }));
+            this.form = {
+              customerName: row.customerName,
+              type: String(row.type),
+              orderId: row.id,
+              warehouseId: "",
+              logisticsCode: "",
+              logisticsCompanyCode: "",
+              orderDetailsList: productDetailsList,
+            };
+            this.$refs.addOutbound.loading = false;
+          },
+          (err) => {
+            console.log("getOrderDetails: " + err);
+            this.$refs.addOutbound.loading = false;
+          }
+        );
+      });
+    },
+    handleCancel() {
+      this.form = {
+        orderId: "",
+        warehouseId: "",
+        logisticsCode: "",
+        logisticsCompanyCode: "",
+        orderDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleSubmit() {
+      if (!this.form.id) {
+        API.outboundAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.outboundEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundEdit: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      }
+    },
+
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+    showOutboundStatus(row) {
+      if (row.issueStatus === 1) {
+        return "未出库";
+      } else if (row.issueStatus === 2) {
+        return "部分出库";
+      }
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card>
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column
+          label="订单类型"
+          align="center"
+          prop="type"
+          :formatter="(row) => dictDataEcho(row.type, orderTypeList)"
+        />
+        <el-table-column label="订单编号" align="center" prop="code" />
+        <el-table-column label="客户名称" align="center" prop="customerName" />
+        <el-table-column
+          label="收件地址"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column label="下单时间" align="center" prop="orderTime" />
+        <el-table-column
+          label="状态"
+          align="center"
+          prop="issueStatus"
+          :formatter="showOutboundStatus"
+        />
+
+        <el-table-column :label="$t('operation')" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleOutbound(scope.row)"
+              >出库
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <add-outbound
+        :form="form"
+        :orderTypeList="orderTypeList"
+        :warehouseSelectList="warehouseSelectList"
+        :warehouseTypeList="warehouseTypeList"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addOutbound"
+      ></add-outbound>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+}
+</style>

+ 268 - 0
src/views/inventory-management/check/index.vue

@@ -0,0 +1,268 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+import sendCheck from "./sendCheck.vue";
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+
+export default {
+  components: {
+    test,
+    query,
+    sendCheck,
+  },
+  data() {
+    return {
+      warehouseTypeList: [],
+      warehouseSelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "发起盘点",
+              methodsText: "send",
+              type: "primary",
+              send: () => {
+                this.handleSend();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "仓库类型",
+          prop: "type",
+          data: [],
+        },
+        {
+          label: "盘点结论",
+          prop: "type",
+          data: [
+            { label: "正常", value: "1" },
+            { label: "异常", value: "2" },
+          ],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      inboundType: 10, // 入库类型  10 采购入库  20 手动入库
+      titleText: "",
+      open: false,
+      form: {
+        id: "",
+        changeDetailsList: [],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+    this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleSend() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.titleText = "edit";
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addInbound.loading = true;
+        this.$refs.addInbound.countryChange(this.form.countryId);
+        this.$refs.addInbound.provinceChange(this.form.provinceId);
+        this.$refs.addInbound.loading = false;
+      });
+    },
+    handleSubmit() {
+      API.purchaseAdd(this.form).then(
+        () => {
+          this.msgSuccess(this.$t("addSuccess"));
+          this.$refs.addInbound.loading = false;
+          this.open = false;
+          this.getList();
+        },
+        (err) => {
+          console.log("purchaseAdd: " + err);
+          this.$refs.addInbound.loading = false;
+        }
+      );
+      // if (this.inboundType === 10) {
+
+      // } else {
+      //   API.manualAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.open = false;
+      //       this.$refs.addInbound.loading = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("manualAdd: " + err);
+      //       this.$refs.addInbound.loading = false;
+      //     }
+      //   );
+      // }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="盘点单号" align="center" prop="code" />
+        <el-table-column label="仓库类型" align="center" prop="name" />
+        <el-table-column label="仓库名称" align="center" />
+        <el-table-column label="盘点时间" align="center" prop="contacts" />
+        <el-table-column label="盘点人" align="center" prop="phone" />
+        <el-table-column label="盘点结论" align="center" prop="phone" />
+        <el-table-column label="盘点详情" width="100" align="center">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteRow(scope.$index)">{{
+              $t("delete")
+            }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      title="发起盘点"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <send-check
+        :form="form"
+        :warehouseSelectList="warehouseSelectList"
+        :warehouseTypeList="warehouseTypeList"
+        :inboundType="inboundType"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="sendCheck"
+      ></send-check>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 214 - 0
src/views/inventory-management/check/sendCheck.vue

@@ -0,0 +1,214 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-form-item label-width="0px">
+          <el-button type="primary" @click="handleAddProduct">
+            添加物品</el-button
+          >
+        </el-form-item>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="盘点仓库" prop="id">
+              <el-select
+                v-model="form.id"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in warehouseSelectList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                  <span style="float: left">{{
+                    `${item.name}(${dictDataEcho(
+                      item.type,
+                      warehouseTypeList
+                    )})`
+                  }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item>
+          <el-table :data="form.changeDetailsList">
+            <el-table-column label="物品编码" prop="productCode">
+            </el-table-column>
+            <el-table-column label="物品名称" prop="productName">
+            </el-table-column>
+            <el-table-column label="物品类型" prop="productType">
+            </el-table-column>
+            <el-table-column label="单位" prop="warehouseName">
+            </el-table-column>
+            <el-table-column label="仓库现有库存" prop="applyPurchaseQuantity">
+            </el-table-column>
+            <el-table-column label="盘盈亏" prop="shipmentQuantity">
+            </el-table-column>
+            <el-table-column label="盘点数量" prop="changeQuantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="
+                    'changeDetailsList.' + scope.$index + '.changeQuantity'
+                  "
+                  :rules="formRules.changeQuantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.changeQuantity"
+                    :placeholder="$t('pleaseInput')"
+                    size="mini"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column
+              :label="$t('operation')"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="deleteRow(scope.$index)">{{
+                  $t("delete")
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+
+    <el-dialog
+      :title="$t('goodsSelect')"
+      v-if="selectDialog"
+      :visible.sync="selectDialog"
+      width="80%"
+      top="60px"
+    >
+      <selectProduct @select="handleSelect"></selectProduct>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+import selectProduct from "@/components/select-product/index.vue";
+
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+
+export default {
+  name: "addInbound",
+  components: { labelTitle, selectProduct },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    warehouseSelectList: {
+      type: Array,
+      default: () => [],
+    },
+    warehouseTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      selectLit: [],
+      loading: false,
+      formRules: {
+        id: [
+          {
+            required: true,
+            message: "请选择盘点仓库",
+            trigger: "change",
+          },
+        ],
+        changeQuantity: [
+          {
+            required: true,
+            message: "请输入盘点数量",
+            trigger: "blur",
+          },
+        ],
+      },
+
+      selectDialog: false,
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+    handleChange() {},
+    handleChangeWarehouse(id) {
+      const current = this.warehouseSelectList.find((x) => x.id === id);
+      if (current) {
+        this.warehouseName = current.name;
+      }
+      this.form.changeDetailsList = [];
+    },
+    handleAddProduct() {
+      if (!this.form.id) return this.msgInfo("请先选择盘点仓库");
+      this.selectDialog = true;
+    },
+    handleSelect(row) {
+      const flag = this.form.changeDetailsList.some(
+        (x) => x.goodsId === row.id
+      );
+      if (flag) return this.msgInfo("该物品已经选择");
+      const product = {
+        productCode: row.code,
+        productName: row.name,
+        productType: row.type,
+        warehouseName: this.warehouseName,
+        goodsId: row.id,
+        changeQuantity: "",
+      };
+      this.form.changeDetailsList.push(product);
+    },
+    deleteRow(index) {
+      this.form.changeDetailsList.splice(index, 1);
+      this.msgSuccess(this.$t("deleteSuccess"));
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>

+ 202 - 0
src/views/inventory-management/query/index.vue

@@ -0,0 +1,202 @@
+
+
+<script>
+import query from "@/components/query/index.vue";
+import * as API from "@/api/order-management/order/JDorder.js";
+
+export default {
+  components: {
+    query,
+  },
+  data() {
+    return {
+      activeName: "first",
+      warehouseTypeList: [],
+      productTypeList: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        status: "",
+        keyword: "",
+        customerName: "",
+        code: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+        minAmountMoney: "",
+        maxAmountMoney: "",
+      },
+      selectConfigOne: [
+        {
+          label: "产品类型",
+          prop: "type",
+          data: [],
+        },
+      ],
+
+      selectConfigTwo: [
+        {
+          label: "仓库类型",
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [],
+      total: 0,
+      loading: false,
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.productTypeList = businessDictData.find(
+      (item) => item.code === "productType"
+    ).children;
+
+    this.selectConfigOne[0].data = this.productTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+
+    this.selectConfigTwo[0].data = this.warehouseTypeList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.JDorderList(this.queryParams).then(
+        (res) => {
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("JDorderList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleClick() {},
+  },
+};
+</script>
+  <template>
+  <div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="仓库库存" name="first"> </el-tab-pane>
+      <el-tab-pane label="产品库存" name="second"> </el-tab-pane>
+      <el-tab-pane label="组合库存" name="third"> </el-tab-pane>
+    </el-tabs>
+    <el-card class="box-card">
+      <div v-show="activeName === 'first'">
+        <query
+          :selectConfig="selectConfigOne"
+          :req="queryParams"
+          :isShowMore="false"
+          @handleQuery="handleQuery"
+          @handleMore="
+            () => {
+              queryDialog = true;
+            }
+          "
+        ></query>
+        <el-table :data="tableList" v-loading="loading">
+          <el-table-column
+            label="产品类型"
+            align="center"
+            :formatter="(row) => dictDataEcho(row.type, productTypeList)"
+          />
+          <el-table-column label="SPU编码" align="center" prop="customerName" />
+          <el-table-column label="产品编码" align="center" prop="amountMoney" />
+          <el-table-column label="产品名称" align="center" />
+          <el-table-column label="单位" align="center" prop="orderTime" />
+          <el-table-column label="现有库存" align="center" />
+        </el-table>
+      </div>
+
+      <div v-show="activeName === 'second'">
+        <query
+          :selectConfig="selectConfigTwo"
+          :req="queryParams"
+          :isShowMore="false"
+          @handleQuery="handleQuery"
+          @handleMore="
+            () => {
+              queryDialog = true;
+            }
+          "
+        ></query>
+        <el-table :data="tableList" v-loading="loading">
+          <el-table-column
+            label="仓库类型"
+            align="center"
+            :formatter="(row) => dictDataEcho(row.type, warehouseTypeList)"
+          />
+          <el-table-column
+            label="产品名称"
+            align="center"
+            prop="customerName"
+          />
+
+          <el-table-column label="现有库存" align="center" />
+          <el-table-column label="仓管员" align="center" prop="orderTime" />
+        </el-table>
+      </div>
+
+      <div v-show="activeName === 'third'">
+        <query
+          :selectConfig="selectConfigOne"
+          :req="queryParams"
+          :isShowMore="false"
+          @handleQuery="handleQuery"
+          @handleMore="
+            () => {
+              queryDialog = true;
+            }
+          "
+        ></query>
+        <el-table :data="tableList" v-loading="loading">
+          <el-table-column
+            label="产品类型"
+            align="center"
+            :formatter="(row) => dictDataEcho(row.type, productTypeList)"
+          />
+          <el-table-column
+            label="产品编码"
+            align="center"
+            prop="customerName"
+          />
+
+          <el-table-column label="产品名称" align="center" />
+          <el-table-column label="单位" align="center" />
+
+          <el-table-column label="库存数量" align="center" />
+        </el-table>
+      </div>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+  </div>
+</template>
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px - 60px);
+  overflow-y: auto;
+}
+</style>

+ 356 - 0
src/views/order-management/order/JDorder.vue

@@ -0,0 +1,356 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import byTable from "@/components/by-table/index.js";
+import addOrder from "./addOrder.vue";
+
+import * as API from "@/api/order-management/order/JDorder.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    addOrder,
+  },
+  data() {
+    return {
+      orderStatusList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: this.$t("order_management.order.orderAdd"),
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+            {
+              name: "Excel导入",
+              methodsText: "excelImport",
+              type: "primary",
+              excelImport: () => {
+                this.excelImport();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        status: "",
+        keyword: "",
+        customerName: "",
+        code: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+        minAmountMoney: "",
+        maxAmountMoney: "",
+      },
+      selectConfig: [
+        {
+          label: "订单状态",
+          prop: "status",
+          data: [],
+        },
+      ],
+      tableList: [],
+      total: 0,
+      loading: false,
+      titleText: "",
+      open: false,
+      form: {
+        money: "",
+        customerInfoId: "",
+        type: "",
+        countryId: "China",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        orderDetailsList: [],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.orderStatusList = businessDictData.find(
+      (item) => item.code === "orderStatus"
+    ).children;
+
+    this.selectConfig[0].data = this.orderStatusList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
+
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.JDorderList(this.queryParams).then(
+        (res) => {
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("JDorderList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        money: "",
+        customerInfoId: "",
+        type: "",
+        countryId: "China",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        orderDetailsList: [],
+      };
+      this.titleText = "add";
+      this.open = true;
+      this.$nextTick(() => {
+        this.$refs.addOrder.countryChange(this.form.countryId);
+      });
+    },
+    handleCancel() {
+      this.form = {
+        money: "",
+        customerInfoId: "",
+        type: "",
+        countryId: "China",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        orderDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleChangeStatus(row, status) {
+      this.$confirm("是否确认进行该操作", {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.orderEdit({ id: row.id, status }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getList();
+        });
+      });
+    },
+    handleSubmit() {
+      API.JDorderAdd(this.form).then(
+        () => {
+          this.msgSuccess(this.$t("addSuccess"));
+          this.$refs.addOrder.loading = false;
+          this.open = false;
+          this.getList();
+        },
+        (err) => {
+          console.log("JDorderAdd: " + err);
+          this.$refs.addOrder.loading = false;
+        }
+      );
+      // if (!this.form.id) {
+      //   API.JDorderAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.$refs.addOrder.loading = false;
+      //       this.open = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("JDorderAdd: " + err);
+      //       this.$refs.addOrder.loading = false;
+      //     }
+      //   );
+      // } else {
+      //   API.JDorderEdit(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("editSuccess"));
+      //       this.open = false;
+      //       this.$refs.addOrder.loading = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("JDorderEdit: " + err);
+      //       this.$refs.addOrder.loading = false;
+      //     }
+      //   );
+      // }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.orderDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+    excelImport() {
+      API.excelImportList({ businessType: 1, beginTime: "", endTime: "" }).then(
+        (res) => {
+          console.log(res, "aaaa");
+        }
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column
+          :label="$t('order_management.order.orderCode')"
+          align="center"
+          prop="code"
+        />
+        <el-table-column
+          :label="$t('order_management.order.customerName')"
+          align="center"
+          prop="customerName"
+          :formatter="(row) => '京东'"
+        />
+        <el-table-column
+          :label="$t('order_management.order.orderAmount')"
+          align="center"
+          prop="amountMoney"
+        />
+        <el-table-column
+          :label="$t('order_management.order.recipientCity')"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column
+          :label="$t('order_management.order.orderTime')"
+          align="center"
+          prop="orderTime"
+        />
+        <el-table-column
+          :label="$t('order_management.order.orderStatus')"
+          align="center"
+          :formatter="(row) => dictDataEcho(row.status, orderStatusList)"
+        />
+
+        <!-- <el-table-column :label="$t('operation')" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              v-if="scope.row.status === 1"
+              @click="handleChangeStatus(scope.row, '2')"
+              >完成
+            </el-button>
+            <el-button
+              type="text"
+              v-if="scope.row.status === 1"
+              @click="handleChangeStatus(scope.row, '3')"
+              >取消
+            </el-button>
+          </template>
+        </el-table-column> -->
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      :title="
+        titleText === 'add'
+          ? $t('order_management.order.orderAdd')
+          : $t('order_management.order.orderEdit')
+      "
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <add-order
+        :form="form"
+        :JDorder="true"
+        :orderTypeList="orderTypeList"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addOrder"
+      ></add-order>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border_management-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 149 - 30
src/views/order-management/order/addOrder.vue

@@ -8,7 +8,25 @@
         :rules="formRules"
         label-width="100px"
       >
-        <el-row :gutter="10">
+        <el-row :gutter="10" v-if="JDorder">
+          <el-col :span="8">
+            <el-form-item label="客户名称" required>
+              <el-input placeholder="京东" disabled> </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="订单类型" required>
+              <el-input placeholder="京东订单" disabled> </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="订单编号" required>
+              <el-input v-model="form.code" placeholder="请输入"> </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10" v-else>
           <el-col :span="12">
             <el-form-item
               :label="$t('order_management.order.customerName')"
@@ -50,6 +68,7 @@
             </el-form-item>
           </el-col>
         </el-row>
+
         <div style="margin-bottom: 20px">
           <labelTitle
             :content="$t('order_management.order.orderDetails')"
@@ -61,7 +80,7 @@
           >
         </el-form-item>
         <el-form-item>
-          <el-table :data="form.orderSalesDetailsList">
+          <el-table :data="form.orderDetailsList" v-if="JDorder">
             <el-table-column
               :label="$t('order_management.order.productCode')"
               prop="code"
@@ -82,7 +101,60 @@
             <el-table-column label="数量" prop="quantity">
               <template slot-scope="scope">
                 <el-form-item
-                  :prop="'orderSalesDetailsList.' + scope.$index + '.quantity'"
+                  :prop="'orderDetailsList.' + scope.$index + '.quantity'"
+                  :rules="formRules.quantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input-number
+                    v-model="scope.row.quantity"
+                    :label="$t('pleaseInput')"
+                    style="width: 100%"
+                    size="mini"
+                    @change="totalAmount"
+                    :controls="false"
+                    :min="1"
+                    :max="9999"
+                  >
+                  </el-input-number>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column label="小计" prop="subtotal"> </el-table-column>
+            <el-table-column
+              :label="$t('operation')"
+              width="100"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="deleteRow(scope.$index)">{{
+                  $t("delete")
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-table :data="form.orderDetailsList" v-else>
+            <el-table-column
+              :label="$t('order_management.order.productCode')"
+              prop="code"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('order_management.order.productName')"
+              prop="name"
+            >
+            </el-table-column>
+
+            <el-table-column
+              :label="$t('order_management.order.price')"
+              prop="price"
+            >
+            </el-table-column>
+
+            <el-table-column label="数量" prop="quantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="'orderDetailsList.' + scope.$index + '.quantity'"
                   :rules="formRules.quantity"
                   :inline-message="true"
                   label-width="0"
@@ -224,10 +296,12 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-input
-                v-model="form.detailedAddress"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+              <el-form-item label-width="0" prop="detailedAddress">
+                <el-input
+                  v-model="form.detailedAddress"
+                  placeholder="详细地址"
+                ></el-input>
+              </el-form-item>
             </el-col>
           </el-row>
         </el-form-item>
@@ -242,7 +316,7 @@
       >
     </div>
     <el-dialog
-      :title="$t('orderSelect')"
+      title="物品选择"
       v-if="selectDialog"
       :visible.sync="selectDialog"
       width="80%"
@@ -271,6 +345,10 @@ export default {
       type: Object,
       default: () => {},
     },
+    JDorder: {
+      type: Boolean,
+      default: () => false,
+    },
     customerSelectList: {
       type: Array,
       default: () => [],
@@ -362,6 +440,13 @@ export default {
             trigger: "blur",
           },
         ],
+        detailedAddress: [
+          {
+            required: true,
+            message: "请输入详细地址",
+            trigger: "blur",
+          },
+        ],
         quantity: [
           {
             required: true,
@@ -382,8 +467,13 @@ export default {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          if (!this.form.orderSalesDetailsList.length > 0)
-            return this.msgInfo("请选择您需要的产品");
+          if (this.JDorder) {
+            if (!this.form.orderDetailsList.length > 0)
+              return this.msgInfo("请选择您需要的产品");
+          } else {
+            if (!this.form.orderDetailsList.length > 0)
+              return this.msgInfo("请选择您需要的产品");
+          }
           this.loading = true;
           this.$emit("submit");
         }
@@ -403,33 +493,62 @@ export default {
       });
     },
     handleSelect(row) {
-      const flag = this.form.orderSalesDetailsList.some(
-        (x) => x.productId === row.id
-      );
-      if (flag) return this.msgInfo("该产品您已选择");
-      this.form.orderSalesDetailsList.push({
-        code: row.code,
-        name: row.name,
-        subtotal: "",
-        productId: row.id,
-        quantity: undefined,
-        price: row.purchasePrice,
-        remark: "",
-      });
+      if (this.JDorder) {
+        const flag = this.form.orderDetailsList.some(
+          (x) => x.productId === row.id
+        );
+        if (flag) return this.msgInfo("该产品您已选择");
+        this.form.orderDetailsList.push({
+          code: row.code,
+          name: row.name,
+          subtotal: "",
+          productId: row.id,
+          quantity: undefined,
+          price: row.purchasePrice,
+          remark: "",
+        });
+      } else {
+        const flag = this.form.orderDetailsList.some(
+          (x) => x.productId === row.id
+        );
+        if (flag) return this.msgInfo("该产品您已选择");
+        this.form.orderDetailsList.push({
+          code: row.code,
+          name: row.name,
+          subtotal: "",
+          productId: row.id,
+          quantity: undefined,
+          price: row.purchasePrice,
+          remark: "",
+        });
+      }
       this.msgSuccess(this.$t("addSuccess"));
     },
     deleteRow(index) {
-      this.form.orderSalesDetailsList.splice(index, 1);
+      if (this.JDorder) {
+        this.form.orderDetailsList.splice(index, 1);
+      } else {
+        this.form.orderDetailsList.splice(index, 1);
+      }
       this.msgSuccess(this.$t("deleteSuccess"));
       this.totalAmount();
     },
     totalAmount() {
-      this.form.orderSalesDetailsList.forEach((x) => {
-        x.subtotal = Number(x.quantity) * Number(x.price);
-      });
-      this.form.money = this.form.orderSalesDetailsList.reduce((sum, x) => {
-        return sum + Number(x.subtotal);
-      }, 0);
+      if (this.JDorder) {
+        this.form.orderDetailsList.forEach((x) => {
+          x.subtotal = Number(x.quantity) * Number(x.price);
+        });
+        this.form.money = this.form.orderDetailsList.reduce((sum, x) => {
+          return sum + Number(x.subtotal);
+        }, 0);
+      } else {
+        this.form.orderDetailsList.forEach((x) => {
+          x.subtotal = Number(x.quantity) * Number(x.price);
+        });
+        this.form.money = this.form.orderDetailsList.reduce((sum, x) => {
+          return sum + Number(x.subtotal);
+        }, 0);
+      }
     },
     handleSuccess(response, file, fileList) {
       this.form.fileInfoList = fileList;

+ 24 - 12
src/views/order-management/order/index.vue

@@ -59,6 +59,7 @@ export default {
         },
       ],
       tableList: [],
+      total: 0,
       loading: false,
       titleText: "",
       open: false,
@@ -74,7 +75,7 @@ export default {
         phone: "",
         phonePrefixType: "",
         remark: "",
-        orderSalesDetailsList: [],
+        orderDetailsList: [],
       },
     };
   },
@@ -132,7 +133,7 @@ export default {
         phone: "",
         phonePrefixType: "",
         remark: "",
-        orderSalesDetailsList: [],
+        orderDetailsList: [],
       };
       this.titleText = "add";
       this.open = true;
@@ -153,7 +154,7 @@ export default {
         phone: "",
         phonePrefixType: "",
         remark: "",
-        orderSalesDetailsList: [],
+        orderDetailsList: [],
       };
       this.open = false;
     },
@@ -229,7 +230,7 @@ export default {
       <test :form-config="btnForm"></test>
     </el-card>
     <el-card class="body-main">
-        <query
+      <query
         :selectConfig="selectConfig"
         :req="queryParams"
         :isShowMore="true"
@@ -241,11 +242,10 @@ export default {
         "
       ></query>
       <el-table :data="tableList" v-loading="loading">
-      
         <el-table-column
           :label="$t('order_management.order.orderType')"
           align="center"
-           :formatter="(row) => dictDataEcho(row.type, orderTypeList)"
+          :formatter="(row) => dictDataEcho(row.type, orderTypeList)"
         />
         <el-table-column
           :label="$t('order_management.order.orderCode')"
@@ -267,29 +267,41 @@ export default {
           align="center"
           :formatter="showAddress"
         />
-          <el-table-column
+        <el-table-column
           :label="$t('order_management.order.orderTime')"
           align="center"
           prop="orderTime"
         />
-          <el-table-column
+        <el-table-column
           :label="$t('order_management.order.orderStatus')"
           align="center"
-         :formatter="(row) => dictDataEcho(row.status, orderStatusList)"
+          :formatter="(row) => dictDataEcho(row.status, orderStatusList)"
         />
 
         <el-table-column :label="$t('operation')" align="center" width="120">
           <template slot-scope="scope">
-            <el-button type="text" v-if="scope.row.status===1" @click="handleChangeStatus(scope.row,'2')"
+            <el-button
+              type="text"
+              v-if="scope.row.status === 1"
+              @click="handleChangeStatus(scope.row, '2')"
               >完成
             </el-button>
-            <el-button type="text" v-if="scope.row.status===1" @click="handleChangeStatus(scope.row,'3')"
+            <el-button
+              type="text"
+              v-if="scope.row.status === 1"
+              @click="handleChangeStatus(scope.row, '3')"
               >取消
             </el-button>
           </template>
         </el-table-column>
       </el-table>
-      </by-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
     </el-card>
 
     <el-dialog

+ 23 - 1
src/views/product-material/material/addMaterial.vue

@@ -118,6 +118,19 @@
             :rows="4"
           ></el-input>
         </el-form-item>
+        <el-form-item label="物料照片">
+          <el-upload
+            action="http://36.134.91.96:10001/api/service-file/uploadFile"
+            :headers="uploadHeader"
+            list-type="picture-card"
+            :file-list="fileList"
+            :on-preview="handlePreview"
+            :on-success="handleSuccess"
+            :on-remove="handleRemove"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
@@ -132,7 +145,7 @@
 </template>
 
 <script>
-import * as API from "@/api/product-material/material/index.js";
+import { getToken } from "@/util/auth";
 
 export default {
   name: "addMaterial",
@@ -162,6 +175,11 @@ export default {
   data() {
     return {
       // selectList: [],
+
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
       loading: false,
       // form: {
       //   classifyId: "",
@@ -210,6 +228,7 @@ export default {
           },
         ],
       },
+      fileList: [],
     };
   },
   created() {
@@ -242,6 +261,9 @@ export default {
     handleCancel() {
       this.$emit("cancel");
     },
+    handleSuccess(response, file, fileList) {
+      console.log(fileList, "aa");
+    },
   },
 };
 </script>

+ 13 - 0
src/views/product-material/product/addProduct.vue

@@ -137,6 +137,19 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-form-item label="产品照片">
+          <el-upload
+            action="http://36.134.91.96:10001/api/service-file/uploadFile"
+            :headers="uploadHeader"
+            list-type="picture-card"
+            :file-list="fileList"
+            :on-preview="handlePreview"
+            :on-success="handleSuccess"
+            :on-remove="handleRemove"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
         <el-form-item
           :label="$t('product_material.product.combination')"
           prop="combination"

+ 1 - 0
src/views/product-material/product/index.vue

@@ -433,6 +433,7 @@ export default {
     const list = businessDictData.find(
       (item) => item.code === "productType"
     ).children;
+    console.log(list, "sss");
     this.selectConfig[0].data = list.map((item) => ({
       label: item.dictValue,
       value: item.dictKey,

+ 21 - 8
src/views/product-material/spu/addSpu.vue

@@ -39,7 +39,17 @@
             </el-form-item>
           </el-col>
         </el-row>
-
+        <el-form-item
+          :label="$t('product_material.spu.spuDescription')"
+          prop="remark"
+        >
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            :rows="3"
+            :placeholder="$t('pleaseInput')"
+          ></el-input>
+        </el-form-item>
         <div style="margin-bottom: 20px">
           <labelTitle
             :content="$t('product_material.spu.associatedProducts')"
@@ -51,7 +61,7 @@
           >
         </el-form-item>
         <el-form-item>
-          <el-table :data="form.productCombinationList">
+          <el-table :data="form.productIdList">
             <el-table-column
               :label="$t('product_material.spu.productCode')"
               prop="productCode"
@@ -117,7 +127,7 @@ export default {
       // form: {
       //   code: "",
       //   name: "",
-      //   productCombinationList: [],
+      //   productIdList: [],
       // },
       formRules: {
         name: [
@@ -135,6 +145,10 @@ export default {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
+          if (!this.form.productIdList.length > 0)
+            return this.msgInfo("请关联产品");
+          const productIdList = this.form.productIdList.map((x) => x.productId);
+          this.form.productIdList = productIdList;
           this.loading = true;
           this.$emit("submit");
         }
@@ -144,11 +158,10 @@ export default {
       this.$emit("cancel");
     },
     handleSelect(row) {
-      this.form.productCombinationList.push({
-        linkProductId: row.id,
-        linkQuantity: "",
-        code: row.code,
-        name: row.name,
+      this.form.productIdList.push({
+        productId: row.id,
+        productCode: row.code,
+        productName: row.name,
       });
       this.msgSuccess(this.$t("addSuccess"));
     },

+ 17 - 5
src/views/product-material/spu/index.vue

@@ -99,13 +99,13 @@ export default {
       },
       tableList: [],
       loading: false,
-      total: null,
+      total: 0,
       open: false,
       titleText: "add",
       form: {
         code: "",
         name: "",
-        productCombinationList: [],
+        productIdList: [],
       },
     };
   },
@@ -115,8 +115,20 @@ export default {
   methods: {
     handleEdit(row) {
       this.titleText = "edit";
-      this.form = row;
       this.open = true;
+      this.$nextTick(() => {
+        this.$refs.addSpu.loading = true;
+        API.spuEdit({ id: row.id }).then(
+          (res) => {
+            this.form = res.data.data;
+            this.$refs.addSpu.loading = false;
+          },
+          (err) => {
+            console.log("spuEdit: " + err);
+            this.$refs.addSpu.loading = false;
+          }
+        );
+      });
     },
     getList() {
       this.loading = true;
@@ -137,7 +149,7 @@ export default {
       this.form = {
         code: "",
         name: "",
-        productCombinationList: [],
+        productIdList: [],
       };
       this.open = true;
     },
@@ -148,7 +160,7 @@ export default {
       this.form = {
         code: "",
         name: "",
-        productCombinationList: [],
+        productIdList: [],
       };
       this.open = false;
     },

+ 6 - 6
src/views/purchase-management/purchase/addPurchase.vue

@@ -97,16 +97,14 @@
               prop="goodsUnit"
             >
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               :label="$t('purchase_management.purchase.subscribeQuantity')"
               prop="quantity"
             >
+            </el-table-column> -->
+            <el-table-column label="采购数量" prop="quantity">
             </el-table-column>
-            <el-table-column
-              :label="$t('purchase_management.purchase.stock')"
-              prop="stockQuantity"
-            >
-            </el-table-column>
+
             <el-table-column
               :label="$t('purchase_management.purchase.price')"
               prop="price"
@@ -127,6 +125,8 @@
                 </el-form-item>
               </template>
             </el-table-column>
+            <el-table-column label="小计" prop="stockQuantity">
+            </el-table-column>
 
             <el-table-column
               :label="$t('operation')"

+ 15 - 8
src/views/purchase-management/purchase/index.vue

@@ -288,12 +288,12 @@ export default {
           :selectable="isSelectable"
         >
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           :label="$t('purchase_management.purchase.subscribeOddNumbers')"
           align="center"
           prop="code"
           width="150"
-        />
+        /> -->
         <el-table-column
           :label="$t('purchase_management.purchase.goodCode')"
           align="center"
@@ -319,27 +319,28 @@ export default {
           align="center"
           prop="quantity"
         />
-        <el-table-column
+        <el-table-column label="收货仓库" align="center" prop="quantity" />
+        <!-- <el-table-column
           :label="$t('purchase_management.purchase.price')"
           align="center"
           prop="price"
-        />
-        <el-table-column
+        /> -->
+        <!-- <el-table-column
           :label="$t('purchase_management.purchase.totalAmount')"
           align="center"
           prop="phone"
-        />
+        /> -->
         <el-table-column
           :label="$t('purchase_management.purchase.askArrivalTime')"
           align="center"
           prop="planArrivalTime"
           width="160"
         />
-        <el-table-column
+        <!-- <el-table-column
           :label="$t('purchase_management.purchase.subscribeReason')"
           align="center"
           prop="cause"
-        />
+        /> -->
 
         <el-table-column
           :label="$t('purchase_management.purchase.purchaseStatus')"
@@ -352,6 +353,12 @@ export default {
           align="center"
           prop="createName"
         />
+        <el-table-column
+          label="申购时间"
+          align="center"
+          prop="planArrivalTime"
+          width="160"
+        />
 
         <el-table-column :label="$t('operation')" align="center" width="120">
           <template slot-scope="scope">

+ 265 - 0
src/views/purchase-management/settlement/purchaseSettlement.vue

@@ -0,0 +1,265 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+import sendPurchaseSettlement from "./sendPurchaseSettlement.vue";
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+
+export default {
+  components: {
+    test,
+    query,
+    sendPurchaseSettlement,
+  },
+  data() {
+    return {
+      warehouseTypeList: [],
+      warehouseSelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "发起采购结算",
+              methodsText: "send",
+              type: "primary",
+              send: () => {
+                this.handleSend();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "结算状态",
+          prop: "type",
+          data: [
+            { label: "已结算", value: "1" },
+            { label: "未结算", value: "2" },
+          ],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      inboundType: 10, // 入库类型  10 采购入库  20 手动入库
+      titleText: "",
+      open: false,
+      form: {
+        id: "",
+        changeDetailsList: [],
+      },
+    };
+  },
+  created() {
+    // const businessDictData = JSON.parse(
+    //   window.localStorage.getItem("businessDict")
+    // );
+    // this.warehouseTypeList = businessDictData.find(
+    //   (item) => item.code === "warehouseType"
+    // ).children;
+    // this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
+    //   label: item.dictValue,
+    //   value: item.dictKey,
+    // }));
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleSend() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        changeDetailsList: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.titleText = "edit";
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addInbound.loading = true;
+        this.$refs.addInbound.countryChange(this.form.countryId);
+        this.$refs.addInbound.provinceChange(this.form.provinceId);
+        this.$refs.addInbound.loading = false;
+      });
+    },
+    handleSubmit() {
+      API.purchaseAdd(this.form).then(
+        () => {
+          this.msgSuccess(this.$t("addSuccess"));
+          this.$refs.addInbound.loading = false;
+          this.open = false;
+          this.getList();
+        },
+        (err) => {
+          console.log("purchaseAdd: " + err);
+          this.$refs.addInbound.loading = false;
+        }
+      );
+      // if (this.inboundType === 10) {
+
+      // } else {
+      //   API.manualAdd(this.form).then(
+      //     () => {
+      //       this.msgSuccess(this.$t("addSuccess"));
+      //       this.open = false;
+      //       this.$refs.addInbound.loading = false;
+      //       this.getList();
+      //     },
+      //     (err) => {
+      //       console.log("manualAdd: " + err);
+      //       this.$refs.addInbound.loading = false;
+      //     }
+      //   );
+      // }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="采购单号" align="center" prop="code" />
+        <el-table-column label="供应商编码" align="center" prop="name" />
+        <el-table-column label="供应商名称" align="center" />
+        <el-table-column label="采购金额" align="center" prop="contacts" />
+        <el-table-column label="已结算金额" align="center" prop="phone" />
+        <el-table-column label="未结算金额" align="center" prop="phone" />
+        <el-table-column label="结算时间" align="center" prop="phone" />
+        <el-table-column label="申请人" align="center" prop="phone" />
+        <el-table-column label="结算状态" align="center" prop="phone" />
+        <el-table-column label="备注" align="center" prop="phone" />
+
+        <!-- <el-table-column label="盘点详情" width="100" align="center">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteRow(scope.$index)">{{
+              $t("delete")
+            }}</el-button>
+          </template>
+        </el-table-column> -->
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      title="发起采购结算"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <send-purchase-settlement
+        :form="form"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="sendPurchaseSettlement"
+      ></send-purchase-settlement>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 150 - 0
src/views/purchase-management/settlement/sendPurchaseSettlement.vue

@@ -0,0 +1,150 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-row :gutter="10">
+          <el-col :span="6">
+            <el-form-item label="采购单号" prop="id">
+              <el-input v-model="form.aaa" placeholder="请输入"> </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="结算总额" prop="id">
+              <el-input v-model="form.aaaa" disabled placeholder="总额">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item>
+          <el-table :data="form.changeDetailsList">
+            <el-table-column label="申购单号" prop="productCode">
+            </el-table-column>
+            <el-table-column label="物品编码" prop="productCode">
+            </el-table-column>
+            <el-table-column label="物品名称" prop="productName">
+            </el-table-column>
+            <el-table-column label="物品类型" prop="productType">
+            </el-table-column>
+            <el-table-column label="单位" prop="warehouseName">
+            </el-table-column>
+            <el-table-column label="发货数量" prop="applyPurchaseQuantity">
+            </el-table-column>
+            <el-table-column label="单价" prop="shipmentQuantity">
+            </el-table-column>
+            <el-table-column label="小计" prop="changeQuantity">
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+
+        <el-form-item label="备注" prop="id">
+          <el-input
+            v-model="form.aaa"
+            type="textarea"
+            :rows="4"
+            placeholder="请输入"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+
+    <!-- <el-dialog
+      :title="$t('goodsSelect')"
+      v-if="selectDialog"
+      :visible.sync="selectDialog"
+      width="80%"
+      top="60px"
+    >
+      <selectProduct @select="handleSelect"></selectProduct>
+    </el-dialog> -->
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+import selectProduct from "@/components/select-product/index.vue";
+
+import * as API from "@/api/inbound-outbound/inbound/index.js";
+
+export default {
+  name: "sendPurchaseSettlement",
+  components: { labelTitle, selectProduct },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    warehouseSelectList: {
+      type: Array,
+      default: () => [],
+    },
+    warehouseTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      selectLit: [],
+      loading: false,
+      formRules: {
+        id: [
+          {
+            required: true,
+            message: "请选择盘点仓库",
+            trigger: "change",
+          },
+        ],
+        changeQuantity: [
+          {
+            required: true,
+            message: "请输入采购单号",
+            trigger: "blur",
+          },
+        ],
+      },
+
+      selectDialog: false,
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>