Bladeren bron

维多利亚bug解决

cz 2 jaren geleden
bovenliggende
commit
cbeabba8bd

+ 4 - 1
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -80,7 +80,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="合同编号" prop="contractCode">
+          <el-form-item label="采购单号" prop="contractCode">
             <el-input v-model="formData.data.contractCode" placeholder="请输入">
             </el-input>
           </el-form-item>
@@ -285,6 +285,9 @@ let rules = ref({
   paymentMethod: [
     { required: true, message: "请选择付款方式", trigger: "change" },
   ],
+  contractCode: [
+    { required: true, message: "请输入采购单号", trigger: "blur" },
+  ],
 });
 let rulesOne = ref({
   name: [{ required: true, message: "请输入费用名称", trigger: "blur" }],

+ 2 - 2
src/components/WDLY/process/SendSubscribeWDLY.vue

@@ -85,7 +85,7 @@
 <script setup>
 import byForm from "@/components/byForm/index";
 import { ElMessage, ElMessageBox } from "element-plus";
-import SelectGoods from "@/components/product/SelectGoods";
+import SelectGoods from "@/components/WDLY/product/SelectGoods";
 import useUserStore from "@/store/modules/user";
 const { proxy } = getCurrentInstance();
 
@@ -217,7 +217,7 @@ const handleRemove = (index) => {
 const pushGoods = (goods) => {
   const arr = goods.map((x) => ({
     goodType: x.goodType,
-    productCode: x.code,
+    productCode: x.customCode,
     productName: x.name,
     productSpec: x.spec,
     productUnit: x.unit,

+ 1 - 1
src/components/WDLY/product/SelectGoods.vue

@@ -115,7 +115,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "货品编码",
-        prop: "code",
+        prop: "customCode",
       },
     },
     {

+ 1 - 1
src/components/WDLY/product/SelectProduct.vue

@@ -331,7 +331,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "产品编码",
-        prop: "code",
+        prop: "customCode",
       },
     },
     {

+ 535 - 0
src/views/JXSK/production/workOrder/index.vue

@@ -0,0 +1,535 @@
+<template>
+  <div class="tenant">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        :action-list="[]"
+        @get-list="getList"
+      >
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog
+      :title="'调整BOM'"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="submitLoading"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+        <template #slot>
+          <div>
+            <el-button type="primary" plain @click="openMaterial = true"
+              >添加物料/半成品</el-button
+            >
+            <el-button type="primary" plain> Excel导入</el-button>
+            <el-form
+              ref="tableForm"
+              :model="formData.data"
+              :rules="rules"
+              label-width="0px"
+              style="margin-top: 15px"
+            >
+              <el-table :data="formData.data.bomDetailList">
+                <el-table-column prop="productCode" label="物料编码" />
+                <el-table-column prop="productName" label="物料名称" />
+                <el-table-column prop="productUnit" label="单位" />
+                <el-table-column prop="quantity" label="数量" width="150">
+                  <template #default="{ row, $index }">
+                    <el-form-item
+                      :prop="'bomDetailList.' + $index + '.quantity'"
+                      :rules="rules.quantity"
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.quantity"
+                        :precision="2"
+                        :controls="false"
+                        :min="1"
+                      />
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="zip" label="成本" width="150">
+                  <template #default="{ row, $index }">
+                    <el-form-item
+                      :prop="'bomDetailList.' + $index + '.cost'"
+                      :rules="rules.cost"
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.cost"
+                        :precision="2"
+                        :controls="false"
+                        :min="1"
+                      />
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="zip" label="操作" width="100">
+                  <template #default="{ $index }">
+                    <el-button type="primary" link @click="handleRemove($index)"
+                      >删除</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-form>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      title="调整工艺"
+      v-model="dialogVisibleOne"
+      width="800"
+      v-loading="loadingOne"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfigOne"
+        :formOption="formOption"
+        v-model="formData.dataOne"
+        :rules="rulesOne"
+        ref="byformOne"
+      >
+        <template #slot>
+          <div style="width: 100%">
+            <el-button type="primary" plain @click="clickAdd"
+              >添加工序</el-button
+            >
+            <el-table
+              :data="formData.dataOne.list"
+              style="width: 100%; margin-top: 16px"
+            >
+              <el-table-column label="工序名称" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.contactNo'"
+                      :rules="rulesOne.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-input v-model="row.contactNo" placeholder="请输入" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="工艺说明">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.contactNo'"
+                      :rules="rulesOne.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.contactNo"
+                        type="textarea"
+                        placeholder="请输入"
+                      />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="图纸" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.contactNo'"
+                      :rules="rulesOne.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-upload
+                        v-model:fileList="fileList"
+                        :show-file-list="false"
+                        class="upload-demo"
+                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                        :data="uploadData"
+                        :before-upload="handleBeforeUpload"
+                        accept=".pdf"
+                      >
+                        <el-icon :size="17" style="margin-top: 12px">
+                          <Edit />
+                        </el-icon>
+                      </el-upload>
+                      <div>
+                        <div>
+                          <el-tag
+                            style="margin-left: 10px"
+                            class="ml-2"
+                            type="info"
+                            v-for="(item, index) in fileListCopy"
+                            :key="index"
+                            >{{ item.fileName }}</el-tag
+                          >
+                        </div>
+                      </div>
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+
+              <el-table-column
+                align="center"
+                label="操作"
+                width="80"
+                fixed="right"
+              >
+                <template #default="{ $index }">
+                  <el-button type="primary" link @click="clickDelete($index)"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleOne = false" size="large"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitFormOne('byform')"
+          size="large"
+          :loading="loadingOne"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      v-model="openMaterial"
+      title="选择产品"
+      width="70%"
+      append-to-body
+    >
+      <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="openMaterial = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+  
+<script setup>
+/* eslint-disable vue/no-unused-components */
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref } from "vue";
+import useUserStore from "@/store/modules/user";
+import SelectMaterial from "@/components/product/SelectMaterial";
+const uploadData = ref({});
+let fileList = ref([]);
+let fileListCopy = ref([]);
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let dialogVisibleOne = ref(false);
+let openMaterial = ref(false);
+let roomDialogVisible = ref(false);
+let modalType = ref("add");
+let rules = ref({
+  type: [
+    { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
+  ],
+  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
+});
+let rulesOne = ref({
+  type: [
+    { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
+  ],
+  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
+const selectConfig = reactive([
+  {
+    label: "工单来源",
+    prop: "type",
+    data: [],
+  },
+]);
+
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "工单来源",
+        prop: "name",
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "仓库类型",
+    //     prop: "type",
+    //   },
+    //   render(type) {
+    //     return proxy.dictDataEcho(type, warehouseType.value);
+    //   },
+    // },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "keeperName",
+      },
+    },
+    {
+      attrs: {
+        label: "是否定制",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "工单数量",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "已计划数量",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "完成率",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "调整BOM",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "调整工艺",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {},
+  dataOne: {},
+  treeData: [],
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const byformOne = ref(null);
+
+const treeData = ref([]);
+const formConfig = reactive([
+  {
+    type: "slot",
+    slotName: "slot",
+  },
+]);
+const formConfigOne = reactive([
+  {
+    type: "slot",
+    slotName: "slot",
+    label: "",
+  },
+]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/warehouse/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
+
+const submitForm = () => {
+  console.log(byform.value);
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/warehouse/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => (submitLoading.value = false)
+    );
+  });
+};
+
+const submitFormOne = () => {
+  console.log(byform.value);
+  byformOne.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/warehouse/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => (submitLoading.value = false)
+    );
+  });
+};
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
+    res.type = res.type + "";
+    dialogVisible.value = true;
+    formData.data = res;
+  });
+};
+const getDtlOne = (row) => {
+  modalType.value = "edit";
+  formData.dataOne = {
+    name: row.name,
+    keeperId: row.keeperId,
+    list: [],
+  };
+  dialogVisibleOne.value = true;
+};
+
+const warehouseType = ref([]);
+const getDict = () => {
+  // // 币种数据
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: useUserStore().user.tenantId,
+      dictCode: "warehouse_type",
+    })
+    .then((res) => {
+      warehouseType.value = res.rows;
+      selectConfig[0].data = res.rows.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      formConfig[0].data = res.rows.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
+};
+getList();
+getDict();
+
+const clickAdd = () => {
+  formData.dataOne.list.push({
+    type: [],
+  });
+};
+const clickDelete = (index) => {
+  formData.dataOne.list.splice(index, 1);
+};
+
+const handleBeforeUpload = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  fileListCopy.value = [
+    {
+      id: res.id,
+      fileName: res.fileName,
+      path: res.fileUrl,
+      url: res.fileUrl,
+      uid: file.uid,
+    },
+  ];
+};
+</script>
+  
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 477 - 0
src/views/JXSK/warehouseConfig/warehouse/index.vue

@@ -0,0 +1,477 @@
+<template>
+  <div class="tenant">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        :action-list="[
+          {
+            text: '添加仓库',
+            action: () => openModal('add'),
+          },
+        ]"
+        @get-list="getList"
+      >
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog
+      :title="modalType == 'add' ? '添加仓库' : '编辑'"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      title="库位维护"
+      v-model="dialogVisibleOne"
+      width="800"
+      v-loading="loadingOne"
+    >
+      <byForm
+        :formConfig="formConfigOne"
+        :formOption="formOption"
+        v-model="formData.dataOne"
+        :rules="rulesOne"
+        ref="byform"
+      >
+        <template #slot>
+          <div style="width: 100%">
+            <el-button type="primary" @click="clickAdd">添 加</el-button>
+            <el-table
+              :data="formData.dataOne.list"
+              style="width: 100%; margin-top: 16px"
+            >
+              <el-table-column label="库位编码">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.contactNo'"
+                      :rules="rulesOne.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-input v-model="row.contactNo" placeholder="请输入" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="库位名称">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.contactNo'"
+                      :rules="rulesOne.contactNo"
+                      :inline-message="true"
+                    >
+                      <el-input v-model="row.contactNo" placeholder="请输入" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="类型" width="180">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item
+                      :prop="'list.' + $index + '.type'"
+                      :rules="rulesOne.type"
+                      :inline-message="true"
+                    >
+                      <el-select
+                        v-model="row.type"
+                        placeholder="请选择类型"
+                        style="width: 100%"
+                        multiple
+                      >
+                        <el-option
+                          v-for="item in []"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+
+              <el-table-column
+                align="center"
+                label="操作"
+                width="120"
+                fixed="right"
+              >
+                <template #default="{ $index }">
+                  <el-button type="primary" link @click="clickDelete($index)"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleOne = false" size="large"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="loadingOne"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+  
+<script setup>
+/* eslint-disable vue/no-unused-components */
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref } from "vue";
+import useUserStore from "@/store/modules/user";
+
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let dialogVisibleOne = ref(false);
+
+let roomDialogVisible = ref(false);
+let modalType = ref("add");
+let rules = ref({
+  type: [
+    { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
+  ],
+  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
+});
+let rulesOne = ref({
+  type: [
+    { required: true, message: "请选择仓库类型", trigger: ["blur", "change"] },
+  ],
+  name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
+const selectConfig = reactive([
+  {
+    label: "仓库类型",
+    prop: "type",
+    data: [],
+  },
+]);
+
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "仓库名称",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "仓库类型",
+        prop: "type",
+      },
+      render(type) {
+        return proxy.dictDataEcho(type, warehouseType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "仓管员名称",
+        prop: "keeperName",
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "库位维护",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              // 弹窗提示是否删除
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
+                // 删除
+                proxy
+                  .post("/warehouse/delete", {
+                    id: row.id,
+                  })
+                  .then((res) => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {},
+  dataOne: {},
+  treeData: [],
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const treeData = ref([]);
+const formConfig = reactive([
+  {
+    type: "select",
+    prop: "type",
+    label: "仓库类型",
+    required: true,
+    data: [],
+  },
+  {
+    type: "input",
+    prop: "name",
+    label: "仓库名称",
+  },
+  {
+    type: "select",
+    prop: "keeperId",
+    label: "仓管员",
+    isLoad: {
+      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
+        useUserStore().user.tenantId
+      }`,
+      labelKey: "nickName",
+      labelVal: "userId",
+      method: "get",
+      resUrl: "rows",
+    },
+  },
+  {
+    type: "input",
+    itemType: "textarea",
+    prop: "remark",
+    label: "备注",
+  },
+]);
+const formConfigOne = reactive([
+  {
+    type: "title",
+    title: "仓库信息",
+  },
+  {
+    type: "input",
+    prop: "name",
+    label: "仓库名称",
+    disabled: true,
+  },
+  {
+    type: "select",
+    prop: "keeperId",
+    label: "仓管员",
+    disabled: true,
+    isLoad: {
+      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
+        useUserStore().user.tenantId
+      }`,
+      labelKey: "nickName",
+      labelVal: "userId",
+      method: "get",
+      resUrl: "rows",
+    },
+  },
+  {
+    type: "slot",
+    slotName: "slot",
+    label: "库位信息",
+  },
+]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/warehouse/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
+
+const submitForm = () => {
+  console.log(byform.value);
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/warehouse/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => (submitLoading.value = false)
+    );
+  });
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
+    res.type = res.type + "";
+    dialogVisible.value = true;
+    formData.data = res;
+  });
+};
+const getDtlOne = (row) => {
+  modalType.value = "edit";
+  formData.dataOne = {
+    name: row.name,
+    keeperId: row.keeperId,
+    list:[]
+  };
+  dialogVisibleOne.value = true;
+};
+
+const warehouseType = ref([]);
+const getDict = () => {
+  // // 币种数据
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: useUserStore().user.tenantId,
+      dictCode: "warehouse_type",
+    })
+    .then((res) => {
+      warehouseType.value = res.rows;
+      selectConfig[0].data = res.rows.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      formConfig[0].data = res.rows.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
+};
+getList();
+getDict();
+
+const clickAdd = () => {
+  formData.dataOne.list.push({
+    type: [],
+  });
+};
+const clickDelete = (index) => {
+  formData.dataOne.list.splice(index, 1);
+};
+</script>
+  
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/WDLY/purchaseManage/subscribe/index.vue

@@ -167,7 +167,7 @@ const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
   {
     label: "货品类型",
-    prop: "productType",
+    prop: "definition",
     data: [
       {
         label: "产品",