Forráskód Böngészése

仓库/供应商管理

gqx 2 éve
szülő
commit
8add0ced89

+ 3 - 3
src/views/stock/index.vue

@@ -11,7 +11,7 @@
       </a-tab-pane>
       <a-tab-pane key="3">
         <span slot="tab"> 供应商管理 </span>
-        <goods-order v-if="activeKey == '3'"></goods-order>
+        <supplier v-if="activeKey == '3'"></supplier>
       </a-tab-pane>
       <a-tab-pane key="4">
         <span slot="tab"> 出入库管理 </span>
@@ -31,14 +31,14 @@
 <script>
 import depository from "./depository.vue";
 import goods from "./goods.vue";
-// import goodsOrder from "./goodsOrder.vue";
+import supplier from "./supplier.vue";
 // import tablediandangallery from "./tablediandangallery.vue";
 
 export default {
   components: {
     depository,
     goods,
-    // goodsOrder,
+    supplier,
     // tablediandangallery,
   },
   data() {

+ 197 - 0
src/views/stock/modules/SelectGoods.vue

@@ -0,0 +1,197 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-input
+                placeholder="商品名称"
+                v-model="queryParam.goodsName"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <span>
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+      >
+        <template slot="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleSelect(record)">选择</a>
+        </span>
+      </a-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+import { getAction } from "../../../api/manage";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  props: {
+    supplierId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "商品类别",
+          align: "center",
+          dataIndex: "goodTypeName",
+        },
+        {
+          title: "商品规格",
+          align: "center",
+          dataIndex: "spec",
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplierInGoods/goodsList?supplierId=" + this.supplierId,
+        delete: "/kc/kcSupplierInGoods/delete",
+        deleteBatch: "/kc/kcSupplierInGoods/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplierInGoods/exportXls",
+        importExcelUrl: "/kc/kcSupplierInGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleSelect(row) {
+      this.$emit("ok", row);
+    },
+    submitForm() {
+      const that = this;
+      if (this.selectedRowKeys.length === 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      that.confirmLoading = true;
+      let httpurl = "/kc/kcSupplierInGoods/add";
+      let method = "post";
+      var model = {
+        supplierId: this.supplierId,
+        goodsIds: this.selectedRowKeys,
+      };
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      httpAction(httpurl, model, method)
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.$emit("ok");
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {
+          that.confirmLoading = false;
+        });
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+</style>

+ 66 - 0
src/views/stock/modules/SelectGoodsModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <picking-goods-order
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :supplierId="supplierId"
+    ></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+import PickingGoodsOrder from "./SelectGoods";
+export default {
+  name: "SelectGoodsModal",
+  components: {
+    PickingGoodsOrder,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      supplierId: "",
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      // this.$nextTick(()=>{
+      //   this.$refs.realForm.add();
+      // })
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 203 - 0
src/views/stock/modules/SupplierForm.vue

@@ -0,0 +1,203 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="供应商名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input v-model="model.name" placeholder="请输入供应商名称"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="地址"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="address"
+            >
+              <a-input v-model="model.address" placeholder="请输入地址"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="contactName"
+            >
+              <a-input v-model="model.contactName" placeholder="请输入姓名"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="mobile"
+            >
+              <a-input v-model="model.mobile" placeholder="请输入手机号"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="开户名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="accountName"
+            >
+              <a-input v-model="model.accountName" placeholder="请输入开户名称"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="开户银行"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="accountBank"
+            >
+              <a-input v-model="model.accountBank" placeholder="请输入开户银行"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="银行账号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="bankCardNo"
+            >
+              <a-input v-model="model.bankCardNo" placeholder="请输入银行账号"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="发票抬头"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="InvoiceTitle"
+            >
+              <a-input v-model="model.invoiceTitle" placeholder="请输入发票抬头"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="状态"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="state"
+            >
+              <a-radio-group v-model="model.state">
+                <a-radio :value="1"> 启用 </a-radio>
+                <a-radio :value="0"> 停用 </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "PosTypeForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { state: 1, online: 0 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        state: [{ required: true, message: "请输入状态!" }],
+        contactName: [{ required: true, message: "请输入姓名!" }],
+        mobile: [{ required: true, message: "请输入手机号!" }],
+      },
+      url: {
+        add: "/kc/kcSupplier/add",
+        edit: "/kc/kcSupplier/edit",
+        queryById: "/kc/kcSupplier/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 209 - 0
src/views/stock/modules/SupplierInGoods.vue

@@ -0,0 +1,209 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-input
+                placeholder="商品名称"
+                v-model="queryParam.goodsName"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <span>
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+          <a-col :span="3">
+            <a-button @click="handleAdd" type="danger" style="margin-left: 8px"
+              >新增</a-button
+            ></a-col
+          >
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <template slot="price" slot-scope="text, record, index">
+          <div>
+            <a-input-number
+              v-model="record.price"
+              :min="0"
+              @change="priceChange($event, record)"
+            />
+          </div>
+        </template>
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+    <select-goods-modal ref="modalForm" @ok="modalFormOk"></select-goods-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+import SelectGoodsModal from "./SelectGoodsModal";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    SelectGoodsModal,
+  },
+  props: {
+    supplierId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      datetime: [],
+      hotelId: "",
+      num: 1,
+      description: "PickingGoodsOrder",
+      // 表头
+      columns: [
+        {
+          title: "商品名称",
+          align: "center",
+          dataIndex: "goodsName",
+        },
+        {
+          title: "商品类别",
+          align: "center",
+          dataIndex: "goodsTypeName",
+        },
+        {
+          title: "供应价",
+          align: "center",
+          dataIndex: "price",
+          scopedSlots: { customRender: "price" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplierInGoods/list?supplierId=" + this.supplierId,
+        delete: "/kc/kcSupplierInGoods/delete",
+        deleteBatch: "/kc/kcSupplierInGoods/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplierInGoods/exportXls",
+        importExcelUrl: "/kc/kcSupplierInGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      orderGoodsDetailList: [],
+      selectOrderInfo: {},
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    priceChange(e, record) {
+      let httpurl = "/kc/kcSupplierInGoods/edit";
+      let method = "put";
+      httpAction(httpurl, record, method)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+    },
+    handleAdd() {
+      this.$refs.modalForm.add();
+      this.$refs.modalForm.title = "选择供货商品";
+      this.$refs.modalForm.disableSubmit = false;
+      this.$refs.modalForm.supplierId = this.supplierId;
+    },
+    handleSelect(row) {
+      this.$emit("ok", row);
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+</style>

+ 66 - 0
src/views/stock/modules/SupplierInGoodsModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <picking-goods-order
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :supplierId="supplierId"
+    ></picking-goods-order>
+  </j-modal>
+</template>
+
+<script>
+import PickingGoodsOrder from "./SupplierInGoods";
+export default {
+  name: "PickingGoodsOrderModal",
+  components: {
+    PickingGoodsOrder,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+      supplierId: "",
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      // this.$nextTick(()=>{
+      //   this.$refs.realForm.add();
+      // })
+    },
+    edit(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.edit(record);
+      });
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleOk() {
+      this.$refs.realForm.submitForm();
+    },
+    submitCallback(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/stock/modules/SupplierModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <pos-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTypeForm from './SupplierForm'
+  export default {
+    name: 'PosTypeModal',
+    components: {
+      PosTypeForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 305 - 0
src/views/stock/supplier.vue

@@ -0,0 +1,305 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input placeholder="名称" v-model="queryParam.name"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="payFlagslot" slot-scope="text, record, index">
+          {{ record.payFlag == 1 ? "是" : "否" }}
+        </template>
+        <template slot="iconslot" slot-scope="text, record, index">
+          <a-icon :type="record.icon" theme="filled" />
+        </template>
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleGoods(record)">供货商品</a>
+
+          <a-divider type="vertical" />
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <supplier-modal ref="modalForm" @ok="modalFormOk"></supplier-modal>
+
+    <supplier-in-goods-modal
+      ref="modalSelectGoodsForm"
+      @ok="modalFormOk"
+    ></supplier-in-goods-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+import SupplierModal from "./modules/SupplierModal.vue";
+import SupplierInGoodsModal from "./modules/SupplierInGoodsModal.vue";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    SupplierModal,
+    SupplierInGoodsModal,
+  },
+  data() {
+    return {
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      // 表头
+      columns: [
+        {
+          title: "供应商名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "地址",
+          align: "center",
+          dataIndex: "address",
+        },
+        {
+          title: "联系人",
+          align: "center",
+          dataIndex: "contactName",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "state",
+          customRender(text) {
+            return text === 1 ? "启用" : "停用";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplier/list",
+        delete: "/kc/kcSupplier/delete",
+        deleteBatch: "/kc/kcSupplier/deleteBatch",
+        exportXlsUrl: "/kc/kcSupplier/exportXls",
+        importExcelUrl: "pos/kcSupplier/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    handleGoods(row) {
+      this.$refs.modalSelectGoodsForm.add();
+      this.$refs.modalSelectGoodsForm.title = "供货商品";
+      this.$refs.modalSelectGoodsForm.disableSubmit = false;
+      this.$refs.modalSelectGoodsForm.supplierId = row.id;
+    },
+    getAvatarView: function (avatar) {
+      return getFileAccessHttpUrl(avatar);
+    },
+
+    batchFrozen: function (status) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return false;
+      } else {
+        let ids = "";
+        let that = this;
+        let isAdmin = false;
+        that.selectionRows.forEach(function (row) {
+          if (row.username == "admin") {
+            isAdmin = true;
+          }
+        });
+        if (isAdmin) {
+          that.$message.warning("管理员账号不允许此操作,请重新选择!");
+          return;
+        }
+        that.selectedRowKeys.forEach(function (val) {
+          ids += val + ",";
+        });
+        that.$confirm({
+          title: "确认操作",
+          content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+          onOk: function () {
+            frozenBatch({ ids: ids, status: status }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.loadData();
+                that.onClearSelected();
+              } else {
+                that.$message.warning(res.message);
+              }
+            });
+          },
+        });
+      }
+    },
+    handleMenuClick(e) {
+      if (e.key == 1) {
+        this.batchDel();
+      } else if (e.key == 2) {
+        this.batchFrozen(2);
+      } else if (e.key == 3) {
+        this.batchFrozen(1);
+      }
+    },
+    handleFrozen: function (id, status, username) {
+      let that = this;
+      //TODO 后台校验管理员角色
+      if ("admin" == username) {
+        that.$message.warning("管理员账号不允许此操作!");
+        return;
+      }
+      frozenBatch({ ids: id, status: status }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.loadData();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    handleChangePassword(username) {
+      this.$refs.passwordmodal.show(username);
+    },
+    passwordModalOk() {
+      //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+    },
+    onSyncFinally({ isToLocal }) {
+      // 同步到本地时刷新下数据
+      if (isToLocal) {
+        this.loadData();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>