DESKTOP-B78GIPM\admin 2 年之前
父节点
当前提交
54121632e1

+ 4 - 0
src/mixins/JeecgListMixin.js

@@ -72,6 +72,9 @@ export const JeecgListMixin = {
   },
   methods:{
     loadData(arg) {
+      if (this.url.list==2) {
+        return
+      }
       if(!this.url.list){
         this.$message.error("请设置url.list属性!")
         return
@@ -138,6 +141,7 @@ export const JeecgListMixin = {
     },
 
     onSelectChange(selectedRowKeys, selectionRows) {
+      console.log(selectedRowKeys, selectionRows);
       this.selectedRowKeys = selectedRowKeys;
       this.selectionRows = selectionRows;
     },

+ 1 - 1
src/views/stock/goods.vue

@@ -55,7 +55,7 @@
                 </div>
                 <!-- 查询区域-END -->
                 <div>
-                    <a-table ref="table" size="middle" :scroll="{ x: '165%' }" bordered rowKey="id" :columns="columns"
+                    <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns"
                         :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
                             selectedRowKeys: selectedRowKeys,
                             onChange: onSelectChange,

+ 296 - 141
src/views/stock/modules/DepositoryForm.vue

@@ -1,158 +1,313 @@
 <template>
-  <a-spin :spinning="confirmLoading">
+<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="remark"
-            >
-              <a-textarea
-                v-model="model.remark"
-                rows="4"
-                placeholder="请输入备注"
-              />
-            </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>
+        <a-form-model ref="form" :model="model" layout="horizontal" :rules="validatorRules" slot="detail">
+            <a-row :gutter="2" align="top" type="flex">
+                <a-col :span="5" flex>
+                    <a-form-item label="" prop="depositoryList">
+                        <a-select v-model="model.depositoryId" style="width: 100%" placeholder="入仓仓库" :allowClear="true">
+                            <a-select-option v-for="(item, index) in depositoryList" :key="index" :value="item.id">{{ item.name }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="5">
+                    <a-form-item label="" prop="supplierList">
+                        <a-select v-model="model.supplierId" style="width: 100%" placeholder="供应商" :allowClear="true">
+                            <a-select-option v-for="(item, index) in supplierList" :key="index" :value="item.id">{{ item.name }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="5">
+                    <a-form-item label="" prop="storageTypeList">
+                        <a-select v-model="model.stockType" style="width: 100%" placeholder="入库类型" :allowClear="true">
+                            <a-select-option v-for="(item, index) in storageTypeList" :key="index" :value="item.value">{{ item.title }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="6" style="margin-top:5px;">
+                    <a-button @click="handleGoods" type="primary" icon="plus">批量添加</a-button>
+                </a-col>
+            </a-row>
+        </a-form-model>
     </j-form-container>
-  </a-spin>
+
+    <!-- 查询区域-END -->
+    <div>
+        <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange">
+            <span slot="state" slot-scope="record">
+                {{ record ? "启用" : "停用" }}
+                <!-- {{record}} -->
+            </span>
+            <template slot="price" slot-scope="record">
+                <a-input :placeholder="record.costPrice" v-model="record.costPrice"></a-input>
+            </template>
+            <template slot="num" slot-scope="record">
+                <a-input v-model="record.num"></a-input>
+            </template>
+            <span slot="action" slot-scope="text, record">
+                <!-- <a @click="handleEdit(record)">修改</a>
+                <a-divider type="vertical" />
+                <a @click="moreSet(record)">更多设置</a>
+                <a-divider type="vertical" /> -->
+                <a-popconfirm title="确定删除吗?" @confirm="() => deleteGoods(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+            </span>
+        </a-table>
+    </div>
+
+    <a-row>
+        <a-col :span="12">
+            <a-form-item label="备注" label-col="labelCol">
+                <a-textarea v-model="model.remarks" :rows="4" />
+            </a-form-item>
+        </a-col>
+    </a-row>
+
+    <supplier-in-goods-modal ref="modalSelectGoodsForm" @ok="selectOk"></supplier-in-goods-modal>
+</a-spin>
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
-import { validateDuplicateValue } from "@/utils/util";
-
+import {
+    httpAction,
+    getAction
+} from "@/api/manage";
+import {
+    validateDuplicateValue
+} from "@/utils/util";
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+import SupplierInGoodsModal from "./DepositorySelectGoods/selectGoodsModal.vue";
 export default {
-  name: "PosTypeForm",
-  components: {},
-  props: {
-    //表单禁用
-    disabled: {
-      type: Boolean,
-      default: false,
-      required: false,
+    name: "PosTypeForm",
+    mixins: [JeecgListMixin],
+    components: {
+        SupplierInGoodsModal,
     },
-  },
-  data() {
-    return {
-      model: { state: 1, online: 0 },
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 },
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 },
-      },
-      confirmLoading: false,
-      validatorRules: {
-        tenantId: [{ required: true, message: "请输入关联租户!" }],
-        hotelId: [{ required: true, message: "请输入关联酒店!" }],
-        name: [{ required: true, message: "请输入名称!" }],
-        state: [{ required: true, message: "请输入状态!" }],
-        online: [{ required: true, message: "请输入线上预定!" }],
-      },
-      url: {
-        add: "/kc/kcDepository/add",
-        edit: "/kc/kcDepository/edit",
-        queryById: "/kc/kcDepository/queryById",
-      },
-    };
-  },
-  computed: {
-    formDisabled() {
-      return this.disabled;
+    props: {
+        //表单禁用
+        disabled: {
+            type: Boolean,
+            default: false,
+            required: false,
+        },
     },
-  },
-  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);
+    data() {
+        return {
+            model: {
+                code: "",
+                createAt: "",
+                createTime: "",
+                // depositoryId: "",
+                hotelId: "",
+                id: "",
+                remarks: "",
+                status: 0,
+                num: 0,
+                // stockInfo: "",
+                // stockType: 0,
+                // supplierId: "",
+                tenantId: "",
+                type: 2,
+                verifyAt: "",
+                verifyRemarks: "",
+                verifyTime: ""
+
+            },
+            labelCol: {
+                xs: {
+                    span: 24,
+                },
+                sm: {
+                    span: 5,
+                },
+            },
+            wrapperCol: {
+                xs: {
+                    span: 24,
+                },
+                sm: {
+                    span: 16,
+                },
+            },
+            confirmLoading: false,
+            validatorRules: {
+                depositoryList: [{
+                    required: true,
+                    message: "请选择入库仓库!",
+                }, ],
+                supplierList: [{
+                    required: true,
+                    message: "请选择供应商!",
+                }, ],
+                storageTypeList: [{
+                    required: true,
+                    message: "请选择入库类型!",
+                }, ],
+            },
+            // 表头
+            columns: [{
+                    title: "商品名称",
+                    align: "center",
+                    dataIndex: "name",
+                },
+                {
+                    title: "单位",
+                    align: "center",
+                    dataIndex: "goodUnit",
+                },
+                {
+                    title: "商品规格",
+                    align: "center",
+                    dataIndex: "spec",
+                },
+                {
+                    title: "成本价",
+                    align: "center",
+                    // dataIndex: "costPrice",
+                    scopedSlots: {
+                        customRender: "price"
+                    },
+                },
+                {
+                    title: "出入库数量",
+                    align: "center",
+                    // dataIndex: "spec",
+                    scopedSlots: {
+                        customRender: "num"
+                    },
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'action',
+                    key: 'action',
+                    scopedSlots: {
+                        customRender: "action"
+                    },
+                    align: 'center',
+                    fixed: "right",
+                    width: 200,
+                }
+            ],
+            url: {
+                list: 2,
+                add: "/kc/kcStock/add",
+                edit: "/kc/kcStock/edit",
+                queryById: "/kc/kcDepository/queryById",
+            },
+            depositoryList: [],
+            supplierList: [],
+            storageTypeList: [],
+            dataSource: []
+        };
     },
-    edit(record) {
-      this.model = Object.assign({}, record);
-      this.visible = true;
+    computed: {
+        formDisabled() {
+            return this.disabled;
+        },
     },
-    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";
+    created() {
+        var _info = JSON.parse(localStorage.getItem("storeInfo"));
+        if (_info) {
+            this.model.hotelId = _info.id;
+        }
+        //备份model原始值
+        this.modelDefault = JSON.parse(JSON.stringify(this.model));
+        getAction("/kc/kcDepository/list", {
+            state: 1,
+        }).then((res) => {
+            if (res.success) {
+                this.depositoryList = res.result.records;
+            }
+        });
+        getAction("/kc/kcSupplier/list", {
+            state: 1,
+        }).then((res) => {
+            if (res.success) {
+                this.supplierList = res.result.records;
+            }
+        });
+        getAction("/kc/kcStock/storageTypeList", {}).then((res) => {
+            if (res.success) {
+                this.storageTypeList = res.result;
+            }
+        });
+    },
+    methods: {
+        handleGoods(row) {
+            this.$refs.modalSelectGoodsForm.add();
+            this.$refs.modalSelectGoodsForm.title = "供货商品";
+            this.$refs.modalSelectGoodsForm.disableSubmit = false;
+            this.$refs.modalSelectGoodsForm.supplierId = this.model.supplierId;
+        },
+        /**
+         * 删除商品
+         */
+        deleteGoods(id) {
+            this.dataSource = this.dataSource.filter(item => item.id !== id)
+        },
+        selectOk(e) {
+            console.log(e);
+            this.dataSource = e
+        },
+        add() {
+            this.edit(this.modelDefault,1);
+        },
+        edit(record, type) {
+          if (type) {
+            return
           }
-          httpAction(httpurl, this.model, method)
-            .then((res) => {
-              if (res.success) {
-                that.$message.success(res.message);
-                that.$emit("ok");
-              } else {
-                that.$message.warning(res.message);
+            this.model = Object.assign({}, record);
+            getAction('/kc/kcStockDetail/list').then(res=>{
+              console.log(res);
+              if ( res.code==200 ) {
+                this.dataSource = res.result.records
+                this.dataSource.forEach(ele=>{
+                  ele.costPrice = ele.price
+                })
               }
             })
-            .finally(() => {
-              that.confirmLoading = false;
+            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";
+                    }
+                    this.model.stockDetailList = this.dataSource
+                    this.model.stockDetailList.forEach(element => {
+                        element.supplierInGoodsId = element.supplierInGoodsId;
+                        element.price = element.costPrice;
+                        element.num = Number(element.num);
+                    });
+                    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>
+</script>

+ 3 - 2
src/views/stock/modules/DepositoryModal.vue

@@ -5,10 +5,11 @@
     :visible="visible"
     switchFullscreen
     @ok="handleOk"
+    destroyOnClose="true"
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
-    <pos-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
+    <pos-type-form v-if="visible" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
   </j-modal>
 </template>
 
@@ -23,7 +24,7 @@
     data () {
       return {
         title:'',
-        width:800,
+        width:1200,
         visible: false,
         disableSubmit: false
       }

+ 216 - 0
src/views/stock/modules/DepositorySelectGoods/DepositorySelectGoods.vue

@@ -0,0 +1,216 @@
+<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",
+        },
+        {
+          title: "供应价",
+          align: "center",
+          dataIndex: "costPrice",
+        },
+        {
+          title: "单位",
+          align: "center",
+          dataIndex: "goodUnit",
+        },
+      ],
+      url: {
+        list: "/kc/kcSupplierInGoods/goodsList?inGoods=true&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;
+      console.log(this.selectedRowKeys);
+      if (this.selectedRowKeys.length === 0) {
+        this.$message.warning("请先选择商品");
+        return;
+      }
+      let arr = this.dataSource.filter((item) => {
+        return this.selectedRowKeys.includes(item.id);
+      });
+      arr.forEach(element => {
+        element.num = 0;
+        element.price = element.costPrice
+      });
+      this.$emit("ok", arr);
+      // that.confirmLoading = true;
+      // let httpurl = "/kc/kcStock/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/DepositorySelectGoods/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 "./DepositorySelectGoods.vue";
+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>

+ 259 - 289
src/views/stock/storage.vue

@@ -1,326 +1,296 @@
 <template>
-  <a-card :bordered="false">
+<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="">
-              <a-select
-                v-model="queryParam.depositoryId"
-                style="width: 100%"
-                placeholder="入仓仓库"
-                :allowClear="true"
-              >
-                <a-select-option
-                  v-for="(item, index) in depositoryList"
-                  :key="index"
-                  :value="item.id"
-                  >{{ item.name }}</a-select-option
-                >
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="3">
-            <a-form-item label="">
-              <a-select
-                v-model="queryParam.supplierId"
-                style="width: 100%"
-                placeholder="供应商"
-                :allowClear="true"
-              >
-                <a-select-option
-                  v-for="(item, index) in supplierList"
-                  :key="index"
-                  :value="item.id"
-                  >{{ item.name }}</a-select-option
-                >
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="3">
-            <a-form-item label="">
-              <a-select
-                v-model="queryParam.stockType"
-                style="width: 100%"
-                placeholder="入库类型"
-                :allowClear="true"
-              >
-                <a-select-option
-                  v-for="(item, index) in storageTypeList"
-                  :key="index"
-                  :value="item.value"
-                  >{{ item.title }}</a-select-option
-                >
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="3">
-            <a-form-item label="">
-              <a-select
-                v-model="queryParam.status"
-                style="width: 100%"
-                placeholder="审核状态"
-                :allowClear="true"
-              >
-                <a-select-option :value="0">待审核</a-select-option>
-                <a-select-option :value="1">审核通过</a-select-option>
-                <a-select-option :value="2">审核未通过</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :span="3">
-            <a-form-item label="">
-              <j-input
-                placeholder="入库内容"
-                v-model="queryParam.stockInfo"
-              ></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>
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+                <a-col :span="3">
+                    <a-form-item label="">
+                        <a-select v-model="queryParam.depositoryId" style="width: 100%" placeholder="入仓仓库" :allowClear="true">
+                            <a-select-option v-for="(item, index) in depositoryList" :key="index" :value="item.id">{{ item.name }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="3">
+                    <a-form-item label="">
+                        <a-select v-model="queryParam.supplierId" style="width: 100%" placeholder="供应商" :allowClear="true">
+                            <a-select-option v-for="(item, index) in supplierList" :key="index" :value="item.id">{{ item.name }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="3">
+                    <a-form-item label="">
+                        <a-select v-model="queryParam.stockType" style="width: 100%" placeholder="入库类型" :allowClear="true">
+                            <a-select-option v-for="(item, index) in storageTypeList" :key="index" :value="item.value">{{ item.title }}</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="3">
+                    <a-form-item label="">
+                        <a-select v-model="queryParam.status" style="width: 100%" placeholder="审核状态" :allowClear="true">
+                            <a-select-option :value="0">待审核</a-select-option>
+                            <a-select-option :value="1">审核通过</a-select-option>
+                            <a-select-option :value="2">审核未通过</a-select-option>
+                        </a-select>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="3">
+                    <a-form-item label="">
+                        <j-input placeholder="入库内容" v-model="queryParam.stockInfo"></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>
+        <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">
+        <!-- <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="{
+        <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>
+        }" 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="handleEdit(record)">编辑</a>
+            <span slot="action" slot-scope="text, record" v-if="record.status==0">
+                <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical" />
-          <a-popconfirm
-            title="确定删除吗?"
-            @confirm="() => handleDelete(record.id)"
-          >
-            <a>删除</a>
-          </a-popconfirm>
-        </span>
-      </a-table>
+                <a-divider type="vertical" />
+                <a @click="examine(record)">审核</a>
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+            </span>
+        </a-table>
     </div>
 
+    <!-- 审核弹窗 -->
+    <a-modal title="入库审核" :visible="examineVisible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel">
+        <a-form>
+            <a-form-item label="审核状态">
+                <a-radio-group name="radioGroup" v-model="examineData.status" @change="onChange">
+                    <a-radio :value="1">
+                        通过
+                    </a-radio>
+                    <a-radio :value="0">
+                        未通过
+                    </a-radio>
+                </a-radio-group>
+            </a-form-item>
+            <a-form-item label="审核意见">
+                <a-textarea v-model="examineData.verifyRemarks" rows="4" />
+            </a-form-item>
+        </a-form>
+    </a-modal>
+
     <depository-modal ref="modalForm" @ok="modalFormOk"></depository-modal>
-  </a-card>
+</a-card>
 </template>
-  
-  <script>
-import { JeecgListMixin } from "@/mixins/JeecgListMixin";
-import { filterObj } from "@/utils/util";
-import { getAction } from "@/api/manage";
+
+<script>
+import {
+    JeecgListMixin
+} from "@/mixins/JeecgListMixin";
+import {
+    filterObj
+} from "@/utils/util";
+import {
+    getAction,
+    postAction
+} from "@/api/manage";
 import DepositoryModal from "./modules/DepositoryModal.vue";
 export default {
-  name: "memberList",
-  mixins: [JeecgListMixin],
-  components: {
-    DepositoryModal,
-  },
-  data() {
-    return {
-      activeKey: "1",
-      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: "code",
-        },
-        {
-          title: "申请日期",
-          align: "center",
-          dataIndex: "createTime",
-        },
-        {
-          title: "入库仓库",
-          align: "center",
-          dataIndex: "depositoryName",
-        },
-        {
-          title: "入库类型",
-          align: "center",
-          dataIndex: "stockTypeName",
-        },
-        {
-          title: "供应商",
-          align: "center",
-          dataIndex: "supplierName",
+    name: "memberList",
+    mixins: [JeecgListMixin],
+    components: {
+        DepositoryModal,
+    },
+    data() {
+        return {
+            activeKey: "1",
+            queryParam: {},
+            examineVisible: false,
+            // 分页参数
+            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: "code",
+                },
+                {
+                    title: "申请日期",
+                    align: "center",
+                    dataIndex: "createTime",
+                },
+                {
+                    title: "入库仓库",
+                    align: "center",
+                    dataIndex: "depositoryName",
+                },
+                {
+                    title: "入库类型",
+                    align: "center",
+                    dataIndex: "stockTypeName",
+                },
+                {
+                    title: "供应商",
+                    align: "center",
+                    dataIndex: "supplierName",
+                },
+                {
+                    title: "入库内容",
+                    align: "center",
+                    dataIndex: "createTime",
+                },
+                {
+                    title: "制单人",
+                    align: "center",
+                    dataIndex: "createAt",
+                },
+                {
+                    title: "状态",
+                    align: "center",
+                    dataIndex: "status",
+                    customRender(text) {
+                        var msg = "待审核";
+                        if (text == 1) {
+                            msg = "审核通过";
+                        } else if (text == 2) {
+                            msg = "审核未通过";
+                        }
+                        return msg;
+                    },
+                },
+                {
+                    title: "操作",
+                    dataIndex: "action",
+                    align: "center",
+                    fixed: "right",
+                    width: 147,
+                    scopedSlots: {
+                        customRender: "action"
+                    },
+                },
+            ],
+            url: {
+                list: "/kc/kcStock/list",
+                delete: "/kc/kcStock/delete",
+                deleteBatch: "/kc/kcStock/deleteBatch",
+                exportXlsUrl: "/kc/kcStock/exportXls",
+                importExcelUrl: "/kc/kcStock/importExcel",
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+            depositoryList: [],
+            supplierList: [],
+            storageTypeList: [],
+            examineData: {}
+        };
+    },
+    created() {
+        getAction("/kc/kcDepository/list", {
+            state: 1,
+        }).then((res) => {
+            if (res.success) {
+                this.depositoryList = res.result.records;
+            }
+        });
+        getAction("/kc/kcSupplier/list", {
+            state: 1,
+        }).then((res) => {
+            if (res.success) {
+                this.supplierList = res.result.records;
+            }
+        });
+        getAction("/kc/kcStock/storageTypeList", {}).then((res) => {
+            if (res.success) {
+                this.storageTypeList = res.result;
+            }
+        });
+    },
+    methods: {
+        tabStockTypeChange(e) {
+            this.queryParam.type = e;
+            this.loadData();
         },
-        {
-          title: "入库内容",
-          align: "center",
-          dataIndex: "createTime",
+        examine(record) {
+            console.log(record);
+            this.examineData = JSON.parse(JSON.stringify(record));
+            this.examineVisible = true;
         },
-        {
-          title: "制单人",
-          align: "center",
-          dataIndex: "createAt",
+        handleOk() {
+            postAction("/kc/kcStock/audit", this.examineData).then((res) => {
+                if (res.success) {
+                    this.loadData();
+                    this.$message.success("审核成功");
+                    this.examineVisible = false;
+                }
+            });
         },
-        {
-          title: "状态",
-          align: "center",
-          dataIndex: "status",
-          customRender(text) {
-            var msg = "待审核";
-            if (text == 1) {
-              msg = "审核通过";
-            } else if (text == 2) {
-              msg = "审核未通过";
-            }
-            return msg;
-          },
+        handleCancel() {
+            this.examineVisible = false;
         },
-        {
-          title: "操作",
-          dataIndex: "action",
-          align: "center",
-          fixed: "right",
-          width: 147,
-          scopedSlots: { customRender: "action" },
+        onChange(e) {
+            console.log(e.target.value);
+            this.examineData.status = e.target.value;
         },
-      ],
-      url: {
-        list: "/kc/kcStock/list",
-        delete: "/kc/kcStock/delete",
-        deleteBatch: "/kc/kcStock/deleteBatch",
-        exportXlsUrl: "/kc/kcStock/exportXls",
-        importExcelUrl: "/kc/kcStock/importExcel",
-      },
-      dictOptions: {},
-      superFieldList: [],
-      selectedRowKeys: [],
-      isorter: {
-        column: "createTime",
-        order: "desc",
-      },
-      depositoryList: [],
-      supplierList: [],
-      storageTypeList: [],
-    };
-  },
-  created() {
-    getAction("/kc/kcDepository/list", {
-      state: 1,
-    }).then((res) => {
-      if (res.success) {
-        this.depositoryList = res.result.records;
-      }
-    });
-    getAction("/kc/kcSupplier/list", {
-      state: 1,
-    }).then((res) => {
-      if (res.success) {
-        this.supplierList = res.result.records;
-      }
-    });
-    getAction("/kc/kcStock/storageTypeList", {}).then((res) => {
-      if (res.success) {
-        this.storageTypeList = res.result;
-      }
-    });
-  },
-  methods: {
-    tabStockTypeChange(e) {
-      this.queryParam.type = e;
-      this.loadData();
     },
-  },
 };
 </script>
-  <style scoped>
+
+<style scoped>
 @import "~@assets/less/common.less";
-</style>
+</style>