This commit is contained in:
邓皓元 2019-04-16 12:08:14 +08:00
parent 956e673f25
commit 9d57acfe82
7 changed files with 38 additions and 5 deletions

View File

@ -97,7 +97,8 @@ class ProductService extends Service
}
$rule = [
'name' => ['required', 'between:2,32', Rule::unique($this->productRepository->getTable(), 'name')->ignore($attributes['id'])->whereNUll('deleted_at')->where('company_id', $attributes['company_id'])],
'type' => ['required', 'in:0,1,2,3'],
'name' => ['required', 'between:2,32', Rule::unique($this->productRepository->getTable(), 'name')->ignore($attributes['id'])->whereNUll('deleted_at')->where('type', $attributes['type'])->where('company_id', $attributes['company_id'])],
'company_id' => ['required', 'exists:virtual_companies,id'],
'package_id' => ['required'],
'price' => [],

View File

@ -504,13 +504,15 @@ export default {
this.$store.dispatch("removeSelected", mapped[this.groupIndex]);
delete mapped[this.groupIndex];
this.$store.commit("SET_ORDER_GROUP", mapped);
let nextIndex = Object.keys(this.order_group)[0];
this.selectGroup(this.order_group[nextIndex], nextIndex);
}
this.$Message.success("操作成功");
this.clear();
this.$Message.info("操作成功");
if (!this.order_group || Object.keys(this.order_group).length < 1) {
this.clear();
if (this.data) {
this.$emit("update-success");
} else {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-2cc41ab2.bcb99373.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.d130b440.js rel=prefetch><link href=/js/chunk-07a274ec.55e1b3b0.js rel=prefetch><link href=/js/chunk-2cc41ab2.617b73d2.js rel=prefetch><link href=/js/chunk-996b1e80.92847c4e.js rel=prefetch><link href=/css/app.8e379248.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.aa6d2b39.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.8e379248.css rel=stylesheet></head><body><noscript><strong>很抱歉如果没有启用JavaScript程序不能正常工作若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.aa6d2b39.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-2cc41ab2.bcb99373.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.d130b440.js rel=prefetch><link href=/js/chunk-07a274ec.55e1b3b0.js rel=prefetch><link href=/js/chunk-2cc41ab2.9a515fc5.js rel=prefetch><link href=/js/chunk-996b1e80.92847c4e.js rel=prefetch><link href=/css/app.8e379248.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.dba35518.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.8e379248.css rel=stylesheet></head><body><noscript><strong>很抱歉如果没有启用JavaScript程序不能正常工作若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.dba35518.js></script></body></html>