Jelajahi Sumber

基础维护

cz 2 tahun lalu
induk
melakukan
cc4f467669

+ 48 - 0
src/api/purchase-management/purchase/index.js

@@ -0,0 +1,48 @@
+import request from '@/router/axios'
+
+// purchase列表 
+export function purchaseList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/purchase/stay/purchase/page',
+    method: 'post',
+    data: data,
+  })
+}
+
+// purchase查看 
+export function purchaseSee(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/details',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+// 发起purchase 
+export function sendPurchase(data = {}) {
+  return request({
+    url: '/api/victoriatourist/purchase/flow/start',
+    method: 'post',
+    data: data,
+  })
+}
+
+// 审批purchase 
+export function purchaseApproval(data = {}) {
+  return request({
+    url: '/api/victoriatourist/purchase/flow/examine',
+    method: 'post',
+    data: data,
+  })
+}
+
+// purchase 详情
+export function purchaseDetails(data = {}) {
+  return request({
+    url: '/api/victoriatourist/purchase/flow/details',
+    method: 'post',
+    data: data,
+  })
+}
+

+ 48 - 0
src/api/purchase-management/subscribe/index.js

@@ -0,0 +1,48 @@
+import request from '@/router/axios'
+
+// subscribe列表 
+export function subscribeList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/page',
+    method: 'post',
+    data: data,
+  })
+}
+
+
+
+// 添加subscribe 
+export function subscribeAdd(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/add',
+    method: 'post',
+    data: data,
+  })
+}
+// subscribe详情 
+export function subscribeDetails(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/details',
+    method: 'post',
+    data: data,
+  })
+}
+
+// 编辑subscribe 
+export function subscribeEdit(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/edit',
+    method: 'post',
+    data: data,
+  })
+}
+
+// 删除subscribe 
+export function subscribeDel(data = {}) {
+  return request({
+    url: '/api/victoriatourist/apply/purchase/delete',
+    method: 'post',
+    data: data,
+  })
+}
+

+ 80 - 0
src/lang/zh.js

@@ -376,6 +376,86 @@ export default {
       address: "详细地址",
     }
   },
+  purchase_management: {
+    subscribe: {
+      sendSubscribe: '发起申购',
+      subscribeEdit: "申购编辑",
+      subscribeStatus: "申购状态",
+      subscribeOddNumbers: '申购单号',
+      goodCode: "物品编码",
+      goodName: "物品名称",
+      goodType: "物品类型",
+      unit: "单位",
+      subscribeNums: "申购数量",
+      askArrivalTime: "要求到货时间",
+      harvestWarehouse: "收货仓库",
+      subscribeDate: "申购日期",
+      subscribeReason: "申购原因",
+      subscribePeople: "申购人",
+      subscribeDescription: "申购说明",
+      subscribeDetails: "申购明细",
+      stock: "库存",
+      subscribeQuantity: "申购数量",
+      province: "省/洲",
+      whereCity: "所在城市",
+      city: '城市',
+      contactInfo: "联系信息",
+      contacts: '联系人',
+      contactNumber: '联系电话',
+      enclosure: '附件',
+      address: "详细地址",
+    },
+    purchase: {
+      purchase: '采购',
+      purchaseEdit: '采购编辑',
+      deliverGoods: "发货",
+      purchaseStatus: "采购状态",
+      goodType: "物品类型",
+      subscribeOddNumbers: '申购单号',
+      goodCode: "物品编码",
+      goodName: "物品名称",
+      unit: "单位",
+      subscribeNums: "申购数量",
+      price: "单价",
+      totalAmount: "总金额",
+      askArrivalTime: "要求到货时间",
+      subscribeReason: "申购原因",
+      harvestWarehouse: "收货仓库",
+      subscribeDate: "申购日期",
+      subscribePeople: "申购人",
+      selectSupply: "选择供应商",
+      remarks: "备注", subscribeDetails: "申购明细",
+      stock: "库存",
+      subscribeQuantity: "申购数量",
+      province: "省/洲",
+      whereCity: "所在城市",
+      city: '城市',
+      contactInfo: "联系信息",
+      contacts: '联系人',
+      contactNumber: '联系电话',
+      enclosure: '附件',
+      address: "详细地址",
+    }
+  },
+  inbound_outbound: {
+    outbound: {
+      outboun: "出库",
+      outboundAdd: "添加出库",
+      outboundEdit: "编辑出库",
+
+      outboundOddNumbers: '申购单号',
+      salesOddNumbers: '销售单号',
+      customerType: '客户类型',
+      customerCode: '客户编码',
+      customerNmae: '客户名称',
+      outboundQuantity: '出库数量',
+      createTime: '创建时间',
+      remarks: '备注',
+
+
+    }
+  },
+
   equipment: {
     deviceInterface: '设备界面',
     realTimeDataList: "实时数据列表",

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

@@ -255,6 +255,46 @@ export default [
     ],
   },
   {
+    path: '/purchase-management/subscribe',
+    component: Layout,
+    redirect: '/purchase-management/subscribe/index',
+    children: [
+      {
+        path: 'index',
+        name: '申购管理',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/purchase-management/subscribe/index'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/purchase-management/purchase',
+    component: Layout,
+    redirect: '/purchase-management/purchase/index',
+    children: [
+      {
+        path: 'index',
+        name: '采购管理',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/purchase-management/purchase/index'),
+        props: true,
+      },
+    ],
+  },
+  {
+    path: '/inbound-outbound/outbound',
+    component: Layout,
+    redirect: '/inbound-outbound/outbound/index',
+    children: [
+      {
+        path: 'index',
+        name: '出库管理',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inbound-outbound/outbound/index'),
+        props: true,
+      },
+    ],
+  },
+
+  {
     path: '/equipment',
     component: Layout,
     redirect: '/equipment/index',

+ 273 - 0
src/views/inbound-outbound/outbound/addOutbound.vue

@@ -0,0 +1,273 @@
+<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="$t('purchase_management.subscribe.harvestWarehouse')"
+              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>

+ 295 - 0
src/views/inbound-outbound/outbound/index.vue

@@ -0,0 +1,295 @@
+
+
+<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,
+    addOutbound,
+  },
+  data() {
+    return {
+      productTypeList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: this.$t("inbound_outbound.outbound.outboundAdd"),
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [],
+      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
+          :label="$t('inbound_outbound.outbound.outboundOddNumbers')"
+          align="center"
+          prop="code"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.salesOddNumbers')"
+          align="center"
+          prop="name"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.customerType')"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.customerCode')"
+          align="center"
+          prop="contacts"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.customerNmae')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.outboundQuantity')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.createTime')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('inbound_outbound.outbound.remarks')"
+          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 === 'add'
+          ? $t('inbound_outbound.outbound.outboundAdd')
+          : $t('inbound_outbound.outbound.outboundEdit')
+      "
+      :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>

+ 308 - 0
src/views/order-management/addCustomer.vue

@@ -0,0 +1,308 @@
+<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="$t('product_material.customer.customerCode')"
+              prop="code"
+            >
+              <el-input
+                v-model="form.code"
+                :placeholder="$t('pleaseInput')"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1"></el-col>
+          <el-col :span="15">
+            <el-form-item label=".">
+              <span>不输入则自动生成,自动编码规则示例:C00001</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item
+          :label="$t('product_material.customer.customerName')"
+          prop="name"
+        >
+          <el-input
+            v-model="form.name"
+            :placeholder="$t('pleaseInput')"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item :label="$t('product_material.customer.address')" required>
+          <el-row :gutter="10">
+            <el-col :span="8">
+              <el-form-item label-width="0" prop="countryId">
+                <el-select
+                  v-model="form.countryId"
+                  :placeholder="$t('product_material.customer.country')"
+                  style="width: 100%"
+                  @change="countryChange"
+                >
+                  <el-option
+                    v-for="item in countryData"
+                    :key="item.id"
+                    :label="item.chineseName"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label-width="0" prop="provinceId">
+                <el-select
+                  v-model="form.provinceId"
+                  :placeholder="$t('product_material.customer.province')"
+                  style="width: 100%"
+                  @change="provinceChange"
+                  :disabled="!provinceData.length > 0"
+                >
+                  <el-option
+                    v-for="item in provinceData"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label-width="0" prop="cityId">
+                <el-select
+                  v-model="form.cityId"
+                  :placeholder="$t('product_material.customer.city')"
+                  style="width: 100%"
+                  :disabled="!provinceData.length > 0 && !cityData.length > 0"
+                >
+                  <el-option
+                    v-for="item in cityData"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form-item>
+
+        <el-form-item label="" prop="detailedAddress">
+          <el-input
+            v-model="form.detailedAddress"
+            :placeholder="$t('pleaseInput')"
+            type="textarea"
+            rows="4"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item
+          :label="$t('product_material.customer.contactInfo')"
+          required
+        >
+          <el-row :gutter="10">
+            <el-col :span="8">
+              <el-form-item label-width="0" prop="contacts">
+                <el-input
+                  v-model="form.contacts"
+                  :placeholder="$t('pleaseInput')"
+                >
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label-width="0" prop="phone">
+                <el-input v-model="form.phone" :placeholder="$t('pleaseInput')">
+                  <template>
+                    <div slot="prepend">+ 86</div>
+                  </template>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form-item>
+
+        <el-form-item :label="$t('product_material.customer.enclosure')">
+          <el-upload
+            class="upload-demo"
+            action="/api/service-file/uploadFile"
+            :headers="uploadHeader"
+            :on-preview="handlePreview"
+            :on-remove="handleRemove"
+            :on-success="handleSuccess"
+            multiple
+            :file-list="fileList"
+          >
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+        </el-form-item>
+
+        <el-form-item label="备注" prop="remark">
+          <el-input
+            v-model="form.remark"
+            :placeholder="$t('pleaseInput')"
+            type="textarea"
+            rows="4"
+          ></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>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getRegionData } from "@/api/system/common.js";
+
+export default {
+  name: "addCustomer",
+  components: {},
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+      countryData: [],
+      provinceData: [],
+      cityData: [],
+      loading: false,
+      formRules: {
+        countryId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("product_material.customer.country"),
+            trigger: "change",
+          },
+        ],
+        provinceId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("product_material.customer.province"),
+            trigger: "change",
+          },
+        ],
+        cityId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("product_material.customer.city"),
+            trigger: "change",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("product_material.customer.customerType"),
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("product_material.customer.customerName"),
+            trigger: "blur",
+          },
+        ],
+        contacts: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("product_material.customer.contacts"),
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("product_material.customer.contactNumber"),
+            trigger: "blur",
+          },
+        ],
+      },
+      fileList: [],
+    };
+  },
+  created() {
+    getRegionData({ parentId: "", type: "1" }).then((res) => {
+      this.countryData = res.data.data;
+    });
+  },
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+    countryChange(val) {
+      getRegionData({ parentId: val, type: "2" }).then((res) => {
+        this.provinceData = res.data.data;
+      });
+    },
+    provinceChange(val) {
+      getRegionData({ parentId: val, type: "3" }).then((res) => {
+        this.cityData = res.data.data;
+      });
+    },
+    handleSuccess(response, file, fileList) {
+      this.form.fileInfoList = fileList;
+    },
+    handleRemove(response, file, fileList) {
+      this.form.fileInfoList = fileList;
+    },
+    handlePreview() {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+</style>

+ 301 - 0
src/views/order-management/index.vue

@@ -0,0 +1,301 @@
+
+
+<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 addCustomer from "./addCustomer.vue";
+
+import * as API from "@/api/product-material/customer/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    addCustomer,
+  },
+  data() {
+    return {
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: this.$t("product_material.customer.customerAdd"),
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+            {
+              name: this.$t("excelImport"),
+              methodsText: "excelImport",
+              type: "defualt",
+              excelImport: () => {
+                this.excelImport();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        name: "",
+        code: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+      },
+      selectConfig: [
+        {
+          label: this.$t("product_material.supply.supplyType"),
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      titleText: "",
+      open: false,
+      form: {
+        id: "",
+        code: "",
+        name: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        fileInfoList: [],
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.customerList(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("customerList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        id: "",
+        code: "",
+        name: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        fileInfoList: [],
+      };
+      this.titleText = "add";
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        code: "",
+        name: "",
+        countryId: "",
+        provinceId: "",
+        cityId: "",
+        detailedAddress: "",
+        contacts: "",
+        phone: "",
+        phonePrefixType: "",
+        remark: "",
+        fileInfoList: [],
+      };
+      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.customerAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("customerAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.customerEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("customerEdit: " + 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.customerDel({ 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="$t('product_material.customer.customerCode')"
+          align="center"
+          prop="code"
+        />
+        <el-table-column
+          :label="$t('product_material.customer.customerName')"
+          align="center"
+          prop="name"
+        />
+        <el-table-column
+          :label="$t('product_material.customer.whereCity')"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column
+          :label="$t('product_material.customer.contacts')"
+          align="center"
+          prop="contacts"
+        />
+        <el-table-column
+          :label="$t('product_material.customer.contactNumber')"
+          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>
+      </by-table>
+    </el-card>
+
+    <el-dialog
+      :title="
+        titleText === 'add'
+          ? $t('product_material.customer.customerAdd')
+          : $t('product_material.customer.customerEdit')
+      "
+      :visible.sync="open"
+      v-if="open"
+      width="50%"
+      top="60px"
+    >
+      <add-customer
+        :form="form"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addMaterial"
+      ></add-customer>
+    </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>

+ 1 - 3
src/views/product-material/customer/index.vue

@@ -202,7 +202,7 @@ export default {
       <test :form-config="btnForm"></test>
     </el-card>
     <el-card class="body-main">
-        <query
+      <query
         :selectConfig="selectConfig"
         :req="queryParams"
         :isShowMore="true"
@@ -214,7 +214,6 @@ export default {
         "
       ></query>
       <el-table :data="tableList" v-loading="loading">
-      
         <el-table-column
           :label="$t('product_material.customer.customerCode')"
           align="center"
@@ -252,7 +251,6 @@ export default {
           </template>
         </el-table-column>
       </el-table>
-      </by-table>
     </el-card>
 
     <el-dialog

+ 1 - 1
src/views/product-material/product/addProduct.vue

@@ -130,7 +130,7 @@
               <el-date-picker
                 v-model="form.clearancePeriod"
                 type="datetime"
-                placeholder="选择日期"
+                :placeholder="$t('pleaseSelect')"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>

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

@@ -428,7 +428,6 @@ export default {
     const businessDictData = JSON.parse(
       window.localStorage.getItem("businessDict")
     );
-    console.log(businessDictData, "业务字典");
     const list = businessDictData.find(
       (item) => item.code === "productType"
     ).children;

+ 6 - 3
src/views/product-material/supply/index.vue

@@ -362,7 +362,7 @@ export default {
         contacts: "",
         phone: "",
         phonePrefixType: "",
-        countryId: "",
+        countryId: "China",
         provinceId: "",
         cityId: "",
         detailedAddress: "",
@@ -424,7 +424,7 @@ export default {
         contacts: "",
         phone: "",
         phonePrefixType: "",
-        countryId: "",
+        countryId: "China",
         provinceId: "",
         cityId: "",
         detailedAddress: "",
@@ -439,6 +439,9 @@ export default {
       this.fileList = [];
       this.titleText = "add";
       this.open = true;
+      this.$nextTick(() => {
+        this.$refs.addSupply.countryChange(this.form.countryId);
+      });
     },
 
     handleCancel() {
@@ -449,7 +452,7 @@ export default {
         contacts: "",
         phone: "",
         phonePrefixType: "",
-        countryId: "",
+        countryId: "China",
         provinceId: "",
         cityId: "",
         detailedAddress: "",

+ 9 - 0
src/views/product-material/warehouse/index.vue

@@ -166,6 +166,15 @@ export default {
       this.getList();
     },
     Add() {
+      this.form = {
+        classifyId: "",
+        type: "",
+        code: "",
+        name: "",
+        unit: "",
+        introduce: "",
+        deptId: "",
+      };
       this.titleText = "add";
       this.open = true;
     },

+ 278 - 0
src/views/purchase-management/purchase/addPurchase.vue

@@ -0,0 +1,278 @@
+<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="$t('purchase_management.purchase.selectSupply')"
+              prop="supplieId"
+            >
+              <el-select
+                v-model="form.supplieId"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in purchaseTypeList"
+                  :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.purchase.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.purchase.remarks')"
+              prop="flowRemark"
+            >
+              <el-input
+                v-model="form.flowRemark"
+                :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.purchase.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.goodsList">
+            <el-table-column
+              :label="$t('purchase_management.purchase.goodCode')"
+              prop="code"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.goodName')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.goodType')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.unit')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.subscribeQuantity')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.stock')"
+              prop="name"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.price')"
+              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: "addPurchase",
+  components: { labelTitle },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+
+      loading: false,
+      formRules: {
+        supplieId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.selectSupply"),
+            trigger: "change",
+          },
+        ],
+        planArrivalTime: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.askArrivalTime"),
+            trigger: "change",
+          },
+        ],
+        countryId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.country"),
+            trigger: "change",
+          },
+        ],
+        provinceId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.province"),
+            trigger: "change",
+          },
+        ],
+        cityId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.city"),
+            trigger: "change",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.purchaseType"),
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.purchaseName"),
+            trigger: "blur",
+          },
+        ],
+        contacts: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.contacts"),
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.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>

+ 334 - 0
src/views/purchase-management/purchase/index.vue

@@ -0,0 +1,334 @@
+
+
+<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 addPurchase from "./addPurchase.vue";
+
+import * as API from "@/api/purchase-management/purchase/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    addPurchase,
+  },
+  data() {
+    return {
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: this.$t("purchase_management.purchase.purchase"),
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+            {
+              name: this.$t("purchase_management.purchase.deliverGoods"),
+              methodsText: "deliverGoods",
+              type: "primary",
+              deliverGoods: () => {
+                this.deliverGoods();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: this.$t("purchase_management.purchase.purchaseStatus"),
+          prop: "type",
+          data: [],
+        },
+        {
+          label: this.$t("purchase_management.purchase.goodType"),
+          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.purchaseList(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("purchaseList: " + 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.purchaseAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("purchaseAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.purchaseEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("purchaseEdit: " + 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.purchaseDel({ 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="$t('purchase_management.purchase.subscribeOddNumbers')"
+          align="center"
+          prop="code"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.goodCode')"
+          align="center"
+          prop="name"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.goodName')"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.goodType')"
+          align="center"
+          prop="contacts"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.unit')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.subscribeNums')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.price')"
+          align="center"
+          prop="phone"
+        />
+        <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="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.purchase.subscribeReason')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('purchase_management.purchase.purchaseStatus')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('purchase_management.purchase.subscribePeople')"
+          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 === 'add'
+          ? $t('purchase_management.purchase.purchase')
+          : $t('purchase_management.purchase.purchaseEdit')
+      "
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <add-purchase
+        :form="form"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="sendSubscribe"
+      ></add-purchase>
+    </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>

+ 318 - 0
src/views/purchase-management/subscribe/index.vue

@@ -0,0 +1,318 @@
+
+
+<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 sendSubscribe from "./sendSubscribe.vue";
+
+import * as API from "@/api/purchase-management/subscribe/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    sendSubscribe,
+  },
+  data() {
+    return {
+      productTypeList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: this.$t("purchase_management.subscribe.sendSubscribe"),
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: this.$t("purchase_management.subscribe.subscribeStatus"),
+          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.subscribeList(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("subscribeList: " + 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.subscribeAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("subscribeAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.subscribeEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("subscribeEdit: " + 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.subscribeDel({ 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="$t('purchase_management.subscribe.subscribeOddNumbers')"
+          align="center"
+          prop="code"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.goodCode')"
+          align="center"
+          prop="name"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.goodName')"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.goodType')"
+          align="center"
+          prop="contacts"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.unit')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.subscribeNums')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.askArrivalTime')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('purchase_management.subscribe.harvestWarehouse')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('purchase_management.subscribe.subscribeDate')"
+          align="center"
+          prop="phone"
+        />
+        <el-table-column
+          :label="$t('purchase_management.subscribe.subscribeReason')"
+          align="center"
+          prop="phone"
+        />
+
+        <el-table-column
+          :label="$t('purchase_management.subscribe.subscribePeople')"
+          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 === 'add'
+          ? $t('purchase_management.subscribe.sendSubscribe')
+          : $t('purchase_management.subscribe.subscribeEdit')
+      "
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <send-subscribe
+        :form="form"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="sendSubscribe"
+      ></send-subscribe>
+    </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>

+ 273 - 0
src/views/purchase-management/subscribe/sendSubscribe.vue

@@ -0,0 +1,273 @@
+<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="$t('purchase_management.subscribe.harvestWarehouse')"
+              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>