Browse Source

订单入库异常情况

zhangjinxing 3 years ago
parent
commit
c9ee2ec902

+ 18 - 0
src/apis/service/purchaseIn/storeAnomaly/index.js

@@ -0,0 +1,18 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 新建异常原因
+  add: (data, params) => http(api + "resultcreate", data, "post", params),
+  // 删除异常原因
+  delete: (data, params) => http(api + "resultdel", data, "post", params),
+  // 获取异常原因列表
+  list: (data, params) => http(api + "resultlist", data, "post", params),
+  // 获取异常原因详情
+  detail: (data, params) => http(api + "resultselect", data, "post", params),
+  // 更新异常原因
+  update: (data, params) => http(api + "resultedit", data, "post", params),
+  // 修改异常原因状态
+  status: (data, params) => http(api + "resultstatu", data, "post", params),
+};
+   

+ 3 - 0
src/apis/service/purchaseIn/storeGoods/index.js

@@ -14,5 +14,8 @@ export default {
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改商品上下架状态
   status: (data, params) => http(api + "goodstatus", data, "post", params),
+  // 供应商列表
+  supplierlist: (data, params) => http(api + "supplierlist", data, "post", params),
+
 };
    

+ 321 - 0
src/views/purchaseIn/storeAnomaly/addEdit.vue

@@ -0,0 +1,321 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="700px"
+    @close="closeModel"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    <el-card>
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            ref="ruleForm"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              label="异常原因"
+              prop="result"
+              v-if="id === 'add' || (isDetail ? true : true)"
+            >
+              <el-input
+                v-model="ruleForm.result"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+
+            <el-form-item
+              label="异常备注"
+              prop="result_desc"
+              v-if="id === 'add' || (isDetail ? true : true)"
+            >
+              <el-input
+                :autosize="{ minRows: 4, maxRows: 10 }"
+                type="textarea"
+                v-model="ruleForm.result_desc"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+
+            <!-- <el-form-item label="姓名" prop="fullName">
+              <el-input
+                v-model="ruleForm.fullName"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item label="手机号" prop="tel">
+              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item label="密码" prop="password" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="密码"
+                :maxlength="20"
+                v-model="ruleForm.password"
+              ></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="再次输入密码"
+                :maxlength="20"
+                v-model="ruleForm.password2"
+              ></el-input>
+            </el-form-item> -->
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button type="primary" @click="submitForm" v-if="!isDetail"
+            >保 存
+          </el-button>
+          <el-button @click="showModelThis = false">{{
+            isDetail ? "关 闭" : "取 消"
+          }}</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+   <script>
+import asyncRequest from "@/apis/service/purchaseIn/storeAnomaly";
+import resToken from "@/mixins/resToken";
+import {
+  isnumber,
+  isMobile,
+  validEmail,
+  isAlphanumeric,
+  isChinese,
+  isEmoticon,
+  validAlphabets,
+} from "@/utils/validate";
+export default {
+  name: "storeAnomaly",
+  props: ["showModel", "id", "isDetail", "sitem"],
+  mixins: [resToken],
+  data() {
+    const validateusername = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("账号不能为空!"));
+      } else {
+        if (value.length < 6 || value.length > 18) {
+          callback(new Error("账号规则为6~18位数字与字母组合!"));
+        } else {
+          if (isnumber(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (validAlphabets(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (!isAlphanumeric(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatename = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("真实姓名不能为空!"));
+      } else {
+        if (value.length < 2 || value.length > 12) {
+          callback(new Error("真实姓名规则为2~12位汉字!"));
+        } else {
+          if (!isChinese(value)) {
+            console.log(9999);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else if (isEmoticon(value)) {
+            console.log(2345);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+
+    const validateEmail = (rule, value, callback) => {
+      if (value === "") {
+        callback();
+      } else {
+        if (!validEmail(value)) {
+          callback(new Error("邮箱格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      loading: false,
+      title: "添加账号",
+      showModelThis: this.showModel,
+      ruleForm: {
+        // username: "", // 账号
+        // name: "", // 真实姓名
+        // mobile: "",
+        // email: "",
+        // role_id: "",
+        // status: "1",
+        // item: [],
+        result: "", //入库验收异常原因
+        result_desc: "", //入库异常备注
+      },
+      rulesThis: this.rules,
+      rules: {
+        result: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "入库异常原因不能为空",
+          },
+        ],
+
+        result_desc: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "入库异常备注不能为空",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    async initForm() {
+      this.loading = true;
+      // await this.getRole();
+      if (this.id === "add") {
+        this.title = "添加异常原因";
+        this.rulesThis = this.rules;
+        await this.resetForm();
+      } else {
+        if (this.isDetail) {
+          this.title = "异常原因详情";
+          this.rulesThis = {};
+        } else {
+          this.title = "修改异常原因";
+          this.rulesThis = this.rules;
+        }
+        // console.log("修改异常");
+        console.log(this.id);
+        await this.resetForm();
+        // console.log(this.sitem);
+        await this.initData();
+      }
+      this.loading = false;
+    },
+    // 获取详情列表
+    async initData() {
+      const res = await asyncRequest.detail({ id: this.id });
+      if (res && res.code === 0 && res.data) {
+        this.ruleForm = res.data;
+        console.log(this.ruleForm);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.ruleForm = {
+            result: "", //入库验收异常原因
+            result_desc: "", //入库异常备注
+          };
+        }
+      });
+    },
+
+    // 提交功能
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        console.log(valid);
+        if (valid) {
+          this.loading = true;
+          const { result, result_desc } = JSON.parse(
+            JSON.stringify(this.ruleForm)
+          );
+          const model = {
+            result: result || "", //入库验收异常原因
+            result_desc: result_desc || "", //入库异常备注
+            id: this.id,
+          };
+          let res = {};
+          if (this.id === "add") {
+            delete model["id"];
+            res = await asyncRequest.add(model);
+          } else {
+            console.log("update");
+            res = await asyncRequest.update(model);
+            console.log(res);
+          }
+          this.loading = false;
+          if (res && res.code === 0) {
+            const title = this.id === "add" ? "添加成功" : "修改成功";
+            this.$notify.success({
+              title,
+              message: "",
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.storeAnomaly {
+}
+</style>
+   

+ 336 - 0
src/views/purchaseIn/storeAnomaly/index.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="storeAnomaly pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <ex-table
+        v-loading="false"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              
+                
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    style="float: right; margin-left: 5px"
+                    @click="openModal('add', false)"
+                  >
+                    新建
+                  </el-button>
+                </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, true, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '005')"
+            effect="dark"
+            content="修改"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+              @click="openModal(scope.row.id, false, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '1'
+            "
+            effect="dark"
+            content="禁用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-pause tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '0'
+            "
+            effect="dark"
+            content="启用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-play tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '006')"
+            effect="dark"
+            content="删除"
+            placement="top"
+          >
+            <i
+              class="el-icon-delete tb-icon"
+              @click="deleteItem(scope.row.id)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+      <add-edit
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+
+    <add-edit
+      :showModel="showModel"
+      :id="modelId"
+      :isDetail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    ></add-edit>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import statusList from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/purchaseIn/storeAnomaly";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "storeAnomaly",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "storeAnomaly"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        status: "", //
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "id",
+          label: "序列号",
+          width: "80px",
+        },
+        {
+          prop: "result",
+          label: "入库验收异常原因",
+        },
+        {
+          prop: "result_desc",
+          label: "异常描述",
+        },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          width: "80px",
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          sortable: true,
+          width: "140px",
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+          width: "150px",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    async deleteItem(id) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    restSearch() {
+      this.parmValue = {
+        status: "", //
+        page: 1, // 页码
+        size: 10, // 每页显示条数
+      };
+      this.searchList();
+    },
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        // console.log(this.tableData);
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+
+    async statusConfirm(id, status) {
+      let str = status === "1" ? "禁用" : "启用";
+      await this.$confirm("确定要改为" + str + "?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+  },
+};
+</script>
+  <style lang="scss" scoped>
+</style>
+   

+ 66 - 166
src/views/purchaseIn/storeGoods/index.vue

@@ -35,13 +35,41 @@
                   <company-search :size="searchSize"></company-search>
                 </el-col> -->
 
+                <el-col :span="4" style="width: 300px">
+                  <!-- <el-select
+                    v-model="product"
+                    :size="searchSize"
+                    multiple
+                    filterable
+                    remote
+                    reserve-keyword
+                    placeholder="请输入商品名称"
+                    :remote-method="remoteMethod"
+                    :loading="loading"
+                  >
+                    <el-option
+                      v-for="item in product_options"
+                      :key="item.id"
+                      :label="item.good_name"
+                      :value="item.type_code"
+                    >
+                    </el-option>
+                  </el-select> -->
+                  <el-input
+                    placeholder="请输入商品名称"
+                    v-model="product_name"
+                    clearable
+                  >
+                  </el-input>
+                </el-col>
+
                 <el-col :span="4">
-                  <el-autocomplete
-                    v-model="state"
-                    :fetch-suggestions="querySearchAsync"
-                    placeholder="请输入内容"
-                    @select="handleSelect"
-                  ></el-autocomplete>
+                  <el-input
+                    placeholder="请输入商品编码"
+                    v-model="product_code"
+                    clearable
+                  >
+                  </el-input>
                 </el-col>
 
                 <!-- <el-col :span="4" style="width: 120px">
@@ -82,15 +110,15 @@
                     placeholder="手机号"
                   />
                 </el-col> -->
-                <!-- <el-col :span="4" style="width: 54px">
+                <el-col :span="4" style="width: 54px">
                   <el-button
                     :size="searchSize"
                     type="primary"
                     class="fr"
                     icon="el-icon-search"
                     @click="searchList"
-                /></el-col> -->
-                <!-- <el-col :span="4" style="width: 66px">
+                /></el-col>
+                <el-col :span="4" style="width: 66px">
                   <el-button
                     type="warning"
                     class="fr"
@@ -99,8 +127,8 @@
                   >
                     重置
                   </el-button>
-                </el-col> -->
-                <!-- <el-col :span="3" style="width: 66px; float: right">
+                </el-col>
+                <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                     :size="searchSize"
                     type="primary"
@@ -109,7 +137,7 @@
                   >
                     刷新
                   </el-button>
-                </el-col> -->
+                </el-col>
               </el-col>
             </el-row>
           </div>
@@ -125,7 +153,7 @@
           ></el-tag>
         </template>
         <template #operation="{ scope }">
-          <el-tooltip
+          <!-- <el-tooltip
             v-if="powers.some((item) => item == '002')"
             effect="dark"
             content="重置密码"
@@ -135,9 +163,9 @@
               class="el-icon-refresh-left tb-icon"
               @click="openPasswordModal(scope.row.id, false)"
             ></i>
-          </el-tooltip>
+          </el-tooltip> -->
 
-          <el-tooltip
+          <!-- <el-tooltip
             v-if="powers.some((item) => item == '007')"
             effect="dark"
             content="详情"
@@ -147,7 +175,7 @@
               class="el-icon-view tb-icon"
               @click="openModal(scope.row.id, true, scope.row)"
             ></i>
-          </el-tooltip>
+          </el-tooltip> -->
           <!-- <el-tooltip
             v-if="powers.some((item) => item == '005')"
             effect="dark"
@@ -234,11 +262,11 @@ export default {
   },
   data() {
     return {
-      restaurants: [],
-      state: "",
-      timeout: null,
-
-      // 饿了么
+      product_code: "", //商品编码
+      product_name: "", //商品名称
+      product_options: [],
+      product: [],
+      // 饿了么
       product: "", //商品名称绑定的数据
       sitem: null,
       // 渲染当前状态
@@ -253,7 +281,7 @@ export default {
       modelId: 0,
       parmValue: {
         page: 1, // 页码
-        size: 15, // 每页显示条数
+        size: 100, // 每页显示条数
       },
       tableData: [],
       passwordModel: false,
@@ -346,14 +374,13 @@ export default {
   },
   mounted() {
     this.searchList();
-    this.restaurants = this.loadAll(); //饿了么的
   },
 
   methods: {
     restSearch() {
       this.parmValue = {
         page: 1, // 页码
-        size: 10, // 每页显示条数
+        size: 100, // 每页显示条数
       };
       this.searchList();
     },
@@ -395,11 +422,12 @@ export default {
     },
     // 获取商品列表功能函数
     async searchList() {
+      console.log();
       this.loading = true;
       // console.log(this.tableData);
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
-        console.log(res.data.list);
+        // console.log(res.data.list);
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
@@ -446,147 +474,19 @@ export default {
           console.log("取消");
         });
     },
-
-    // 饿了么的
-    loadAll() {
-      return [
-        { value: "三全鲜食(北新泾店)", address: "长宁区新渔路144号" },
-        {
-          value: "Hot honey 首尔炸鸡(仙霞路)",
-          address: "上海市长宁区淞虹路661号",
-        },
-        {
-          value: "新旺角茶餐厅",
-          address: "上海市普陀区真北路988号创邑金沙谷6号楼113",
-        },
-        { value: "泷千家(天山西路店)", address: "天山西路438号" },
-        {
-          value: "胖仙女纸杯蛋糕(上海凌空店)",
-          address: "上海市长宁区金钟路968号1幢18号楼一层商铺18-101",
-        },
-        { value: "贡茶", address: "上海市长宁区金钟路633号" },
-        {
-          value: "豪大大香鸡排超级奶爸",
-          address: "上海市嘉定区曹安公路曹安路1685号",
-        },
-        {
-          value: "茶芝兰(奶茶,手抓饼)",
-          address: "上海市普陀区同普路1435号",
-        },
-        { value: "十二泷町", address: "上海市北翟路1444弄81号B幢-107" },
-        { value: "星移浓缩咖啡", address: "上海市嘉定区新郁路817号" },
-        { value: "阿姨奶茶/豪大大", address: "嘉定区曹安路1611号" },
-        { value: "新麦甜四季甜品炸鸡", address: "嘉定区曹安公路2383弄55号" },
-        {
-          value: "Monica摩托主题咖啡店",
-          address: "嘉定区江桥镇曹安公路2409号1F,2383弄62号1F",
-        },
-        {
-          value: "浮生若茶(凌空soho店)",
-          address: "上海长宁区金钟路968号9号楼地下一层",
-        },
-        { value: "NONO JUICE  鲜榨果汁", address: "上海市长宁区天山西路119号" },
-        { value: "CoCo都可(北新泾店)", address: "上海市长宁区仙霞西路" },
-        {
-          value: "快乐柠檬(神州智慧店)",
-          address: "上海市长宁区天山西路567号1层R117号店铺",
-        },
-        {
-          value: "Merci Paul cafe",
-          address: "上海市普陀区光复西路丹巴路28弄6号楼819",
-        },
-        {
-          value: "猫山王(西郊百联店)",
-          address: "上海市长宁区仙霞西路88号第一层G05-F01-1-306",
-        },
-        { value: "枪会山", address: "上海市普陀区棕榈路" },
-        { value: "纵食", address: "元丰天山花园(东门) 双流路267号" },
-        { value: "钱记", address: "上海市长宁区天山西路" },
-        { value: "壹杯加", address: "上海市长宁区通协路" },
-        {
-          value: "唦哇嘀咖",
-          address: "上海市长宁区新泾镇金钟路999号2幢(B幢)第01层第1-02A单元",
-        },
-        { value: "爱茜茜里(西郊百联)", address: "长宁区仙霞西路88号1305室" },
-        {
-          value: "爱茜茜里(近铁广场)",
-          address:
-            "上海市普陀区真北路818号近铁城市广场北区地下二楼N-B2-O2-C商铺",
-        },
-        {
-          value: "鲜果榨汁(金沙江路和美广店)",
-          address: "普陀区金沙江路2239号金沙和美广场B1-10-6",
-        },
-        {
-          value: "开心丽果(缤谷店)",
-          address: "上海市长宁区威宁路天山路341号",
-        },
-        { value: "超级鸡车(丰庄路店)", address: "上海市嘉定区丰庄路240号" },
-        { value: "妙生活果园(北新泾店)", address: "长宁区新渔路144号" },
-        { value: "香宜度麻辣香锅", address: "长宁区淞虹路148号" },
-        {
-          value: "凡仔汉堡(老真北路店)",
-          address: "上海市普陀区老真北路160号",
-        },
-        { value: "港式小铺", address: "上海市长宁区金钟路968号15楼15-105室" },
-        { value: "蜀香源麻辣香锅(剑河路店)", address: "剑河路443-1" },
-        { value: "北京饺子馆", address: "长宁区北新泾街道天山西路490-1号" },
-        {
-          value: "饭典*新简餐(凌空SOHO店)",
-          address: "上海市长宁区金钟路968号9号楼地下一层9-83室",
-        },
-        {
-          value: "焦耳·川式快餐(金钟路店)",
-          address: "上海市金钟路633号地下一层甲部",
-        },
-        { value: "动力鸡车", address: "长宁区仙霞西路299弄3号101B" },
-        { value: "浏阳蒸菜", address: "天山西路430号" },
-        { value: "四海游龙(天山西路店)", address: "上海市长宁区天山西路" },
-        {
-          value: "樱花食堂(凌空店)",
-          address: "上海市长宁区金钟路968号15楼15-105室",
-        },
-        { value: "壹分米客家传统调制米粉(天山店)", address: "天山西路428号" },
-        {
-          value: "福荣祥烧腊(平溪路店)",
-          address: "上海市长宁区协和路福泉路255弄57-73号",
-        },
-        {
-          value: "速记黄焖鸡米饭",
-          address: "上海市长宁区北新泾街道金钟路180号1层01号摊位",
-        },
-        { value: "红辣椒麻辣烫", address: "上海市长宁区天山西路492号" },
-        {
-          value: "(小杨生煎)西郊百联餐厅",
-          address: "长宁区仙霞西路88号百联2楼",
-        },
-        { value: "阳阳麻辣烫", address: "天山西路389号" },
-        {
-          value: "南拳妈妈龙虾盖浇饭",
-          address: "普陀区金沙江路1699号鑫乐惠美食广场A13",
-        },
-      ];
-    },
-    querySearchAsync(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createStateFilter(queryString))
-        : restaurants;
-
-      clearTimeout(this.timeout);
-      this.timeout = setTimeout(() => {
-        cb(results);
-      }, 3000 * Math.random());
-    },
-    createStateFilter(queryString) {
-      return (state) => {
-        return (
-          state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
-        );
-      };
-    },
-    handleSelect(item) {
-      console.log(item);
+    // 饿了么
+    async remoteMethod(query) {
+      if (query !== "") {
+        let parmValue = {
+          page: 1,
+          size: 100,
+        };
+        this.product_options = this.tableData.filter((item) => {
+          return item.good_name.toLowerCase().indexOf(query.toLowerCase()) > -1;
+        });
+      } else {
+        this.product_options = [];
+      }
     },
   },
 };